Skip to content

D-DRISA-1 (lab): a sealed DR frame as a local register file over borrowed SoA - #1955

Merged
AdaWorldAPI merged 5 commits into
mainfrom
ccr-85acaff0-oszq40-drisa-1
Nov 4, 2026
Merged

AdaWorldAPI merged 5 commits into
mainfrom
ccr-85acaff0-oszq40-drisa-1

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

This PR adds a lab crate and board docs. It changes no production code, adds no transport and no public type, and changes nothing in dt64, mask-risc or the contract. Please don't merge automatically. It is stage 1 of EXO-153. The architecture is #1953 (D-DRISA-0), a plan written by a GPT session and adopted here after review.

The question

Can a witnessed DR frame act as a register file? In that model, typed operands name coordinates: frame, tiles, field positions and an identity selection. Only when an instruction executes are they resolved to borrowed slices of the canonical SoA.

What was built

crates/drisa-register-probe/ is excluded from the workspace and depends only on dt64, mask-risc and the contract.

RegisterFile is a descriptor. It holds:

  • the frame;
  • the tile digests it was bound under;
  • a scope and the demanded field positions;
  • a value witness, but only when values were demanded;
  • one map-only register: the identity selection, routed once at bind.

It holds no reference into the SoA and no value. At execution it re-checks every operand, then hands mask-risc planes that borrow the SoA's own slices. There is no second ALU.

Results

Fixtures are DR64 (1 tile), DR256 (1 tile) and DR256 × 256 tiles (65,536 identities, local order permuted per tile).

All 13 tests pass. Every method equals an independent oracle that reads only global ids and values: COUNT, EXISTS, a value predicate and a masked sum. Measured properties:

  • No copy. The executed planes have the SoA's own addresses. The file owns only the selection bits (8 KiB for 65,536 rows).
  • Routed once. 256 rounds of 4 methods do zero global→local lookups after bind.
  • Map and value lifetimes are separate. After a value write, COUNT stays valid and correct. Value methods and the derived predicate register refuse. Re-taking the value witness routes nothing.
  • Typed refusals. Each refusal has its own variant: stale frame, foreign source, permuted layout, unknown / unauthorized / unbound field, other scope, unmapped / duplicate identity, stale values, and stale scratch (mask-risc's ScratchReadBeforeWrite).
  • Disable runs. All six (frame, layout digest, value witness on lanes, value witness on the derived register, scope, duplicate id) turn tests red. The lax variants return wrong answers.

Cost, three processes:

  • One binding revalidated per query costs about 0.04–0.6 µs over direct planes, with 0 allocations per query (DR256 × 256 tiles: 6.8–7.1 µs vs 6.5–6.7 µs).
  • Binding per query costs 1.2–4.3 µs on one tile.
  • At 256 tiles, binding per query fails the gate (above 1,000 µs). Routing 6,554 ids scans the tile maps (842,138 lookups) because no global id → tile index exists.

Findings

  1. The first missing source-level connection is a layout witness on the canonical SoA. That is, a statement that its rows are laid out under frame version V with tile digests D. With it, a permuted or foreign layout is refused. Without it, the same query answers wrong.
  2. Frame currency is a policy check; correctness rests on the layout digest. MapTable::map replays old frames.
  3. Routing is the only per-query cost a binding removes. Execution is identical.

Decision memos (.claude/plans/d-drisa-decision-memos-v1.md)

Seven owner questions, M1–M7: the layout witness; a global→tile index or co-addressed selections (EXO-46); result-register lifetime; source-location receipt (EXO-46/89/151); DR→Lance authority (D4/S-INGRESS); the carry words as ALU; async loopback. Each states its source, a proposed ruling, a falsifier, and what follows from approval or refusal.

The stage-3 ALU lab is a stacked PR on this branch.

Board: entry entries/2026-11-04-d-drisa-1-register-proof.md, STATUS_BOARD rows D-DRISA-1-LAB and D-DRISA-M1..M7, INTEGRATION_PLANS, regenerated index.

Verify: cargo test --manifest-path crates/drisa-register-probe/Cargo.toml. Bench: --example drisa_bench --release.


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Nov 4, 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: 4480880d-16c4-4a12-b859-42f327125760
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 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-11-04T01:03:00.969464Z 2d733eb 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.

@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: 2d733eb191

ℹ️ 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 thread crates/drisa-register-probe/src/lib.rs Resolved
Comment thread crates/drisa-register-probe/src/lib.rs Resolved
…mpiled

A rebuilt SoA restarted its revision at zero, so a witness taken from the old
SoA matched the new one and a stale derived mask answered. The witness is now
(incarnation, revision); every build_soa takes a fresh incarnation.

A Compiled program carried lane indices but not the schema they were resolved
against, so running it on a file with reordered demanded fields predicated on
the wrong field. Compiled now records the schema and run refuses a mismatch
with Refusal::SchemaMismatch.

Two falsifiers with success controls; both Codex findings on #1955.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
@AdaWorldAPI
AdaWorldAPI merged commit 822abf6 into main Nov 4, 2026
12 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Nov 4, 2026
lib.rs: both sides added a line at the top (pub mod alu; the AtomicU64
import from #1955); kept both. Board indexes regenerated. 21/21 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
AdaWorldAPI added a commit that referenced this pull request Nov 4, 2026
D-DRISA-3 (lab): threshold, Kleene and Bag on the shipped carry words (stacked on #1955)
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