Skip to content

quack: diff count and plateau as one ternlog fold over two resident planes (Round 5) - #1356

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/sharp-bardeen-8nlu1z-r5
Oct 6, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
claude/sharp-bardeen-8nlu1z-r5

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

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.rs has 3 tests over two resident planes a and b:

  • the diff is a XOR b,
  • its size is POPCOUNT(a XOR b),
  • the plateau is NOT ANY(a XOR b).

Each path is checked against a bit-at-a-time row oracle across 11 cases:

  • an empty diff, at 1 row and on a ragged length
  • one changed bit at row 0
  • one changed bit at the boundary between words 0 and 1
  • one changed bit at the boundary between tiles 0 and 1
  • one changed bit at the last row of a ragged 3 × 16384 + 77
  • sparse scattered changes
  • dense changes

Measured

Measured on the dense ragged case (769 words):

path ops lowering scratch slots slot words written heap population bytes
A — reference: materialize the Vec<u64> diff, then count it — — — — — 6152
B — mask-risc Xor → Count / Any 1 Ternlog imm 0x3C 0 0 0 0
C — quack lower, (a∧¬b)∨(¬a∧b) 5 Ternlog imm 0x3C 0 0 0 0
D — quack lower_fused, same filter 1 Ternlog imm 0x3C 0 0 0 0

Both 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 Range predicate stacked on the Xor slot. That version runs Tiled with 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:

  • Xor replaced by And
  • the plateau read as ANY instead of NOT ANY
  • quack's diff spelled with AND instead of OR
  • the reference path ANDing words instead of XORing them
  • the oracle limited to the first word

Gates

  • quack suite: all green
  • clippy -D warnings and fmt: clean
  • test-only change; no library code touched

Board entry: 2026-10-06-diff-plateau-as-expression-round5.md

🤖 Generated with Claude Code

https://claude.ai/code/session_01MHMvKHLhM6xwRswKY4s6vY


Generated by Claude Code

…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
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 5f4b66f5-fb6b-4bef-8b6c-01edaccfb43e
📥 Commits

Reviewing files that changed from the base of the PR and between 54a7331 and c6f6b75.

📒 Files selected for processing (3)
  • .claude/board/entries/2026-10-06-diff-plateau-as-expression-round5.md
  • .claude/board/entries/README.md
  • crates/lance-graph-quack/tests/diff_plateau.rs
  • Autopilot · 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.


Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Oct 6, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 6, 2026 11:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 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-10-06T11:10:41.847278Z 97efed8 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: 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):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@AdaWorldAPI
AdaWorldAPI merged commit d22363d into main Oct 6, 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