Repository navigation
D-RPF-9: Fold-Join deforestation probe + three-stage plan update - #1414
Conversation
…intermediate A probe, not a primitive. Every arm runs the shipped mask-risc executor or quack's lowering into it, against a per-row oracle, over 64K rows: resident masks folded directly, predicate chains (ungated and gated), a resident mask gating a predicate, the Boolean variants, quack's lower/lower_fused, and CE64 fields read in place from ValueTenant::MaterializedEdges against the canonical CausalEdge64 accessors. Edge cases, a demanded bitmap, a reused intermediate and a merge-law refusal are asserted; timings are printed only. causal-edge becomes an example-only dev-dependency of quack, so the CE64 arm is diffed against the real accessors rather than a restated layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
Board entry for the fold_join_probe results and the capability inventory; the resident-projection plan gains the three stages (projection, mask, fold-join), the D-RPF-0 equality status, and D-RPF-9 with its proposed rewrite contract (R2 strided pattern merge, R3 gate selection) and the three named T1 gaps. Nothing is implemented beyond the probe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
📝 WalkthroughWalkthroughAdds a benchmark and correctness probe for mask-fold lowering and CE64 strided predicates. It records measurements, tested constraints, and proposed rewrites that are not implemented. ChangesFold-Join probe
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The probe and plan update are mergeable after normal checks; no material issue is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 27 functions across 1 files. (5 skipped: 5 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. I’m a rabbit with a test to run, Comment |
member-tests hit its 30-minute limit on main (run 37766947128) and on #1410, both cut off in the hydrate step. The time went to one binary: the crossword_real_words_probe example tests (D-PUZZLE-0, added 2026-10-07) ran 810 s at opt-level 0. The shader-driver test step now passes --config 'profile.dev.package.cognitive-shader-driver.opt-level=3'. Only that package is optimized; debug info stays 0 from the manifest and every other crate keeps the shared opt-level-0 cache. Measured locally: 184 s for that binary, 4m17 for the whole step including the compile, all green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
|
The fix is #1412: it optimizes only the I ported the same commit here as Generated by Claude Code |
|
Add Carrot credits or activate Agent usage billing to use Autopilot |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7faefd7806
ℹ️ 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".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Conflicts only in the board: STATUS_BOARD's D-RPF-0 row takes main's test-pinned status (#1413), and the generated entries index is regenerated with entries_index.py. The plan's D-RPF-0 status note and the fold-join entry now cite #1413's pinned threshold half instead of calling it unexercised. The ported #1412 workflow change merged as a no-op. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
…x P2 ×2) The scratch column now reports what Scratch::for_program actually carved (slots × words), so the no-slot lowering prints 0 B instead of the program's logical slot count. The R2 pattern-merge law is now (p1 & c1) | (p2 & c2) under the conflict check: a pattern may carry bits outside its own care, which the matcher ignores. New falsifier: with junk bits outside edge 1's care, the two predicates and the masked merge both answer 258, an unmasked OR 275. Board entry and plan updated to the masked form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
There was a problem hiding this comment.
🔇 Additional comments (7)
crates/lance-graph-quack/examples/fold_join_probe.rs (2)
1-259: LGTM!Also applies to: 263-1159
260-262: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Remove the stale doc comment on
ArmA.Lines 260-261 describe a function that returns a count and has
ma/mbparameters. The doc comment is attached to theArmAstruct. Line 285 already documentsrun. Keep only line 262.♻️ Proposed fix
-/// Arm A, all three steps: two `Keep`s into caller masks, then the fold. -/// Returns the count; `ma`/`mb` are the materialised population masks. /// The three programs arm A runs, built once outside the timer.crates/lance-graph-quack/Cargo.toml (1)
24-27: LGTM!.claude/board/entries/2026-10-08-fold-join-deforestation-probe.md (1)
1-178: LGTM!.claude/plans/2026-10-08-resident-projection-fold-mask-v1.md (1)
63-82: LGTM!Also applies to: 114-119, 300-320
.claude/board/STATUS_BOARD.md (1)
16-16: LGTM!.claude/board/entries/README.md (1)
28-28: LGTM!Also applies to: 39-39
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Essentials
- Run ID:
e98eff35-e78e-4e97-b288-6c0e53809bad
📒 Files selected for processing (6)
.claude/board/STATUS_BOARD.md.claude/board/entries/2026-10-08-fold-join-deforestation-probe.md.claude/board/entries/README.md.claude/plans/2026-10-08-resident-projection-fold-mask-v1.mdcrates/lance-graph-quack/Cargo.tomlcrates/lance-graph-quack/examples/fold_join_probe.rs
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
This PR adds a probe and a plan update only. No production primitive changes. It asks when two address-aligned membership sources meet in one terminal, which shipped lowering already avoids the intermediate.
crates/lance-graph-quack/examples/fold_join_probe.rs. Every arm runs the shipped mask-risc executor, or quack's lowering into it, against a per-row oracle on 65,536 rows. Every count is asserted; timings are only printed.entries/2026-10-08-fold-join-deforestation-probe.md.2026-10-08-resident-projection-fold-mask-v1.md.Inventory (read in code)
fused_ternlog/tern2/tern3handle up to six resident planes intoCount/Anywithout a slot or bitmap.Predin the chain: tiled. There is one 2 KB tile per slot and never a population mask (the tiled law).loweralways gates conjuncts under the accumulator.lower_fusednever gates._underkernel. A gated strided predicate runs in full and is then ANDed.Quad8::fold_product,MergeMode, the rotated-XOR fingerprint and the f32 superposition are different operations frompopcount(A ∧ B), so arm G was not run.Measured (64K rows, one host, about ±10 % run to run)
Scratch is reported from the
ScratchthatScratch::for_programactually carves (slots() * words() * 8), so the no-slot lowerings report 0 B.The CE64 arm matches
MaterializedEdgesin place and equals theCausalEdge64accessors:Both 16 B windows stay inside the 32 B tenant (row bytes 48..80, one 64 B line each).
Two cases are asserted as must-not-eliminate:
Keepbitmap is written in full and equals the oracle.|A∧B| + |A∧¬B| = |A|.BlendI32over a partial extent is refused.Proposed rewrite contract (not implemented; each needs its own PR)
MatchFacet16Stridedpredicates on the same lane under the same reading.((p1 & c1) | (p2 & c2), c1 | c2), but only when(p1 ^ p2) & c1 & c2 == 0. Otherwise the result is the empty mask.ndarray::simd(T1):_underkernel.Boundaries
Gather/ScatterOrU32hops are not Fold-Joins.RegisterLaws never meet in a fold, becausebind_signed_registerrefusesRegisterLawMismatchfirst (contract: signed Register128 readings (32×i4, 16×i8) with a per-family law #1410).Checks
cargo clippy -p lance-graph-quack --examples -D warnings: clean.fmt: clean.causal-edge(zero-dep) is added as an example-only dev-dependency of quack.🤖 Generated with Claude Code
https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
Summary by CodeRabbit