Skip to content

lab(D-DR256): 64 mapped DR64 registers -> one global 8 KiB mask - #1790

Merged
AdaWorldAPI merged 5 commits into
mainfrom
claude/dr256-global-mask-lab
Oct 26, 2026
Merged

AdaWorldAPI merged 5 commits into
mainfrom
claude/dr256-global-mask-lab

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Lab probe in the workspace-excluded drf-focus-probe crate (examples/global_union.rs). Its question: can 64 independently mapped 64×64 registers, each a SealedMap of u16 global ordinals plus a 4,096-bit local selection, be reduced to one global 256×256 mask (1,024 × u64, 8 KiB) using the existing algebra? No production code changed. Only a dev-dependency on lance-graph-mask-risc was added to the lab crate.

Decision

  • The global mask exists as a demanded result. It can be built two ways, and both equal an independent set oracle on every fixture:
    • ndarray::simd::mask_scatter_or_u32, called 64 times; it does not zero its output, so the calls union;
    • one mask-risc Terminal::ScatterOrU32 program over the 262,144-row population. One program is required because the executor zeroes Out::Mask at the start of each program.
  • Further Boolean algebra over G is a contract blocker through the current mask-risc terminal. ScatterOrU32's survival condition (ir.rs:329-337) forbids consuming the scattered mask, and it stays unchanged.
  • One form is legal today: G AND h. Build h with Ternlog + Keep over global planes, Gather it through each map under the local mask, then scatter. G itself is never read, and parity is exact.
  • Not expressible through the current terminal: G OR h, NOT G, G XOR h, and AND-ing two scattered masks. That is a statement about mask-risc, not about the operation. ndarray's scatter-or preserves its destination, so seeding the demanded output with h could yield G OR h as one terminal result. That is a hypothesis for a later contract review, not a capability.
  • The demonstrated consumer needs none of these. G is the demanded output, and its zero bits already exclude the other 61,440 addresses without a complement.

Measured (ns per run, median of 31 batches; reported, not gated)

fixture selected slots → members ndarray ×64 mask-risc, one program
clustered 64×64 4,096 → 4,096 (64 nonzero words) 9–12 µs 15–19 µs
scattered 4,096 → 4,096 (1,008 nonzero words) 11 µs 18–19 µs
chaotic 50 % 130,990 → 56,927 157–168 µs 198–227 µs
full 262,144 → 65,536 267–411 µs 376–488 µs

Preparation is charged separately and costs more than the scatter at small selections: binding the 64 maps takes 58–108 µs, and widening u16 → u32 (a 1 MiB derived lane) takes 35–45 µs.

Controls (all asserted)

  • Identity maps, collisions, same entity with different local coordinates, and same slot number with different entities.
  • Stale seal, out-of-universe ordinal, version mismatch and scope mismatch: each is refused before any union.
  • Disable runs fire: XOR-ing the index lane breaks scatter parity; dropping the gather gate breaks G AND h parity.
  • G is membership only, never a count, a Bag, provenance or a K3 result.

Gaps named, not built

  • No u16-index scatter or gather in ndarray.
  • No multi-register union witness; the check that all 64 maps share one source and one scope lives only in the probe.
  • The mask-risc path needs the 64 local masks laid out contiguously.

Further Boolean operators over G wait for a concrete consumer to justify them.

Details: .claude/board/entries/2026-10-26-dr256-global-union-lab.md. Unrelated to Lance I/O: P1 (#1789) failed, and G says nothing about bytes read.

🤖 Generated with Claude Code

https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX

Workspace-excluded lab probe (drf-focus-probe/examples/global_union.rs).
Builds the global union G of 64 chaotically mapped 64x64 registers with
the existing ndarray scatter (64 calls) and with ONE mask-risc
ScatterOrU32 program over the 262,144-row population; both equal an
independent set oracle on chaotic, clustered 64x64, scattered, empty and
full fixtures. Controls: identity, collisions, same entity / same slot,
stale seal, out-of-universe, version and scope refusals; disable runs fire.

Composition: ScatterOrU32's survival condition forbids consuming G, so
only G AND h is legal, via a gated Gather of h through each map before the
scatter (parity exact). G OR h / NOT G are a contract blocker.

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

coderabbitai Bot commented Oct 26, 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: d0999b20-be41-4b29-a927-0fe30ba6046f
  • 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.

…eeded scatter-or is a hypothesis

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

@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: f7f51c1fad

ℹ️ 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 .claude/board/entries/2026-10-26-dr256-global-union-lab.md Outdated
@chatgpt-codex-connector

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-26T17:49:44.710992Z f7f51c1 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.

…erts

Addresses codex review on #1790: both disable controls were reported as asserted
but lived only in uncommitted runs.

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

# Conflicts:
#	.claude/board/entries/README.md
@AdaWorldAPI
AdaWorldAPI merged commit 3830229 into main Oct 26, 2026
11 checks passed
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