Skip to content

D-NFR-0 / D-NFC-0: native representation contract and canonical dependency correction (docs) - #1753

Merged
AdaWorldAPI merged 8 commits into
mainfrom
docs/native-first-repr-contract-20261023
Oct 23, 2026
Merged

AdaWorldAPI merged 8 commits into
mainfrom
docs/native-first-repr-contract-20261023

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

⊘ Correction (2026-10-23, commit f9db51966). The diagram drew layer [7], "ONNX mathematical conformance adapters", inside the vertical chain between egglog [6] and Tract [8]. [7] is an external leaf facade: an ONNX name maps straight onto an existing native function, and no native layer depends on it. lance-graph-onnx (#1754, draft) implements it. Its only normal dependency is ndarray, it does not import R2IL's router [1], and it has no dispatch.

Branch state (commit 0f88b75eb): main moved; #1744 (the D-ONNX-RELALG-CAP S0 draft) was merged by the operator. This PR merged main back in. The conflicts were in board files only: both STATUS_BOARD sections were kept and the entries index was regenerated. The S0 discussion in §6 is unchanged here and is still the owners' call.

⊘ Correction (2026-10-23, commit ace69d64c). This description and the first version of the diagram called layer [1] "the R2IL polyfill — lance-graph-r2il::procs + FoldDialect". That conflated R2IL with one of its strategies.

R2IL is an opcode table (ogar-r2il) with two readings:

  • machine (0xC400): r2sleigh's r2conc / r2sym;
  • fold (0xC401): FoldDialect.

Layer [1] is the router. It resolves a route once per ClassId (DIRECT / COMPOSE onto ndarray::simd, LOWER to r2sleigh only for machine semantics, or REFUSE) and stores the callable in the binding. The hard invariant is ClassId → LazyLock → prepared dispatch → direct kernel, with no per-call routing.

Measured in #1752 (D-MPF-4): the prebound route costs the same as direct ndarray::simd; the frame/focus/scope guard adds 27–28 ns. The production ClassId-keyed table does not exist yet (seam S17a, LAB).

Docs only: two plans, the board rows, and nothing else. Merges nothing, adds no ABI, changes no execution contract. The corrections to #1746–#1751 and #1750 were approved by the operator on 2026-10-23.

The two P0 invariants

  1. ONNX is an external mathematical compatibility specification. The existing R2IL router (lab(mpf): D-MPF-1 — the Stage 1 math polyfill already exists; one expression, oracle, refusals, cost split #1752; originally written "polyfill", see the correction above) is the native starting point. No ONNX graph, Tract runtime or Optimum dependency is in the internal execution path.
  2. Quack binding + DR64³ + Palette256³ is the intended native representation. DR64³ owns the proposed local relational and focus geometry. Palette256³ owns the proposed numerical representation. Existing R2IL, mask-risc, BGZ, Helix and ndarray primitives are reused.

d-native-repr-contract-v1.md: which seams exist (read in source at f0b046b9f)

status seams
SHIPPED Quack binds names to numeric IDs once and reuses the result (bind.rs); ordered-lane version witness; bgz17 Palette256³ (PaletteEdge = one u8 per S/P/O plane, three codebooks); R2IL / mask-risc / ndarray execution
LAB dr-math-binding-probe: frame seal with stale refusal, focus and scope guards, typed method axes, 64×64 DR register. dir-rmap-probe: 256-slot global → local focus. egglog-proved Boolean composition. The R2IL route per ClassId (S17a, D-MPF-4)
PROPOSED the DR64³ third axis (no type; the register is DR64²); a production table registrar
MISSING a binding store in Quack; codebook runtime identity (no id, generation or digest on Palette); the binding from DR coordinates to palette values

Smallest missing seam: a Quack-bound query does not know its frame (D-NFR-1). Section 3 of the contract separates reusable validated bindings from frame, focus and scope state. Those checks are re-run on every use and are never cached away.

d-native-first-dependency-correction-v1.md: the canonical correction

Board

  • STATUS_BOARD.md: new D-NFC-0 and D-NFR-0..5 rows.
  • INTEGRATION_PLANS.md: new entry.
  • entries/2026-10-23-d-nfr-0-native-repr-contract.md: new entry file.
  • Entries index regenerated.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg

…dency correction

Docs only. Two plans:

- d-native-repr-contract-v1: the Quack -> DR64^3 -> Palette256^3 ->
  execution seams, each SHIPPED / LAB / PROPOSED / MISSING with its source.
  Quack ships name -> numeric binding reused without re-resolution but no
  binding store; frame, focus, scope and the 64x64 DR register are lab
  only (the register is DR64^2; the third axis has no type); bgz17 ships
  Palette256^3 as S/P/O codebooks but codebooks carry no runtime identity
  and nothing binds a DR coordinate to a palette value. Smallest missing
  seam: a Quack-bound query does not know its frame.
- d-native-first-dependency-correction-v1: the two P0 invariants, one
  canonical dependency diagram, the 218 harvested passages reduced to
  seven root assumptions, each corrected at its owning PR, native fallback
  and exact/approximate rules, the #1752 baseline (fair i64 loop
  supersedes the 1.6x claim), and an owner-facing S0 proposal that decides
  nothing.

Board: STATUS_BOARD D-NFR / D-NFC rows, INTEGRATION_PLANS entry, entry
file, entries index regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9f96fb7e-5e80-476e-aa85-dde62f034460
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

AdaWorldAPI pushed a commit that referenced this pull request Oct 23, 2026
Architecture correction approved by the operator on 2026-10-23. Adds one
marked supersession block under the title and inline markers on the
sentences that state a root assumption (A1-A7). Canonical text and the
representation seams are in #1753
(d-native-first-dependency-correction-v1.md, d-native-repr-contract-v1.md).
No other text in this plan changes; the #1744/#1745/#1750 S0 dispute is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
AdaWorldAPI pushed a commit that referenced this pull request Oct 23, 2026
Architecture correction approved by the operator on 2026-10-23. Adds one
marked supersession block under the title and inline markers on the
sentences that state a root assumption (A1-A7). Canonical text and the
representation seams are in #1753
(d-native-first-dependency-correction-v1.md, d-native-repr-contract-v1.md).
No other text in this plan changes; the #1744/#1745/#1750 S0 dispute is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
AdaWorldAPI pushed a commit that referenced this pull request Oct 23, 2026
Architecture correction approved by the operator on 2026-10-23. Adds one
marked supersession block under the title and inline markers on the
sentences that state a root assumption (A1-A7). Canonical text and the
representation seams are in #1753
(d-native-first-dependency-correction-v1.md, d-native-repr-contract-v1.md).
No other text in this plan changes; the #1744/#1745/#1750 S0 dispute is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
AdaWorldAPI pushed a commit that referenced this pull request Oct 23, 2026
Architecture correction approved by the operator on 2026-10-23. Adds one
marked supersession block under the title and inline markers on the
sentences that state a root assumption (A1-A7). Canonical text and the
representation seams are in #1753
(d-native-first-dependency-correction-v1.md, d-native-repr-contract-v1.md).
No other text in this plan changes; the #1744/#1745/#1750 S0 dispute is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
AdaWorldAPI pushed a commit that referenced this pull request Oct 23, 2026
Architecture correction approved by the operator on 2026-10-23. Adds one
marked supersession block under the title and inline markers on the
sentences that state a root assumption (A1-A7). Canonical text and the
representation seams are in #1753
(d-native-first-dependency-correction-v1.md, d-native-repr-contract-v1.md).
No other text in this plan changes; the #1744/#1745/#1750 S0 dispute is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
AdaWorldAPI pushed a commit that referenced this pull request Oct 23, 2026
Operator-approved architecture correction of 2026-10-23, applied to this
PR's own plan: ModelProto is the external adapter's input, not the
internal graph; OP-6 / OP-7 block only the optional external-file
adapter; the native fallback is the exact native method. One marked block
under the title, two inline markers, and the D-ONNX-CAP-S1 board row
annotated. Canonical text in #1753. The S0 ownership dispute with #1744
and #1745 is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
…sion)

