Repository navigation
fix(seams): mirror current legacy walker in bounded inventory (arity + twin filter) - #7151
Conversation
…+ twin filter) c60f1ca squash-merged a stale bounded copy: 3-arg build_seam_from_shape call against the 5-arg definition (E0061, main does not compile) and a missing error_path_twins filter (bounded path would retain seams the legacy oracle never emits). Mirror the current legacy walker shape-for-shape and pin twin parity with bounded_matches_legacy_on_error_path_twins (fails without the filter).
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. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author self-review on exact head 05edf03 (COMMENT is the disposition record, not approval).
reviewed_head_sha: 05edf03
integration_basis: origin/main c60f1ca (broken base; this PR is the repair)
claim_boundary: #7150 only — restore compilation + twin parity in the bounded walker. No discovery/classification meaning change, no collector redesign.
changed_surfaces_inspected: full diff (seam_inventory.rs 47+/2-); legacy seams_from_index_files 2484-2512 vs bounded 2645-2685 line-compared; error_path_twins contract (rust_index.rs 255-304); new oracle test.
blocking_findings: none.
verification:
- Root cause confirmed, not inferred: E0061 reproduced from the gate log (2667 call vs 2689 def) and re-verified in the base tree; cargo check Finished post-fix.
- Mirror fidelity: per-file body now matches legacy statement-for-statement (empty skip, owner lookup, line index, twins zip + skip, 5-arg call); only the sink differs (collector.push vs seams.push), which is the claimed delta. build_line_starts already imported (line 36).
- Oracle grip: twin test asserts twins exist in-fixture (failed-vacuous impossible) and bounded == legacy at 3 limits; filter-removal mutation FAILS the test (observed), filter present passes.
- Suites: seam_inventory 102/102, repo_exposure 103/103, classification 41/41; fmt + clippy clean.
proof_or_review_missing: exact-head hosted gate (just marked Ready).
residuals: none new; #4997 correction posted. Main-red urgency noted: every merge-ref gate is red until this lands.
disposition: REVIEW_INCOMPLETE until exact-head Ripr Rust Small Result succeeds.
There was a problem hiding this comment.
Code Review
This pull request updates inventory_seams_from_index_bounded in crates/ripr/src/analysis/seam_inventory.rs to filter out error-path twin shapes, aligning its behavior with the legacy walker. It also optimizes performance by building the line index once per file and reusing it when deriving spans for each shape. Additionally, a unit test has been added to verify that the bounded walker correctly drops these twin shapes. There are no review comments, so I have no feedback to provide.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. Summary by CodeRabbit
WalkthroughThe bounded seam inventory now skips error-path twin shapes before constructing seams. A regression test compares bounded results with the corresponding legacy inventory results under multiple limits. ChangesBounded inventory parity
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The bounded inventory change appears aligned with the legacy behavior, with no specific merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 3 | ❌ 1 | ❓ 1❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation For Full details: Description checkExplanation The description explains the production change, test evidence, acceptance status, non-goals, and rollback. However, it omits most required template sections, including source boundary, source-of-truth links, candidate relationships, scope classification, support-tier and policy impact, claim boundary, traceability, static language check, engineering check, and gate statuses. Resolution Complete the repository template. Add the missing required sections and record applicable values, use
✨ Finishing Touches 💡 1📝 Generate docstrings
🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
A rabbit checks the seams in rows, Comment |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Sibling-path coverage limited to seam_inventory.rs in this diff; no other inventory_*_bounded or collector-push sites were changed. Within PR scope the bounded walker is the sole site.
Verification questions
- Confirm new oracle test bounded_matches_legacy_on_error_path_twins asserts non-vacuous fixture (twins.contains(&true) guard) and parity at 3 limits (None/full/K=1). Mutation test (filter removed) FAILS as required - test is load-bearing for the contract, not decorative.
Refuted
- The oracle test bounded_matches_legacy_on_error_path_twins could pass vacuously if the fixture yielded zero twins; refuted because: Test explicitly asserts
if !twins.contains(&true)and returns an error otherwise, so a vacuous pass is impossible. - Line-starts hoisting belongs in a dedicated helper or further up the call chain to avoid per-file recomputation when many files share a source map.; refuted because: Further hoisting would require sharing source bytes across FileFacts (ownership change) or a global cache keyed by file path (introduces statefulness and invalidation surface). Per-file computation is the correct boundary given Facts<'a> borrows; recomputation cost is bounded by file count, not shape count, and the prior per-shape cost was strictly worse.
- Twin filter is a behavior change beyond parity (adds new filter not in legacy); refuted because: Twin filter is explicitly mirrored from legacy; error_path_twins contract is the legacy walker contract; removing it is what changes parity (mutation-verified).
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY — exact-head review of 05edf03fa (main-red repair; gate green, 0 threads).
- Production hunk mirrors the legacy walker line-for-line:
probe_shapes.is_empty()early-continue, per-filebuild_line_starts(&facts.source),error_path_twins+ skip, 5-argbuild_seam_from_shape. I independently derived the same fix from reading the legacy walker (:2489-2511) before this PR surfaced — the two match exactly. - Oracle (live, non-vacuous):
bounded_matches_legacy_on_error_path_twinsasserts the fixture yields a twin, then bounded==legacy at 3 limits; without the filter the twin seam would fail the equality. - Fail direction: compile fix (no behavior choice); the twin filter only drops seams the legacy oracle never emits (parity direction, covered by the pre-existing
bounded_unlimited_equals_legacy_exactlyfamily plus the new test).
Merging on the green required gate to un-red main.
Candidate-head rust compile was blocked by the inherited 3-arg build_seam_from_shape call. #7151 landed that repair on main; this lane stays test-only. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
seam_inventory bounded loop: take main's #7151 loop head (the twin filter and its comment); the shared 5-argument build_seam_from_shape call with the per-file line index already converged from both sides. Local proof on the merged tree: cargo build --bin ripr 0 errors; fmt --check clean; clippy -p ripr --all-targets -D warnings clean; cargo test -p ripr --lib classify + seam_inventory + classifier + proximity = 945 passed; helper_wrapper_reach 19 passed; cargo xtask goldens check exit 0; cargo xtask verdict-corpus check exit 0 (350 cases, 67/350 false verdicts, 2/454 contradictions); policy cascade (no-panic-family, process-policy, allow-attributes, static-language, executable-files, network-policy, lint-policy) all exit 0.
…; keep both sides Conflicts in 3 files, all append-adjacent: traceability.toml (keep PR test entry + 4 main entries), RIPR-SPEC-0222 (same), store.rs thread-locals (keep LOCK_WAIT_OVERRIDE + PLAN_MODEL_MISMATCHES + MODEL_SKEW). No semantic choice; PR lock code intact. Local proof deferred: main is red until #7151 lands.
…precisely cache gc collected every regular file including <stem>.lock, so TTL/size deletion could unlink a held lock and let a second writer lock a fresh inode at the same path (Devin BUG + CodeRabbit threads). Exclude .lock files under either sharded layer from both selection sites, with the layer half matched against the shared producer inventory. Regression test pins both layers. Also replace trim_end_matches(.json) with strip_suffix at both lock-name sites (Gemini low); behavior-identical on hex-digest filenames, so no dedicated test. STAGED: unpushed, proof deferred until main is green (#7151).
…ication (#5350) (#6782) * fix(cache): hold a per-key advisory lock across classified-cache publication (#5350) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LDXUGxuP9Eo5X9tkRcuteG * fix(cache): keep publication locks out of GC; strip lock-name suffix precisely cache gc collected every regular file including <stem>.lock, so TTL/size deletion could unlink a held lock and let a second writer lock a fresh inode at the same path (Devin BUG + CodeRabbit threads). Exclude .lock files under either sharded layer from both selection sites, with the layer half matched against the shared producer inventory. Regression test pins both layers. Also replace trim_end_matches(.json) with strip_suffix at both lock-name sites (Gemini low); behavior-identical on hex-digest filenames, so no dedicated test. STAGED: unpushed, proof deferred until main is green (#7151). * fix(cache): propagate competing-publish error instead of expect in race test Strict clippy (-D warnings) rejects expect() in the publication race test added for the Devin ANALYSIS thread. Capture the competing status Result in the shared cell and transpose it outside the commit hook so a real error fails the test with its message. Proof: publication suite 8/8, seam_cache 147/147, xtask cache 15/15, clippy clean, fmt clean. * docs(6782): record commit-window race test in SPEC-0222 test mapping and traceability --------- Co-authored-by: Claude <noreply@anthropic.com>
…ck (#7150) (#7153) * docs(learnings): stale-basis squash needs a combined-tree compile check (#7150) * docs(learnings): re-route toggles do not refresh the merge ref (#6686) After #7151 repaired main, the toggle-only re-route of #6686 still tested a pre-fix merge ref. Record the push-to-refresh rule and the ancestry check. * docs(learnings): grammar and epistemic precision on the merge-ref rule (#7153 review) Comma after By merge time (Gemini); drop the unsupported only-a-push exclusivity claim while keeping the verified push-recomputes behavior (CodeRabbit).
Closes #7150.
Production delta (crates/ripr/src/analysis/seam_inventory.rs, single file, 47+/2-)
c60f1ca (squash of #6836) landed a bounded walker written against the Oct-5 tree: a stale 3-arg build_seam_from_shape call against the current 5-arg definition (E0061 — main does not compile) and a missing error_path_twins filter (bounded path would retain seams the legacy oracle never emits). This mirrors the current legacy walker shape-for-shape: empty-shapes skip, per-file line index, twin computation + skip, 5-arg construction call.
Evidence delta
New oracle test bounded_matches_legacy_on_error_path_twins: error-path fixture asserting twins exist (non-vacuous) and bounded == legacy at None/full/K=1 limits.
Acceptance
Proof run
cargo check -p ripr --lib (Finished 1m05s)
cargo test -p ripr --lib seam_inventory (102 passed)
cargo test -p ripr --lib repo_exposure (103 passed)
cargo test -p ripr --lib classification (41 passed)
cargo test -p ripr --lib bounded_matches_legacy_on_error_path_twins with filter removed (FAILED as required)
cargo fmt --check -p ripr (clean); cargo clippy -p ripr --lib (no warnings)
Head: 05edf03. Rollback: revert this commit (main stays red without it). Non-goals: no discovery/classification meaning change, no collector redesign.