Repository navigation
fix(check): print eligible seam repair line in drill-down (#8166 Slice C) - #8320
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 33 minutes. View limit details
Comment |
|
Exact-head review (author self-review, COMMENT disposition): |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Verification questions
- Confirm per-fixture RIPR-SPEC-0001 blessing entries all cite 'the fixture seam is the repair-eligible weakly gripped boundary gap' — plausible because the 10 fixtures are boundary-gap variants, but worth verifying rust_async_fn_owner and snapshot_oracle actually expose an eligible seam.
- Confirm producer shadows
repair_packet_eligibilityas a local call inside the closure; if it resolves to a different item than Slice A's, eligibility could silently diverge. - Confirm navigation now carries both stub_route (Slice #5471) and repair_route (#8166 Slice C) as Option on the same FindingNavigation; repair_route_for scopes the route to its own finding_id, so a finding-bound route cannot leak into a sibling finding's drill-down line. Cross-finding contamination is checked by the negative branch of bounded_human_output_prints_repair_only_for_the_routed_top_finding.
Refuted
- An attacker could craft a fixture whose seam_id contains shell metacharacters to break out of
shell_argwhen the user copy-pastes the repair line.; refuted because: seam_id is a content hash produced by the classified-seam inventory (e.g.67fc764ba37d77bd,0f9205182aabd9d2); the producer only accepts it after repair_refusal_reason returns None, which gates it through the same authority resolve_repair_subject uses.shell_argquotes any character that needs quoting on POSIX and PowerShell. - Adding a live inventory call inside the check render path could capture or transfer a non-Send handle across a worker boundary; refuted because: check_repair_route and its call site are plain synchronous Rust; no tokio::spawn, no async fn, no wasm_bindgen, no napi, no crossbeam channel, no Arc<Send+Sync> transfer is introduced. The seam inventory is consumed and dropped within the same stack; no resource is held past the call.
- A typed/sealed buffer view (ArrayBuffer/TypedArray/DataView/SharedArrayBuffer) is constructed or detached by the repair route or its renderer, and a stale length snapshot is observed after resize/transfer.; refuted because: The diff is pure Rust CLI text output. No ArrayBuffer/TypedArray/DataView, no resizable-buffer surface, no
Box<[T]>orVec<[T]>aliasing, and the only newly-constructed view-shaped value isrepair_suffix: Stringplus theseam_id: Stringandfinding_id: Stringfields ofRepairRoute, all owned Strings with no length aliasing. The check_repair_route producer holds a local Vec for the duration of the function and copies the seam id into an owned String before returning, so no stale view can outlive the producer. - check_repair_route prints the probe: finding ID whenever finding_for_seam binds via canonical_gap_id, bypassing the seam-id selection.; refuted because: The producer returns entry.seam.id().as_str().to_string() (the seam hash), and the renderer formats ripr repair {shell_arg(seam_id)} — the bounded render test asserts !rendered.contains("ripr repair probe:").
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Parked follow-ups
- Drill-down render pushes explain/context/repair commands in three separate push_str calls rather than reusing a vector-of-commands helper used by stub_route branch — small duplication risk if format changes again.
- Parked follow-up: PR body limitation notes a
--worktreerepair line names a seam in the dirty tree, whileripr repair's before phase still pins HEAD and will name its commit-first recovery for dirty production files. The facade positive test commits the worktree edit (git add src/lib.rs+ git_commit) before runningripr repair <identity>, so it exercises the pinned-HEAD path, not the dirty-tree real-world scenario. A separate assertion that the printed worktree identity still resolves throughripr repair --worktree(or that the bounded output's identity matches the seam thatripr repair --worktreewould pick) is out of scope for Slice C and parked. - Eight pre-existing ts_repair_packet_* golden quoting entries drift on Windows PowerShell but reproduce on base 60a22c6, so they are unrelated to this PR. Parked for a future golden-portability pass; not re-blessed here.
- Parked: 10 golden fixtures now hard-code seam IDs (
67fc764ba37d77bd,0f9205182aabd9d2,832e8014674b0ece) in their expected human.txt. The seam ID is content-addressed over the seam's predicate source bytes, so any future change to that source (reflow, comment, whitespace, predicate re-parenthesization) will silently re-hash and require 10 simultaneous re-blesses. Slice A/B refactors that touch predicate byte content will collide with these goldens. Not a Slice C defect, but a blast-radius note worth flagging for the next slice touching predicate invariants.
|
Independent exact-head review (fresh reviewer, not the author), head Verified
Non-blocking, worth a follow-up or a quick fix
Not verified: latency, Generated by Claude Code |
…-drilldown # Conflicts: # fixtures/boundary_gap/expected/CHANGELOG.md # fixtures/boundary_gap_multiline_assert/expected/CHANGELOG.md # fixtures/boundary_gap_nested_tests/expected/CHANGELOG.md # fixtures/boundary_gap_reordered_tests/expected/CHANGELOG.md # fixtures/editor_lsp_workflow/expected/CHANGELOG.md # fixtures/mixed_rust_typescript_preview/expected/CHANGELOG.md # fixtures/predicate_empty_macro_boundary/expected/CHANGELOG.md # fixtures/rust_async_fn_owner/expected/CHANGELOG.md # fixtures/snapshot_oracle/expected/CHANGELOG.md # fixtures/unrelated_test_mentions_token/expected/CHANGELOG.md
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Current-head integration/performance review for The default human The correctness gates and round-trip tests are useful, but they do not demonstrate acceptable response latency. Please retain an explicit disposition under #8202/#8158: measure the same single-file changed input on current main vs this head, cold and warm, report time to the original finding/answer as well as total runtime, and inspect a large workspace. If materially slower, preserve the repair affordance without requiring a full unbounded inventory on every ordinary The absence of a current measurement is not proof of a slowdown of any particular magnitude. It is an unclosed performance acceptance question on the default UX, not reason to repeat hosted CI before the focused issue is resolved. |
CI Failure Diagnosis on Rust Gates (
|
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Lane scope (JS-backed worker handoff, async capture, GC, detach, transfer) is not exercised by this Rust-only diff; no public issue to raise. Coverage bounded above.
- check_repair_route re-runs inventory_classified_seams_at_with_config on every bounded human check over live files; mirrors the cost pilot already pays but introduces a second caller of the same (possibly uncached) inventory in one call. Worth a profile log but not a blocker; the producer gates on the same inventory path Slice A already validated.
Refuted
- RepairRoute.finding_id stored by value could dangle if FindingNavigation reparents a dropped seam inventory String into the route.; refuted because: RepairRoute fields are String (owned); the printed seam_id is entry.seam.id().as_str().to_string() — a fresh allocation owned by the route. No references into the inventory cross the navigation boundary.
- Lane focus (resizable buffers, ArrayBuffer/TypedArray detach/transfer, stale length snapshots) does not apply; this PR is pure String formatting of repair commands.
- Resizable buffer / active view / stale length snapshot risk introduced by the new repair line.; refuted because: Diff contains no Vec/Box/array-buffer resize, no detach/transfer, no length snapshot; the change is a String printed under the existing shell_arg authority and gated by the Slice A repair_refusal_reason.
- Could the seeded seam inventory loaded inside
check_repair_routerace with concurrent producers and double-count or hand off a stale entry across worker boundaries?; refuted because: All inventory work executes synchronously on the existing check task before the renderer is constructed; no spawn, channel send, or backgrounded cache is touched by this PR, so there is no cross-worker memory hand-off to corrupt.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Confirmed findings
- finding_navigation_repair_command_names_item_then_bound_root asserts
repair_command("67fc764ba37d77bd")returns the expected formatted string and that FindingNavigation::legacy() omits--root. The legacy() branch could be tautological:repair_suffixis initialized to empty String, so legacy omits the suffix trivially. Consider asserting that legacy() with a populated root (via finding_navigation_with_worktree) still does not produce a repair suffix when no worktree is requested. - Seeded prior-thread evidence (EffortlessSteven 2026-10-17T04:46:47Z) documents CI failure on rust gates due to branch predating PR #8275's
(analysis complete)verdict change at cli_smoke.rs:17588. The current head 30744f3 is from the same branch; a rebase onto origin/main is required before ready_for_review to avoid reproducing that failure. - crates/ripr/src/app/task_first.rs:318 — check_repair_route re-runs inventory_classified_seams_at_with_config on every bounded human check over live files with a canonical-gap top finding. The stub-route comment explicitly says it parses only the selected file and performs no workspace index; this new path now calls the same inventory twice (once for stub eligibility, once here) on the primary first-use surface. On a large repo this can materially regress cold-cache latency observed in #8202. Consider threading the inventory already computed by check_stub_route, or caching the (root,config) result keyed on the same inputs.
- CI red on
cli_smoke::check_python_finding_with_repair_card_points_at_the_cardatcli_smoke.rs:17588is caused by a stale(preview_limited)expectation that PR #8275 (1187b906b) superseded with(analysis complete). Re-resolving the branch onto currentorigin/mainis required to actually exercise the new tests in CI; this is not a test bug but a rebase need for any green CI claim.
Verification questions
- Confirm positive facade test commits the worktree predicate edit before running
ripr repair, mutating the fixture and the working tree the check just observed; the printed seam_id depends on the on-disk bytes matching HEAD, so the commit must produce byte-identical content for that seam. - Confirm goldens: exactly 10 human.txt files gained exactly one inserted line each; remaining ts_repair_packet_* drift reproduces on base 60a22c6.
Refuted
- RepairRoute.seam_id could carry arbitrary bytes that break out of shell_arg when printed into the repair next-step line and round-tripped through a shell, so the diff undermines active-view safety; refuted because: Did not hold: seam_id is the content hash produced by inventory_classified_seams_at_with_config (e.g. 67fc764ba37d77bd, 0f9205182aabd9d2, 832e8014674b0ece) confirmed across the 10 fixture goldens and the independent reviewer at dff3656; shell_arg wraps the same value used by explain/context. No array/buffer view semantics exist in the touched Rust surface.
- repair_route_for(filter on finding_id) could let a parent navigation outlive a reparented RepairRoute by aliasing the old finding_id String.; refuted because: RepairRoute is owned String and FindingNavigation does not mutate fields after construction in the rendering path; filter returns a borrow into self, not into any transient source.
- RepairRoute fields stored by value could dangle if FindingNavigation reparents a dropped seam inventory String into the route; refuted because: RepairRoute fields are owned String; seam_id is built via entry.seam.id().as_str().to_string() — fresh allocation owned by the route. No references into the inventory cross the navigation boundary.
- The new repair line could expose a resizable-buffer/ArrayBuffer detach path via the seam-id string flowing into shell_arg.; refuted because: There is no ArrayBuffer, TypedArray, resizable buffer, SharedArrayBuffer, worker, postMessage, or WASM boundary in this Rust diff; shell_arg operates on &str only. Lane scope is not exercised by a pure String-formatter change.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Parked follow-ups
- Pre-existing
ts_repair_packet_*golden drift on the Windows shell is reproduced on unmodified base60a22c668; explicitly out of scope for Slice C and should be parked rather than broadened into this PR.
There was a problem hiding this comment.
Confirmed findings
- repair_route_for scopes by finding_id but the FindingNavigation struct now carries three Option fields (stub_route, repair_route, plus the new repair_suffix String). No test asserts repair_command omits --root on a non-legacy navigation without a worktree — the legacy() branch is the only oracle. A with_worktree navigation without a populated root_arg would silently print ' --root ' suffix.
- Default human
ripr checknow invokes inventory_classified_seams_at_with_config per invocation when a top finding has canonical_gap, adding cold-cache latency to the primary first-use path. Not a security issue but a DoS-adjacent resource concern under #8202/#8158; a profile log or cache layer should be considered.
Verification questions
- Confirm truncated-inventory negative uses RIPR_REPO_EXPOSURE_SEAM_LIMIT=1 over a two-seam fixture; the route producer gates on limit_info.analyzed < limit_info.total, but this oracle only covers the exhausted-limit branch, not a 'seam inventory failed to build' branch.
- Confirm smallest-complete-fix check: helper shape is correct (producer beside resolver, navigation carries Option, renderer guards on finding_id match) but check_repair_route adds a second caller of inventory_classified_seams_at_with_config on the bounded human path — call out to central proof for a cold-cache latency measurement on the same single-file diff used in #8202.
- Confirm source-route coverage could not inspect sibling surface hunk-by-hunk: human.txt goldens are +1 line per file but per-fixture RIPR-SPEC-0001 reasoning text in the 10 CHANGELOG.md entries is template-equal ('fixture seam is the repair-eligible weakly gripped boundary gap') — verify rust_async_fn_owner (seam 0f9205182aabd9d2) and snapshot_oracle (seam 832e8014674b0ece) really expose an eligible weakly-gripped boundary gap, since PR-text only asserts plausibility.
- Confirm ineligible negative control uses a semantics-preserving predicate edit
(amount) >= discount_thresholdto keep the seam gripped while still surfacing a check finding — needs the assertion to hold that check drill-down still appears, otherwise the test is vacuously true. - Confirm truncated-inventory test only asserts stdout absence and inspects stderr; an attempt side-effect from the inventory limitation path is not asserted.
Refuted
- Truncated-inventory test could pass vacuously if RIPR_REPO_EXPOSURE_SEAM_LIMIT=1 does not actually trip the limit on the two-seam fixture (e.g. the fixture only surfaces one seam under check).; refuted because: Fixture is named 'two_seam' and weaken_boundary_predicate is applied to surface the seam that the bound check finding references. The test also asserts the drill-down block appears, so the check finding exists. Truncation branch exercised.
- RepairRoute.finding_id stored by value could dangle if FindingNavigation reparents a dropped seam inventory String into the route.; refuted because: RepairRoute fields are owned Strings; the seam_id is entry.seam.id().as_str().to_string() — a fresh allocation. No references into the inventory cross the navigation boundary, refuted by the prior reviewer.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
Parked follow-ups
- Park: rebasing onto current main to pick up PR #8275's (analysis complete) verdict change (CI failure 39002476717). Not part of Slice C semantics; should stay an integration/PR-management follow-up.
- Park: cold-cache cost of check_repair_route calling inventory_classified_seams_at_with_config on every canonical-gap bounded check. Belongs under #8202/#8158 latency disposition, not Slice C correctness.
check_repair_route built a second full-workspace classified seam inventory during human ripr check, spinning artifact tests that run check against the whole workspace root indefinitely. Derive the route only from evidence the check run already computed: the selected finding's canonical gap names its file and its related tests name the evidence files, so classify only that file's seams over a bounded index of those files. Fail closed on a seam-limit-truncated candidate set, ambiguous binding, ineligibility, or any unreadable authority; ripr repair still re-checks admission against the full inventory before starting an attempt.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Confirmed findings
- Lane ub-active-view (resizable buffers, ArrayBuffer/TypedArray detach/transfer, stale length snapshots) is not exercised by this Rust-only diff; no public issue to raise. Coverage bounded in internal_audit.
- check_repair_route allocates a per-invocation classified seam vector bounded to one file plus related-tests; cold-cache impact on a large workspace is not measured, only deferred to a future profile log under #8202/#8158.
- Seeded thread notes CI failure (#8275 verdict change) on a head predating PR #8275 and an unresolved latency concern on inventory_classified_seams_at_with_config re-runs. The slice-C diff here uses a new bounded helper that does not call the workspace inventory, so the latency concern is scoped to that helper; the CI rebase concern is posture-only. Both are non-blocking for this security lane but should not be marked resolved-check without a fresh CI pass.
Verification questions
- Confirm fail-closed coverage of the route producer: no route on missing canonical_gap, load_for_root error, classify_seams_in_file_with_related_at_with_config error, configured seam limit exceeded (Ok(Some((limit,))) if classified.len() > limit), unbounded limit-info read error (Err()), zero binding seams, >1 binding seams, repair_refusal_reason refusal, or repair_packet_eligibility canonical_gap_id mismatch. Each of these returns None and the bounded renderer therefore prints no
ripr repairline. This blocks an exploit path where a misleading or truncated inventory grants a repair start for the wrong seam. - Confirm bounded_human_output_prints_repair_only_for_the_routed_top_finding asserts the negative branch via 'repair_route_for probe:other' returning a route whose finding_id does not match the top finding's id; the route itself is built and stored, only the renderer gates on finding_id. Oracle is non-tautological for the cross-leak axis, but it does not exercise a top-finding whose own canonical_gap is None or whose related_tests is empty.
- Confirm new bounded inventory scope classify_seams_in_file_with_related_at_with_config classifies only the gap file's seams with grip evidence from named related_tests; if evidence_files ends empty the index still builds from [file] alone and may misclassify a seam gripped by an un-named test as a gap.
- Confirm pR body claims bounded_human_output_suggests_explain_and_context_for_top_finding as a render-contract assertion, but the diff only adds bounded_human_output_prints_repair_only_for_the_routed_top_finding; the explain/context line is asserted only inside bounded_human_output_suggests_explain_and_context_for_top_finding which is not part of the PR diff hunks.
- Confirm each fixture's expected/CHANGELOG.md gains a 'Pending' section citing RIPR-SPEC-0001 even when CHANGELOG entries are not pending (the human.txt diff is the only artifact blessed). This editorial pattern diverges from the surrounding template and the existing RIPR-SPEC-0122 entry it sits beside uses a different layout; human reviewer should confirm the goldens-bless workflow expects a Pending wrapper for routine blessed-output entries, not just for genuinely unreleased changes.
- Confirm test_first_facade.rs check_drill_down_* tests drive the binary via std::process::Command rather than the in-process facade; human-full/JSON assertions run separately and don't reuse the printed identity, so a torn read between two invocations is possible if the fixture is dirty between calls.
- Confirm 10 fixture goldens each gain one line
ripr repair <id> --root <cwd>; per-fixture RIPR-SPEC-0001 reasons all cite the same generic phrase.snapshot_oracleandeditor_lsp_workflowproduce67fc764ba37d77bdwhilerust_async_fn_ownerproduces a different seam id (0f9205182aabd9d2); the blessing reason is identical across all 10. A reviewer verifying the strongest claim (every blessed fixture is genuinely the eligible weakly-gripped boundary gap) would want each fixture'sgiven/whencross-checked -- not visible in the patch but feasible via xtask.
Evidence gaps
- check_repair_route producer's classify_seams_in_file_with_related_at_with_config Err branch is exercised only by the truncated-inventory facade test (via limit truncation, not a build error). A failure of the new helper to build an index (bad rust_index::build_index_with_test_harnesses) has no oracle.
- Model proof intent was rejected by deterministic validation.
#8166 Slice C — check drill-down repair parity
Slice plan and reconciliations: #8166 (Slice A merged in #8273
9d7c4c7c, Slice B merged in #827860a22c668; base of this branch is60a22c668).Problem
Bounded human
ripr checkoutput printed onlyripr explainandripr context --atunderNext: drill into the top finding:, even when the top finding's seam was repair-eligible. The check → explain → eligible-repair journey dead-ended at the first surface, and the only identity on that surface was theprobe:finding ID thatripr repairexplicitly refuses.Fix
app::task_first::check_repair_route(new producer, next toresolve_repair_subject) selects the same top finding the bounded renderer selects, binds it to seams through the sharedfinding_for_seamauthority over the live classified-seam inventory, and admits it only through the shared Slice A gate (repair_refusal_reason=repair_packet_eligibility+AgentBriefPolicy). Fail-closed: truncated inventory, zero/several binding seams, ineligible/policy-omitted seam, or unreadable authority → no route.FindingNavigationcarries the route (mirroring the agent stub:checksuggests "Write a test for it: ripr agent stub" on gaps the stub then refuses (0 of 3 agent-as-user targets got a stub) #5471 stub route); the bounded human triage renderer printsripr repair <seam-id> --root <bound-root>after explain/context only when a route exists. The printed identity is the exact seam ID, so it round-trips throughresolve_repair_subjectto the same seam — never aprobe:ID.--format humanon live files (same gate as the stub route). Per-format verification: bounded human gains the line; human-full keeps its per-finding explain/context drill-in only (asserted in the render test and the facade test); JSON gains nothing (asserted in the facade test); other formats never receive the navigation route.Acceptance matrix
ripr repair <identity>naming the resolver-accepted identitycheck_drill_down_prints_repair_identity_that_starts_the_same_seam(facade, real binary): parses the printed identity, asserts it is notprobe:, runsripr repair <identity>→ exit 0, exactly one attempt, manifestseam_id== printed identitycheck_drill_down_omits_repair_when_top_seam_is_not_eligible(gripped boundary = Slice A ineligible state, semantics-preserving predicate edit)check_drill_down_omits_repair_when_seam_inventory_is_truncated(RIPR_REPO_EXPOSURE_SEAM_LIMIT=1over a two-seam fixture)bounded_human_output_prints_repair_only_for_the_routed_top_finding(route for top finding prints; route for another finding does not; human-full unchanged),bounded_human_output_suggests_explain_and_context_for_top_finding(no route → no line),finding_navigation_repair_command_names_item_then_bound_rooteligible top finding must print a ripr repair next step:with explain/context-only drill-down. Negative controls passed pre- and post-fix as guards.Goldens
cargo xtask goldens check: 10human.txtfixtures gain exactly one line (+ ripr repair <seam-id> --root <fixture>) and were blessed individually withRIPR-SPEC-0001: … (#8166 Slice C)reasons (fixture seam is the repair-eligible weakly-gripped boundary gap, visible in each fixture's given/when). No blanket re-blessing. Remaining drift after blessing is the 8 pre-existingts_repair_packet_*shell-quoting entries, reproduced identically on the unmodified base (60a22c668) in this Windows shell — untouched by this PR.Tests run (Windows, PowerShell)
cargo test -p ripr --test task_first_facade check_drill_down→ 1 failed (eligible), 2 passed.cargo test -p ripr --test task_first_facade→ 24 passed.cargo test -p ripr --lib output::human→ 191 passed; navigation + new render tests pass.cargo xtask check-fast: base pass (0 files); committed candidate pass (14 gates ran, 29 files changed, matchinggit diff --name-only origin/main...HEAD).cargo xtask check-traceabilitypass,cargo xtask precommitpass (after routing the canonical-gap read throughrepair_packet_eligibilityper check-architecture and removing a thirdCommand::newper check-process-policy).cargo xtask check-fastandcargo check -p ripr --all-targetspass on exact base60a22c668.Limitations
--worktreerepair line names a seam in the dirty tree;ripr repair's before phase still pins HEAD and will name its commit-first recovery for dirty production files (existing behavior, exercised in the round-trip test).Rollback
Revert this commit; the repair line disappears and explain/context drill-down is byte-identical to base. No schema, attempt-store, or ID-format change to migrate.
Non-goals honored: no Slice A/B changes, no #8207, no agent-repair changes, no JSON schema changes. Draft only — no auto-merge.