The canonical diagram's layer [1] equated R2IL with lance-graph-r2il::procs
+ FoldDialect. It now names the router: a route is resolved once per
ClassId (DIRECT / COMPOSE onto ndarray::simd, via mask-risc where a
program is needed; LOWER to r2sleigh only for machine semantics; REFUSE).
The replaced wording stays quoted in a ⊘ note together with the hard
invariant: ClassId -> LazyLock -> prepared dispatch -> direct kernel, and
no per-call routing.

The §5 baseline gains the D-MPF-4 rows. The D-NFR contract gains seam
S17a (LAB) and a ⊘ note on the D-MPF-2 attribution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T22:15:07.441193Z ace69d6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

[7] sat inside the vertical chain between egglog [6] and Tract [8].
It is a leaf: ONNX names map straight onto existing native functions
and no native layer depends on it. lance-graph-onnx (#1754) implements
it. The S0 ownership question in §6 stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ace69d64cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +21 to +25
[1] R2IL mathematical router SHIPPED route per ClassId, once: DIRECT / COMPOSE
│ (ClassId → LazyLock → prebound onto ndarray::simd (via mask-risc where a
│ native callable → kernel) program is needed), LOWER to r2sleigh only
│ for machine semantics, else REFUSE (D-MPF-4).
│ The ClassId-keyed table itself: LAB (#1752).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mark the ClassId-prebound router as LAB rather than SHIPPED

The canonical diagram labels the ClassId-prebound router as SHIPPED, but the production lance-graph-r2il/src/lib.rs implements the FoldDialect strategy, not ClassId-based routing, and S17a in the companion contract explicitly says that no production ClassId-keyed table exists. Searching the reviewed tree also finds neither the cited math-polyfill-probe/examples/classid_route.rs nor its D-MPF plan. Because this diagram is designated as the dependency reference for subsequent work, its current label incorrectly makes the proposed routing integration look available to production consumers. Label the router LAB and distinguish it from the shipped execution strategies.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed and fixed in 7a72923d4. The router row now reads LAB: it exists only as math-polyfill-probe/examples/classid_route.rs (#1752), and no production ClassId table exists (S17a). A separate SHIPPED line lists the strategies beneath it: ndarray::simd, mask-risc programs, and r2il's FoldDialect and procedures. The old label is kept as a marked supersession note.

The example and the D-MPF plan were missing from this branch only because they live on #1752.


Generated by Claude Code

…r-contract-20261023

# Conflicts:
#	.claude/board/STATUS_BOARD.md
#	.claude/board/entries/README.md
…1753)

The diagram labelled the ClassId-prebound router SHIPPED. Only the
strategies beneath it ship; the router exists as the #1752 lab example
and no production ClassId table exists (S17a). Marked supersession.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
…ept at their own paths)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
…r-contract-20261023

# Conflicts:
#	.claude/board/STATUS_BOARD.md
#	.claude/board/entries/README.md
…r-contract-20261023

# Conflicts:
#	.claude/board/STATUS_BOARD.md
#	.claude/board/entries/README.md
@AdaWorldAPI
AdaWorldAPI merged commit c3681ba into main Oct 23, 2026
5 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Oct 24, 2026
…t id for superseded v1 entry)

D-NFC-0 and D-NFR-0 marked Shipped (#1753). The superseded v1 entry's
heading becomes D-NFR-6-v1 so the index has no duplicate D-NFR-6 row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants