probe(helix): the ruler reads the address as a NUMBER — intake blindness kills the residue sweep, and "stride 4 isn't golden" is refuted - #876
Conversation
…ess kills the residue sweep PROBE-CLAM-VS-HELIX-RESIDUE leg 0. The queued sweep (finer address => more deterministic place => less stored residue) did NOT run, and not running it is the result. Two failure modes were pre-registered before any measurement; running them first was decisive. H1 INTAKE IS STRUCTURE-BLIND (confirmed, fatal). CurveRuler::from_place(p) = p % 17 consumes the address as a NUMBER, never as a hierarchy. The same 256 cells carved 4-ary (depth 4) or 16-ary (depth 2) produce the SAME start-offset multiset — a pure rotation. The ruler cannot tell the carvings apart, so a residue-vs-granularity sweep would return a null for a reason unrelated to 4^4. Reporting "4^4 doesn't help the calculator" from that null would have been a false negative manufactured by the intake. The 4^4 ADDRESS result is untouched; this is a finding about the CALCULATOR'S INTAKE. H2 THE "STRIDE 4 ISN'T GOLDEN" SUSPICION IS REFUTED, and the refutation vindicates the shipped constants. Gap spread (lower = more uniform) at the prefix lengths early termination actually consumes: n=2: stride4 9 vs phi-stride11 5 n=3: stride4 5 vs 1 n=4: stride4 1 vs 5 <- the prefix a 4-ary tier consumes n=5: stride4 3 vs 4 n=6: stride4 3 vs 4 At n=4 stride 4 gives gaps [4,4,4,5] — near-perfect tiling — because 4*4 = 16 ~ 17. The comma is what makes the 4-step prefix uniform. Operator framing confirmed in mechanism: stride 4 over 16 covers only 4/16 and retraces one column forever; 17 = 4^2+1 turns the raster into a sweep. STRIDE=4 / MODULUS=17 are MATCHED to the 4-ary use case. H3 THE BLINDNESS IS FIXABLE. Per-tier seeding (one ruler per 2-bit group, folded with its level) preserves ancestry by construction: over 4,662 sampled pairs sharing >=1 address level, flat intake preserves ancestry in 51, per-tier in 1,152 (~23x). The unblock is to feed the ruler the address's hierarchy, not its integer value — a helix API change needing its own review, not done here. Core-First: CONSUMES helix::curve_ruler::CurveRuler; nothing re-derived. Self-caught vacuous gate kept in the record: H3's first run sampled 0 pairs and correctly FAILED — `for a in 0..CELLS as u8` with CELLS=256 is an empty range because 256 as u8 == 0. Fourth instance in this arc of a defect living in the falsifier rather than the measurement. Boundaries: ruler properties only (integer arithmetic over 17). No residue encoded, no CLAM comparison, no cost measured. Brief-gates AGREEMENT and COST remain NOT RUN — blocked on H1, not skipped. Gates 3/3 green; clippy -D warnings clean; fmt applied. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3RyLEbuNSHxxB3NTTrGki
|
@coderabbitai review Requesting while still draft — merges have repeatedly outrun reviews in this repo, so findings are worth more now. Three places where this probe is most likely to be wrong, since they're the load-bearing claims:
Also worth flagging what this PR deliberately does not claim: no residue was encoded, no CLAM comparison ran, and no cost was measured — the AGREEMENT and COST gates are blocked on H1, not skipped. Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 506514dc78
ℹ️ 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".
…3 sample size All three confirmed. None was fixed by adjusting a threshold. P1 #1 — H1 SORTED THE HISTOGRAMS. Comparing sorted multisets discards which cell maps to which offset, and the UNSORTED histograms genuinely differ (peak at index 4 vs 2), so the gate passed while hiding that every cell had moved. An aggregate distribution cannot establish per-cell invariance. Replaced with the argument that actually holds, in two halves: (i) type-level, stated not measured — from_hhtl(path, depth) has no parameter that could carry a carving; (ii) empirical — the entire difference between the carvings is a CONSTANT rotation of 2 across all 256 cells with variance 0, and a cell-dependent shift is the falsifier. P1 #2 — H2 DREW A DESIGN CONCLUSION FROM AN UNWIRED PREMISE. I claimed the shipped constants are "MATCHED to the 4-ary use case". Verified against the source: ResidueEncoder::encode reads only start_offset (n=1, residue.rs:157); index/arc appear solely in walk_spectrum and crate tests; the shipped NiblePath is FAN_OUT=16. Nothing that ships consumes a 4-step prefix, so the n=4 comparison is a property of a hypothetical consumer. Claim withdrawn. What survives is narrower and still worth recording: the pre-registered suspicion is NOT CONFIRMED — a retraction of a concern, not a vindication of a design. P2 #3 — H3 PUBLISHED A FALSE SAMPLE SIZE. The counter incremented before the k > 0 eligibility check, so "4,662 pairs sharing >=1 address level" was really every thinned pair. Codex's inference was exactly right: since tiered agreement holds for every eligible pair by construction, 1,152 IS the eligible population. Corrected figures: flat 51/1,152 = 4.4% (~ the 1/17 = 5.9% chance level, i.e. the flat intake keeps ancestry about as often as chance would); per-tier 1,152/1,152 = 100% BY CONSTRUCTION, now asserted as a construction check rather than as evidence. The ~23x ratio was arithmetic on a mislabelled denominator and is retracted. Both board records corrected in the same commit with dated inline markers, per the append-only rule. Gates 3/3 green; clippy -D warnings clean; fmt applied. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3RyLEbuNSHxxB3NTTrGki
|
All three findings confirmed and fixed in P1 #1 — H1 sorted the histograms. Correct, and worse than it first looks: the unsorted histograms genuinely differ (peak at index 4 vs 2), so sorting made the gate pass while hiding that every cell had moved. An aggregate distribution cannot establish per-cell invariance. Replaced with the argument that actually holds, in two halves:
P1 #2 — H2's design conclusion rested on an unwired premise. Withdrawn. I verified your call-site claim against the source and it holds exactly: P2 #3 — H3 published a false sample size, and your inference about the true one was right. The counter incremented before the
4.4 % sits essentially at the 1/17 ≈ 5.9 % chance level — the honest reading is "the flat intake keeps ancestry about as often as chance would", which is a better statement than the ≈23× ratio I published. That ratio was arithmetic on a mislabelled denominator and is retracted. The 100 % is now asserted as a construction check, explicitly not as evidence, since it cannot be otherwise. Both board records carry dated inline 3/3 gates green, clippy Generated by Claude Code |
📝 WalkthroughWalkthroughThe pull request adds a Rust probe for HHTL intake blindness. It tests carving rotation, stride gap spread, and hierarchical seeding. It records execution results, corrected statistics, validation commands, scope limits, and follow-up API work. ChangesHHTL intake probe
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Changed files =='
git diff --name-only "$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null || git rev-list --max-parents=0 HEAD | tail -n1)" HEAD 2>/dev/null || true
printf '%s\n' '== Candidate files =='
fd -t f -a 'probe_hhtl_intake_blindness\.rs|curve_ruler\.rs|residue\.rs|lib\.rs' crates/helix 2>/dev/null || true
printf '%s\n' '== Probe outline =='
ast-grep outline crates/helix/examples/probe_hhtl_intake_blindness.rs --items all 2>/dev/null || true
printf '%s\n' '== Curve-ruler outline =='
ast-grep outline crates/helix/src --items all --match 'CurveRuler|ResidueEncoder|NiblePath' 2>/dev/null || true
printf '%s\n' '== Relevant identifier uses =='
rg -n -C 3 '\b(from_hhtl|from_place|start_offset|walk_spectrum|\.index\s*\(|\.arc\s*\(|FAN_OUT)\b' crates/helix --glob '*.rs' 2>/dev/null || trueLength of output: 21701 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Probe: all gate code =='
nl -ba crates/helix/examples/probe_hhtl_intake_blindness.rs | sed -n '75,310p'
printf '%s\n' '== CurveRuler construction =='
nl -ba crates/helix/src/curve_ruler.rs | sed -n '18,68p'
printf '%s\n' '== ResidueEncoder call path =='
nl -ba crates/helix/src/residue.rs | sed -n '125,180p'
printf '%s\n' '== PR diff: probe =='
git diff "$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null || git rev-list --max-parents=0 HEAD | tail -n1)" HEAD -- crates/helix/examples/probe_hhtl_intake_blindness.rs
printf '%s\n' '== Changed board claims =='
git diff --unified=12 "$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null || git rev-list --max-parents=0 HEAD | tail -n1)" HEAD -- .claude/board/EPIPHANIES.md .claude/board/exec-runs/hhtl-intake-blindness.mdLength of output: 1265 🏁 Script executed: #!/bin/bash
set -euo pipefail
base="$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null || git rev-list --max-parents=0 HEAD | tail -n1)"
printf '%s\n' '== Probe: gate code =='
sed -n '75,310p' crates/helix/examples/probe_hhtl_intake_blindness.rs
printf '%s\n' '== CurveRuler construction =='
sed -n '18,68p' crates/helix/src/curve_ruler.rs
printf '%s\n' '== ResidueEncoder call path =='
sed -n '125,180p' crates/helix/src/residue.rs
printf '%s\n' '== PR diff: probe =='
git diff "$base" HEAD -- crates/helix/examples/probe_hhtl_intake_blindness.rs
printf '%s\n' '== Changed board claims =='
git diff --unified=12 "$base" HEAD -- .claude/board/EPIPHANIES.md .claude/board/exec-runs/hhtl-intake-blindness.mdLength of output: 47325 🏁 Script executed: #!/bin/bash
set -euo pipefail
python - <<'PY'
from collections import defaultdict
def shared_levels(a, b):
for k in range(4):
shift = 2 * (4 - k) - 2
if (a >> shift) != (b >> shift):
return k
return 4
def flat_seed(cell):
return (cell + 4) % 17
groups = {
"all eligible": lambda a, b: True,
"(a+b)%7==0": lambda a, b: (a + b) % 7 == 0,
}
for name, keep in groups.items():
total = agree = 0
by_k = defaultdict(lambda: [0, 0])
for a in range(256):
for b in range(a + 1, 256):
k = shared_levels(a, b)
if k == 0 or not keep(a, b):
continue
total += 1
same = flat_seed(a) == flat_seed(b)
agree += same
by_k[k][0] += 1
by_k[k][1] += same
print(f"{name}: {agree}/{total} = {agree/total:.6%}")
for k in sorted(by_k):
n, hits = by_k[k]
print(f" shared_levels={k}: {hits}/{n} = {hits/n:.6%}")
print("chance baseline: 1/17 = {:.6%}".format(1/17))
PY
printf '%s\n' '== Current pull-request body =='
gh pr view 876 --repo AdaWorldAPI/lance-graph --json body,url --jq '.url + "\n---\n" + .body' 2>/dev/null || trueLength of output: 6939
Please either enumerate all H1 now tests the correct constant-shift property and states the API-level argument separately. H2 now has the correct hypothetical-consumer scope. ✅ Action performedReview finished.
|
… for one root cause CodeRabbit on #876: the corrected 1,152 is the eligible THINNED SAMPLE, not the eligible POPULATION (8,064). That is the same population-label error one level up from the codex P2 fix it replaced — a second mislabel stacked on the fix for the first. Rather than relabel again, the cause is removed. The `(a+b) % 7` thinning bought nothing: 256*255/2 = 32,640 pairs is trivial to enumerate exhaustively. With no sample there is no sample to mislabel. Full-population figures, independently reproduced by the reviewer: eligible population 8,064 pairs sharing >=1 address level flat intake 360/8,064 = 4.5% (~ the 1/17 = 5.9% chance level) per-tier intake 8,064/8,064 = 100% BY CONSTRUCTION The conclusion is unchanged — the flat intake keeps ancestry about as often as chance would — but it now rests on the whole population rather than on a thinned sample carrying a wrong label. Probe output, EPIPHANIES and the exec-run updated together so no artifact keeps a stale denominator; the PR description follows. Both board records carry a dated marker recording that the denominator was wrong twice and naming the single root cause. Gates 3/3 green; clippy -D warnings clean; fmt applied. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3RyLEbuNSHxxB3NTTrGki
|
Confirmed and fixed in The codex fix corrected "4,662 = every thinned pair" to "1,152 = eligible", and in doing so I substituted a second population-label error for the first: 1,152 is the eligible thinned sample, never the eligible population. Two denominators, two labels, both wrong, one root cause — a So rather than relabel a third time, the thinning is removed. With no sample there is no sample to mislabel, and the class of error is closed rather than patched:
Your independently-computed Updated together so no artifact keeps a stale denominator: probe output, Also noted your confirmations that H1 now tests the constant-shift property with the API-level argument stated separately, and that H2 carries the correct hypothetical-consumer scope. 3/3 gates green, clippy Generated by Claude Code |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/board/EPIPHANIES.md:
- Line 1: Update the H2 entry title in EPIPHANIES.md to remove the withdrawn
claim that the stride-4 suspicion was refuted and shipped constants match a
4-ary consumer. Align the title with the H2 verdict that the suspicion remains
unconfirmed and the 4-ary matching claim was withdrawn, while preserving the
rest of the title’s context.
In @.claude/board/exec-runs/hhtl-intake-blindness.md:
- Around line 21-23: Update the H2 outcome labels in the hypothesis results,
including the corresponding 50-50 entry, from “REFUTED” to “NOT CONFIRMED” or
“suspicion retracted.” Preserve the surrounding explanation and avoid asserting
that the hypothesis was disproven.
- Line 34: Add the language identifier `text` to the code fence on line 34 to
specify that this is a text output block. Update the opening triple-backtick
fence from ``` to ```text to comply with Markdownlint rule MD040, which requires
all code blocks to have a language specified.
In `@crates/helix/examples/probe_hhtl_intake_blindness.rs`:
- Around line 291-305: Clarify the H3 acceptance criterion in the gate around
flat_rate: either derive its threshold from an explicitly declared null model,
or document 0.25 as a hand-tuned smoke-test limit and remove any wording that
treats passing it as evidence of chance-level behavior. Keep the tier_agree
construction check unchanged and ensure the diagnostic message accurately
reflects the selected interpretation.
- Around line 95-158: Add a #[cfg(test)] module in the probe example covering
the helper functions and recorded probe findings: verify the H1 constant shift,
exact H2 prefix_gap_spread outputs, and H3 eligible-pair counts plus agreement
values. Reuse the expected constants and scenarios already defined by the
H1/H2/H3 gates, and keep tests focused on symbols such as start_histogram,
prefix_gap_spread, flat_seed, tiered_seeds, and shared_seed_prefix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4575349f-bcbf-4f1e-9bd4-add31c533c09
📒 Files selected for processing (3)
.claude/board/EPIPHANIES.md.claude/board/exec-runs/hhtl-intake-blindness.mdcrates/helix/examples/probe_hhtl_intake_blindness.rs
…— which then failed and corrected the claim CodeRabbit review of a096114, five findings. All addressed; the fourth changed a result. 1. H3 THRESHOLD WAS HAND-TUNED. `flat_rate < 0.25` would have passed at 24.9% while the prose claimed ~1/17. Replaced with a declared null model rather than a better constant: H0 = "the flat seed carries no ancestry information", so its agreement rate among ELIGIBLE pairs must not exceed its rate among ALL pairs. Both computed exhaustively. Running it immediately FAILED my first formulation ("the two rates coincide") — and the failure was correct: eligible 360/8,064 = 4.4643% all pairs 1,800/32,640 = 5.5147% delta = -1.05 pp The rates do NOT coincide. The flat seed is not ancestry-neutral, it is mildly ancestry-AVERSE: cells sharing an address prefix are numerically close, so they are LESS likely to be congruent mod 17. The gate now asserts only the true, weaker claim — no ancestry LIFT — and reports the direction instead of assuming it. Falsifier: an eligible rate materially above base, which would mean the flat seed does carry ancestry. This is the second time in this probe that replacing a bad criterion exposed that the replacement claim was also wrong. Stating the null explicitly is what made it visible. 2. NO UNIT TESTS. Added a #[cfg(test)] module, 7 focused tests: the H1 constant shift plus a falsifier that a structure-carrying seed would NOT be constant-shift; exact H2 gap outputs; the shipped constants including 17 = 4^2+1 (stride 4 over 16 covers only 4/16); the H3 population and agreement counts (8,064 / 360 / total); shared-levels as a prefix measure; histogram coverage. 3. EPIPHANIES TITLE still carried the withdrawn "REFUTED ... matched to 4-ary" conclusion that the body had already retracted. Corrected. 4. EXEC-RUN H2 labels said REFUTED where the verdict is NOT CONFIRMED. Corrected throughout. 5. MD040: histogram fence now tagged `text`. Both board records updated with the null-model result and dated markers. Gates 3/3 green; 7/7 unit tests; clippy -D warnings clean (example-scoped per repo practice — --all-targets pulls in pre-existing lint debt in helix's own lib tests, unrelated to this diff). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3RyLEbuNSHxxB3NTTrGki
|
All five addressed in #4 — the H3 threshold. You're right that Running it immediately failed my first formulation — and the failure was correct:
The rates do not coincide. The flat seed is not ancestry-neutral — it is mildly ancestry-averse: cells sharing an address prefix are numerically close, so they are less likely to be congruent mod 17. My "≈ chance level" phrasing was therefore also wrong, just less wrong than the threshold. The gate now asserts only the true, weaker claim — no ancestry lift — and reports the direction instead of assuming it. Falsifier: an eligible rate materially above base, which would mean the flat seed does carry ancestry. Worth naming: this is the second time in this probe that replacing a bad criterion revealed the replacement claim was also wrong (the first was the denominator, corrected twice). Both times, making the criterion explicit is what exposed it. A hand-tuned threshold can't fail informatively; a declared null can. #5 — unit tests. Added a #1 — EPIPHANIES title still carried the withdrawn "REFUTED … matched to 4-ary" conclusion the body had already retracted. Corrected — good catch, that's exactly the failure mode where a corrected record keeps its headline. #2 — exec-run H2 labels changed REFUTED → NOT CONFIRMED throughout. #3 — MD040 fence tagged One decline with a reason: clippy stays example-scoped. 3/3 gates green, 7/7 unit tests, clippy clean, fmt applied. Generated by Claude Code |
PROBE-CLAM-VS-HELIX-RESIDUEleg 0, following the merged #875 (E-WORDNET-MAKES-THE-4-ARY-ADDRESS-SEMANTIC-1) and the operator's division of labour: the 4⁴ fold is the ADDRESS, CLAM is the established CALCULATOR, HHTL + helix residue is the alternative — "exact address, exact spacial location / perturbation".The queued sweep did NOT run, and not running it is the result
The hypothesis was: a finer address makes more of the answer deterministic PLACE and less of it stored RESIDUE. Two failure modes were pre-registered before any measurement. Running them first was decisive.
H1 — the carving cannot reach the ruler (pre-registered (a): CONFIRMED, fatal)
from_hhtl(path: u64, depth: u8)has no parameter that could carry a carving, so level structure has no channel intofrom_place(p) = p % 17.A residue-vs-granularity sweep therefore cannot carry signal; its null would say nothing about 4⁴, and reporting "4⁴ doesn't help the calculator" from it would have been a false negative manufactured by the seam. The 4⁴ address result (24.71× out-of-cell band lift, 2.47-hop sub-nibble gap) is untouched.
H2 — the "stride 4 clumps" suspicion is NOT CONFIRMED (no design claim replaces it)
Gap spread (max−min; lower = more uniform):
[4,4,4,5]⚠ The design conclusion is WITHDRAWN. The premise that a 4-ary tier consumes four ruler steps is not wired into anything that ships:
ResidueEncoder::encodereads onlystart_offset(n=1,residue.rs:157);index/arcappear solely inwalk_spectrumand the crate's own tests; the shippedNiblePathisFAN_OUT = 16. The n=4 result is a property of a hypothetical consumer. This retracts a suspicion; it does not establish that the constants are "matched to 4-ary".H3 — the blindness is FIXABLE (a direction, not a dead end)
Per-tier seeding (one ruler per 2-bit group, folded with its level). Exhaustive over all 256·255/2 = 32,640 cell pairs — no sampling, no thinning.
The acceptance criterion is a declared null model, not a threshold — H0 = "the flat seed carries no ancestry information", so its agreement rate among eligible pairs must not exceed its rate among all pairs:
The flat seed gives no ancestry lift at all — and is in fact mildly ancestry-AVERSE, because cells sharing an address prefix are numerically close and therefore less likely to be congruent mod 17. Falsifier: an eligible rate materially above base, which would mean the flat seed does carry ancestry. The 100 % is asserted as a construction check, explicitly not as evidence.
The unblock is to feed the ruler the address's hierarchy, not its integer value — a helix API change needing its own review, not done here.
Eight defects across the arc, every one in a falsifier or a label — none in a measurement
flat_rate < 0.25would have passed at 24.9 % while the prose claimed ≈1/17. Replaced with the declared null above. (CodeRabbit)256 as u8 == 0made the loop empty) and correctly FAILED rather than passing on zero evidence. (self-caught)The transferable rules
Core-First compliance
CONSUMES
helix::curve_ruler::CurveRuler— nothing re-derived.Boundaries
Contents
crates/helix/examples/probe_hhtl_intake_blindness.rs— the probe: 3 gates + a#[cfg(test)]module of 7 focused tests (including a falsifier that a structure-carrying seed would not be constant-shift, and a check that stride 4 over 16 covers only 4/16 — the comma, pinned as a test).EPIPHANIES.md(E-THE-RULER-READS-THE-ADDRESS-AS-A-NUMBER-NOT-A-HIERARCHY-1) +exec-runs/hhtl-intake-blindness.md, both carrying dated⊘correction markers.Additive only — no change to helix's shipped API.
Verification: 3/3 gates green; 7/7 unit tests;
cargo clippy --manifest-path crates/helix/Cargo.toml --example probe_hhtl_intake_blindness -- -D warningsclean (example-scoped per repo practice —--all-targetspulls in pre-existing lint debt in helix's own lib tests, unrelated to this diff);cargo fmtapplied, with unrelated fmt drift in two other helix examples restored rather than carried.🤖 Generated with Claude Code
https://claude.ai/code/session_01K3RyLEbuNSHxxB3NTTrGki