Skip to content

lab(D-DR256-OD): on-demand global mask, u16 scatter, bounded reuse, L1 interference - #1791

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/dr256-on-demand-lab
Oct 26, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
claude/dr256-on-demand-lab

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Lab follow-up to #1790; it does not extend #1790. The lab lives in the workspace-excluded drf-focus-probe crate (examples/dr256_on_demand.rs). It was pre-registered in commit e01d38879 before any run, and results are appended to .claude/board/entries/2026-10-26-dr256-on-demand-l1.md. No production code changed.

Depends on AdaWorldAPI/ndarray#377 (mask_scatter_or_u16). The lab crate patches ndarray to the sibling checkout.

What it measures

Each thought brings its own 8 KiB global plane X and asks one of two questions over the #1790 fixtures: any(G ∧ X) or |G ∧ X|. Five arms answer the same question, each with its preparation charged:

arm what it does per thought
A local only, no global mask
B rebuild G with the u16 scatter
C rebuild G with the u32 scatter (widening charged once)
D reuse G while its witness holds
E count without a shared G

N ∈ {1, 2, 4, 8, 64}, run twice.

Findings

  • Correctness: all masks and answers equal a set oracle, with whole-mask comparison. Hot-path allocations after setup: 0.
  • Reuse: it pays from N = 2 on every fixture. At N = 64 the cost per thought falls to 0.3–0.5 µs (clustered, scattered) and 2.3–4.5 µs (chaotic, full).
  • Rebuild per thought: at chaotic/full density it reaches milliseconds at N = 64, which is a failed gate under the workspace rule.
  • Without a stable window (the selection changes every thought), reuse gives nothing.
  • E is slowest for count.
  • u16 vs u32: u16 removes the 1 MiB widening (9 vs 46 µs at N = 1).
  • A answers any in nanoseconds only because X is 50 % dense and the walk exits on the first hit. With an empty selection A costs 2.4–4.9 µs per thought, against D's 0.3 µs.
  • L1 interference with a resident DR64 fold (512 B mask + 16 KiB column):
    • Keeping one 8 KiB G live does not slow the fold: within 1.5 % in both runs.
    • Rebuilding per thought does: by 11.8 % and 13 % on clustered. No hardware counters were available, so this is timing only.

Decisions

  • mask-risc exposure: designed, not implemented. The design adds LaneRef::U16, read by the existing ScatterOrU32 / ScatterCountU32 with the width resolved per tile; no new terminal. It waits for ndarray#377.
  • Reusing a scattered G across thoughts is not lawful today (ir.rs:329-337). The entry records a narrow "witnessed derived population" contract proposal for your decision: read-only folds over the same universe, a full witness (source, scope, universe, every map's id and seal, every register's selection generation), bounded to one compatible thought window, never persisted.

Generated by Claude Code

…catter / bounded reuse / L1

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

Workspace-excluded lab (drf-focus-probe/examples/dr256_on_demand.rs),
pre-registered in e01d388 before any run. Five arms answer the same
any/count questions over the #1790 fixtures for N = 1, 2, 4, 8, 64 thoughts;
all masks and answers equal a BTreeSet oracle, 0 hot-path allocations.

Reuse under a witness pays from N = 2 on every fixture; rebuilding per
thought reaches ms at chaotic/full density; per-thought scatter without a
shared G (E) is slowest. Keeping one 8 KiB G live does not slow a resident
DR64 fold (within 1.5 %, two runs); rebuilding per thought does (11.8 / 13 %
on clustered). u16 removes the 1 MiB widening (9 vs 46 us at N = 1).

Reusing a scattered G is forbidden by ir.rs:329-337 today; the entry records
a narrow "witnessed derived population" contract proposal, not implemented.
Needs ndarray mask_scatter_or_u16 (separate ndarray PR).

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: 0629c98b-62bb-4b54-a61a-2ecc4a4065d6
  • 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.

@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 🔄 Running since 2026-10-26T17:48:33.647243Z 6323b35 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.

…d-lab

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