test(d-ign-b): the corpus produced nothing to read — fix the fixture, not the digest - #903
Conversation
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: serverGenReqId_38a4fc5d-ccd3-40d6-80b8-86394de19432) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughChangesThe lens test now uses structured synthetic windows with varied extraction patterns and owner-aligned sizing. L1 checks for non-empty readouts before comparing digests. Project notes document the prior collision and the unverified real-corpus path. Lens test corpus validation
Estimated code review effort: 3 (Moderate) | ~20 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@crates/lance-graph-supervisor/tests/d_ign_b_lenses.rs`:
- Around line 925-943: Update the assertion in the L1 precondition loop over
r_kant and r_witt so its failure message identifies the specific failing lens
readout and states that the corpus lacked the structures required by that lens,
rather than claiming the corpus produced no extractable content overall or that
the digest comparison must be empty-vs-empty. Keep the per-readout non-empty
assertion and its behavior unchanged.
🪄 Autofix
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: f2d74d51-b671-486f-8382-a79394572fbb
📒 Files selected for processing (3)
.claude/board/EPIPHANIES.md.claude/board/ISSUES.mdcrates/lance-graph-supervisor/tests/d_ign_b_lenses.rs
… not the digest
`cargo test -p lance-graph-supervisor --features cycle-driver --test
d_ign_b_lenses` failed at L1's can-fire half: z=3 (Kant) and z=4
(Wittgenstein) over byte-identical rows digested identically to
15130871412783076140. That constant is `DefaultHasher::new().finish()`
— the hash of zero bytes. Both readouts were EMPTY.
Root cause is the corpus, not the lenses. `synthetic_corpus` emitted
"d-ign-b synthetic verse {i} token{salt}", which carries no copula, no
auxiliary, no modal, no typed relational verb and no `-ed` morphology,
so `stance::stream` never arms a predicate and emits zero statements.
Empty arena + empty ReadOut => all four `stance_panel` arms empty =>
every lens digests the same. `stance.rs` is untouched: it was never at
fault.
Pre-existing at f9206fc, and newly VISIBLE rather than newly broken —
without `--features cycle-driver` the module is cfg'd out and the
binary runs 0 tests while reporting ok. Arming that CI gate ended a
vacuous pass; it did not cause a regression.
Explicitly NOT fixed by tagging the digest with a variant
discriminant. That turns it green instantly and makes the cross-lens
`!=` pass by construction of the tag alone, for any input — the
vacuous-assertion shape the falsifiability rule rejects, which
`digest()`'s own doc comment forbade in advance.
The fix — `synthetic_window(w)` builds each 48-verse owner slice from
templates the shipped clause machine genuinely extracts from:
* affirm-then-negate / negate-then-affirm pairs on one term
(`revise_at` records |f1-f2| = 0.85, clearing Hegel's 0.05 floor,
with both flip directions legible from the provenance endpoints
for Nietzsche's Transvaluation/Devaluation);
* "they knew that they were X" (perception verb + complementizer
inside the 3-token window) for Kant's ReadOut::lifts;
* "<effect> because <cause>" for Wittgenstein's impl-cause/
impl-effect games, on top of the Inh games every emission feeds.
Predicates are `{stem}{window:02}{n:02}` nonsense syllables, chosen to
collide with no catalogue the machine consults.
The window SHAPE varies with w % 5|3|7, coprime with the stride-4
arming cycle. Three of the four arms fold interned u16 ids, never the
strings, so structurally identical slices digest identically however
their tokens are spelled — renaming the vocabulary would have left
L4's ">=2 distinct digests" half unfalsifiable.
L1 also gains a non-emptiness precondition checked BEFORE the digest
comparison, naming the corpus provenance. An empty corpus now reports
itself as a corpus defect instead of accusing the lenses.
Falsifiability verified in both directions, not asserted:
* `run_lens(4, ..)` returning the Kant arm => L1 fails on
1790839806321388433, a NON-empty digest, so the assertion still
discriminates content;
* restoring the pre-fix filler => the new precondition fires with
the corpus-defect message.
Measured after the fix: all four arms non-empty on the twin base,
4/4 distinct digests over one owner, 4/7/6/6 across each lens's owner
set. Full `-p lance-graph-supervisor --features cycle-driver` suite
green (30 tests), fmt + clippy clean.
Board hygiene in the same commit:
* EPIPHANIES E-D-IGN-B-CORPUS-PRODUCED-NOTHING-TO-READ-1
* ISSUES ISS-D-IGN-B-REAL-CORPUS-PATH-IS-UNVERIFIED — the
$BLW_KJV_TSV branch has never executed here, and the two corpora
do NOT exercise the Hegel/Nietzsche arms alike.
50e0ea7 to
7f18d79
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
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: serverGenReqId_dd802a7b-2e3d-4c0b-a7f1-55634f592bdc) |
The failure
d_ign_b_lens_selection_over_byte_identical_rowspanicked at L1's can-fire half — two different lenses over byte-identical rows produced the same digest:That constant is
DefaultHasher::new().finish()— the hash of zero bytes. Both readouts were empty.Root cause: the corpus, not the lenses
load_or_synthesize_corpusreads$BLW_KJV_TSVor/tmp/kjv_verses.tsv; neither exists in CI, so it fell back tosynthetic_corpus, which emitted:That text carries no copula, no auxiliary, no modal, no typed relational verb and no
-edmorphology, sostance::streamnever setsarmedand emits zero statements. Empty arena + emptyReadOut⇒ all fourstance_panelarms empty ⇒ every lens digests identically.stance.rsis untouched — the lenses were never at fault.The test's own risk-check line had been printing
Hegel empty = true, Nietzsche empty = truethe whole time.Pre-existing, and newly visible rather than newly broken
Reproduced identically at
f9206fc. Without--features cycle-driverthe module is#[cfg]-ed out and the binary runs 0 tests while reportingok— the gate was recorded as standing but was unarmed. Arming it ended a vacuous pass; it did not cause a regression.What was explicitly not done
Folding a variant-discriminant tag into
digest()turns the collision green instantly — and makes the cross-lens!=pass by construction of the tag alone, for any input, forever. That is the vacuous-assertion shapeCLAUDE.md's falsifiability rule rejects, anddigest()'s own doc comment forbade it in advance (module-doc deviation 3 records an earlier draft being talked out of exactly this). The untagged digest is what made the empty corpus observable at all.What each lens actually extracts
contradiction > 0.05;revise_atsets that to|f₁−f₂|on a disjoint-stamp revisionstance.rs:418-427,belief.rs:191-205negatedflag — so both flip directions must be legiblestance.rs:483-496ReadOut::lifts— perception verb + subject +thatwithin the 3-content-token window + an emissionstance.rs:500-510,:237-243,:302-364Inh, lift knower/object,Implcause/effectstance.rs:512-532The fix
synthetic_window(w)builds each 48-verse owner slice from templates the shipped clause machine genuinely extracts from — affirm-then-negate and negate-then-affirm pairs on one term (Hegel + both Nietzsche directions),they knew that they were X(Kant),<effect> because <cause>(Wittgenstein's impl games on top of theInhgames every emission feeds), padded with plain affirmations. Predicates are{stem}{window:02}{n:02}nonsense syllables, chosen to collide with no catalogue the machine consults (STOP/AUX/negation/copula/modal/causal/perception/FAMILY_LEXICON).The non-obvious constraint
Three of the four arms fold interned
u16ids, never the strings behind them, and theInternerassigns ids by order of first appearance. Two slices with identical structure therefore digest identically however their tokens are spelled — renaming the vocabulary buys nothing, and L4's "≥2 distinct digests across the in-scope owners" half would have stayed unfalsifiable. So the window shape is driven byw % 5|3|7, deliberately coprime with the stride-4 arming cycle ((id - SPREAD_LO) % 4 + 1) so each lens's own owner set spans several shapes instead of landing on one residue class.The diagnostic the failure lacked
L1 now asserts each readout is non-empty before comparing digests, naming the corpus provenance. An empty corpus reports "the corpus produced no extractable content … this is a CORPUS defect, not a lens collision" — the original message was not merely unhelpful, it named a conclusion the evidence did not support.
The pre-registered z=3/z=4 witness pair is kept, and deliberately not re-picked now that Hegel/Nietzsche also fire.
Falsifiability — verified in both directions, not asserted
run_lens(4, …)returns the Kant arm → L1 fails on1790839806321388433, a non-empty digest. The assertion still discriminates content; it did not merely become unreachable.Measured after the fix:
Full
-p lance-graph-supervisor --features cycle-driversuite green (30 tests, no regressions);cargo fmt --checkclean; clippy clean for this target.Honest gap
The
$BLW_KJV_TSVbranch has never executed here — the file is absent from this environment and CI. The two corpora do not exercise the arms alike: the synthetic corpus plants a reversal in every window by construction, whereas in the real corpus reversals are rare and localized (the module doc records Hegel as measured constant-false on that shape), so settingBLW_KJV_TSVcould make L3 fail for z=1/z=2. Recorded rather than papered over.Board hygiene (same commit)
EPIPHANIES.md—E-D-IGN-B-CORPUS-PRODUCED-NOTHING-TO-READ-1(prepended)ISSUES.md—ISS-D-IGN-B-REAL-CORPUS-PATH-IS-UNVERIFIED(prepended)Scope: test fixture + board only. No production behaviour changed.
Generated by Claude Code
Summary by CodeRabbit
Tests
Documentation