Repository navigation
quack: diff count and plateau as one ternlog fold over two resident planes (Round 5) - #1356
Conversation
…lanes Round 5. Two resident planes a and b; the diff is a XOR b, its size is POPCOUNT, the plateau is NOT ANY. Four paths are checked against a row oracle over eleven cases (empty, one bit at word, tile and ragged-tail boundaries, sparse, dense): a materialized Vec<u64> diff, a mask-risc Xor program, quack lower and quack lower_fused over the spelling (a AND NOT b) OR (NOT a AND b). Measured on the dense ragged case (769 words): the reference builds a 6152-byte diff population; every other path lowers to one ternlog fold (imm 0x3C) with zero scratch slots, zero slot words written and zero heap bytes, quack's 5-op spelling included. A tiled twin (a Range stacked on the Xor slot) writes 512 words, so the meter can see a write. Five disable runs go red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MHMvKHLhM6xwRswKY4s6vY
|
Warning Review limit reachedYour organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Next included review available in 55 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (3)
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. Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 88fd5c48-bd44-460e-8710-aed0a31938d5) |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97efed840d
ℹ️ 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".
| } | ||
|
|
||
| /// FAILS IF: the physical shape drifts. Pinned from measurement on the dense | ||
| /// ragged case (`3 × 16384 + 77` rows, 769 words): |
There was a problem hiding this comment.
Correct the ragged population size measurement
For TILE_WORDS = 256, this case has n = 3 * 16,384 + 77 = 49,229, which requires ceil(49,229 / 64) = 770 words and therefore 6,160 bytes, not the documented 769 words and 6,152 bytes. The assertion below only compares materialized(...).1 with the dynamically computed words * 8, so it passes without validating the literal measurement repeated here and in the board entry; update the reported figures or add a literal assertion that pins them.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Correct: ⌈49229/64⌉ = 770 words = 6160 B. Fixed in c6f6b75 (doc table + board entry), and the literal is now asserted (words == 770, a_bytes == 6160); planting 6152 turns the test red.
Generated by Claude Code
…in it 3 x 16384 + 77 rows needs ceil(49229/64) = 770 words, not 769. The test compared against the computed size only, so the documented literal was never checked; it is now asserted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MHMvKHLhM6xwRswKY4s6vY
Round 5 of the arc, following Rounds 1–4 (#1347, #1349, #1352). It asks whether a difference and a plateau can be evaluated without materializing a diff population.
Probe
crates/lance-graph-quack/tests/diff_plateau.rshas 3 tests over two resident planesaandb:a XOR b,POPCOUNT(a XOR b),NOT ANY(a XOR b).Each path is checked against a bit-at-a-time row oracle across 11 cases:
3 × 16384 + 77Measured
Measured on the dense ragged case (769 words):
Vec<u64>diff, then count itXor→Count/AnyTernlogimm0x3Clower,(a∧¬b)∨(¬a∧b)Ternlogimm0x3Clower_fused, same filterTernlogimm0x3CBoth the diff count and the plateau are a single ternlog fold over the two planes. No diff population is written, no scratch slot is provisioned, and execution allocates nothing. Quack's five-op AND/OR/NOT spelling collapses to the same table even under plain
lower.Can the meter see a write? As a control, the same count is run with a
Rangepredicate stacked on theXorslot. That version runsTiledwith 2 slots and writes 512 words, and its count still matches the oracle. So the zeros in the table are measured, not a blind meter.Disable runs — each of these was introduced deliberately and turned the suite red:
Xorreplaced byAndANYinstead ofNOT ANYANDinstead ofORGates
clippy -D warningsand fmt: cleanBoard entry:
2026-10-06-diff-plateau-as-expression-round5.md🤖 Generated with Claude Code
https://claude.ai/code/session_01MHMvKHLhM6xwRswKY4s6vY
Generated by Claude Code