Repository navigation
fix(cli): explain missing rerun gap-ledger recovery - #7405
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves the user experience when running ripr rerun --gap without the required --gap-ledger option. Instead of a generic error, the CLI now provides detailed, source-specific instructions (for both Rust and TypeScript) on how to generate the missing ledger. This change includes updated help text, a detailed error message during option parsing, comprehensive integration tests verifying the recovery steps, and updated specification documentation. There are no review comments to address, and I have no feedback to provide as the implementation is complete and well-tested.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Summary by CodeRabbit
WalkthroughThe change expands the missing- ChangesRerun Ledger Recovery
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This change improves the guidance shown when a gap ledger is missing, and the CLI still refuses the rerun as before. No concrete merge-blocking risk was identified. Pre-merge checks |
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent exact-head candidate review (read-only LLM reviewer; separate context and real-Bash oracle).
reviewed_head_sha: b09c818
integration_basis: 20be462
claim_boundary: #7354 option (a): discover existing source-specific ledger producers in missing-ledger refusal/help. No Rust diff-to-inventory ID translation or installed-release qualification.
Inspected the full committed diff, parse_options -> run ordering, existing root binding/Bash escaping, reports source/output path resolution, TypeScript and repo-exposure projectors, rerun identity resolution, help/spec/traceability, literal CLI oracles, red/green logs and published PR body. Refusal still precedes analysis/writes.
Independently exercised the frozen candidate under actual Bash rather than the test helper's argv parser. Binary version matched the full reviewed SHA; SHA256 746bba84174d532a28f20ee10a02e802af33fb0682227bc73121a818eb113e03. Four cases passed: absolute root with space; apostrophe/dollar/backtick/backslash; relative --root; default root rendered once then replayed from foreign CWD. Each refused with exit 2/no artifacts, then generated 1 record and reran with current_state_only / 1 matched record / 1 scope / 1 seam. The literal absent diff ID stayed limited/canonical_gap_unresolved / 0 seams.
Wrong-behavior controls: removing --root produced 0 seams and failed the positive oracle; feeding ordinary Rust check JSON to --check-output produced no_records/0 records despite 1 finding and did not resolve the repo ID. The frozen base had no capture guidance. These challenge root custody and the source/identity non-claim independently.
blocking_findings: none in source/oracle/contract.
non_blocking_suggestions: none requiring action.
proof_or_review_missing: terminal committed check-fast/precommit, required hosted Routed Rust Small jobs/test receipts; native Windows/macOS qualification for these new steps not claimed.
affected_currentness_dimensions: production, stimulus, oracle, public claim and traceability reviewed at this head.
cleanup: reviewer fixtures/cache/bin symlink removed; small raw logs/identity report retained for audit.
disposition: REVIEW_INCOMPLETE. Publication may qualify via ordinary Draft -> Ready. This COMMENT is the substantive independent review record, not author approval or merge authorization.
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm opposition: the parse_options (None,Some(_),None) branch returns a typed String error that is distinct from the typical anyhow::Error path; verify the upstream error_to_string or exit-code mapping still matches exit 2.
- Confirm opposition: TypeScript producer is mentioned in error/help but is only asserted as a substring; no test replays the --check-output path from a foreign CWD.
- Confirm parse_options now returns a multi-line error with embedded backticks; if the upstream reporter splits on whitespace or treats ` as a syntax marker it could mangle the message, but the smoke test reads stderr by UTF-8 string and passes. This is a coverage gap rather than a confirmed defect.
Refuted
- Objection: producing a ledger silently translates Rust diff finding IDs into repo-inventory identities, violating the PR's claim boundary; refuted because: recovered rerun with literal 'gap:rust:src/lib.rs:discounted_total:predicate_boundary:predicate:amount==threshold' yields state limited, matched_record_count 0, limitation.kind canonical_gap_unresolved, seams empty. ID translation is explicitly absent.
|
Verification response to the current UB review questions at head
The absent literal Rust diff ID still yields |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Independent published-head LLM review: REVIEW_READY
reviewed_head_sha: b09c818
independent_head_reread: 2026-10-11 21:43:23 UTC
integration_basis: 20be462
hosted_checkout: e56b7b3
claim_boundary: #7354 option (a): missing-ledger producer discovery and bounded ordinary-Rust recovery. No Rust diff-ID translation; #7354 stays open.
The independent reviewer inspected all seven changed paths, spec/traceability/changelog, parser -> actual dispatch/error rendering, root binding/Bash quoting, repo-exposure and gap-ledger producers, and canonical-ID selection. Refusal still precedes analysis/writes; help/spec/runtime agree. Literal argv/ID and nonzero record/scope/seam oracles discriminate the failing baseline.
Four independent real-Bash final-build probes passed (space, hostile punctuation, relative root, and default-root rendering followed by foreign-CWD replay). Each refusal exited 2 without requested artifacts; recovery selected exactly one record/scope/seam. Removed-root and wrong-source controls produced zero seams/records. The absent literal Rust diff ID remained limited/canonical_gap_unresolved with zero seams. Final explicit-build artifact reports the complete head; SHA256 b0d747922229ced73f56e243714f8ddc4b01c29aab039fcfd82edb0e076ae13a. Independent report and copy match byte-for-byte.
Terminal hosted proof independently inspected: required run38173060884 attempt1/headb09, selected worker114569623967 and required Ripr Rust Small Result114582048725 all SUCCESS. Actual required policy/check/all-features/clippy/tests/doctests/goldens/fixtures/verdict-corpora/PR-evidence steps passed. Full primary terminal job log contains 14394 PASS records, zero FAIL; summary14394 run/passed,35slow,2skipped. Both new CLI tests passed10446/10447 and parser regression6068. Separate doctests2passed/1ignored; repo-policy0. Checkout commit parents are recorded base/head; its tree62eb3ef0da79ceaeaa05417ab2dfa411fc629fa8 equals the committed candidate tree. Rust-only integration lane separately passed9327/0failed/2ignored. Local red/green, focused, check-fast and exact-head precommit receipts were inspected.
Current UB exit2/rendering questions are source- and behavior-refuted; TypeScript adapter replay remains NOT_ESTABLISHED and an explicit nonclaim for this Rust acceptance (response6114041048). Current threads are empty; that was not treated as review. Droid remains queued, not clean. CodeRabbit's docstring coverage is inconclusive66.67%(6functions/4skipped), nonblocking.
Instrument limitation: fresh nextest artifact11715309808/headb09/digest98c862124aaf84f66b62359b8ec58f908868b9b141079b6ccf82a25146f7e694 exists, but the app-provided ZIP download returned HTTP403 in the selected executor. Raw JUnit/run-context contents are uninspected; no workaround attempted. Terminal primary logs independently establish final counts, changed-test execution, checkout and command binding.
No blocking source/contract/oracle/integration findings. No installed release, TypeScript execution, native Windows/macOS recovery or skipped-lane qualification claimed. Timings are bounded sums of four command durations on a reused Linux source-debug fixture. All reviewer local consumers are released.
Disposition: REVIEW_READY. Ordinary protected squash must still adjudicate GitHub requirements. This is a COMMENT review on the author's PR, not a fabricated platform approval.
|
Post-merge integration and storage closeout: Normal protected squash merged this PR at 2026-10-11 21:45:39 UTC as Independent affected-integration review rebound those objects at 21:52:05 UTC. All seven discovery patches survived unchanged apart from Git metadata/line offsets. Missing-ledger parsing still precedes the new runtime refusal-envelope route, root validation and writes; a supplied unreadable ledger takes the neighboring typed refusal path. No integration repair required. Actual merged source proof, pinned Rust 1.95.0:
The normal full post-merge run 38177695824 reached terminal CANCELLED as later main activity replaced its pending run. It is not a passed full e0 qualification. The focused combined-tree evidence above closes this bounded claim's overlapping seams; no qualification of later main or an installed release is claimed. The raw nextest ZIP HTTP 403 limitation remains recorded in the final review; full primary terminal PR logs were independently inspected. Storage closeout after all compiler/reviewer consumers released: both owned worktrees Four distinct mandatory executable witnesses (baseline, original reviewed candidate, final source-head build, merged integration build) retained in Product acceptance: following the emitted Rust producer route recovers a matching repo-inventory ID with one record/scope/seam. The issue owner closed #7354 for completion of its requested discovery option (a), as recorded in issuecomment-6114181170. The directly measured ordinary Rust diff-ID mismatch ( |
Summary
When a first-use user ran
ripr rerun --gap IDwithout a ledger, the command exited 2 with only the missing filename requirement. The refusal now names the existing Rust and TypeScript ledger producers, explains how to capture their inputs, and binds the Rust commands to the selected root.ripr help rerundescribes the same route.Related: #7354. This implements the issue's suggested option (a), with a measured correction: Rust diff finding IDs and repo-inventory IDs can differ. Producing a ledger does not translate an absent ID; that selection still returns
canonical_gap_unresolved.Swarm / Source Boundary
EffortlessMetrics/ripr-swarmSource-of-truth Links
Spec:
docs/specs/RIPR-SPEC-0123-targeted-rerun.mdADR/proposal: existing targeted-rerun contract; no new architecture.
Plan item: #1693 first-hour CLI recovery toward a useful RC.
Governing issue: #7354, claim and reproduction.
Acceptance delta: the missing-ledger error and rerun help name real capture/producer steps and their canonical-ID prerequisite.
Candidate Relationships
Candidate branch:
codex/7354-gap-ledger-recovery; base20be462ca537a212ad91bb4a8a97e03846d4468f; headb09c818fafd755c3939249f70744daaf52b5aea9.Stack parent/replacement: none. All-state issue/PR and owner checks found no equivalent implementation. #7402 owns separate run-time refusal envelopes.
Scope
Missing-ledger refusal and help; existing producers remain the authority.
Scope Classification
Production delta: missing-ledger parser guidance and rendered help only.
Evidence delta: two public CLI regressions, existing parser assertion updated, spec/traceability and changelog.
Single acceptance criterion: follow the emitted Rust capture and producer commands from a foreign CWD on an ordinary pricing crate and successfully select one literal canonical ID, while an absent ID remains a named limitation.
Non-goals: analyzer/ID projection, automatic ledger writes, ledger/schema changes, installed release qualification, renderer/native work, Python unittest, CI/protection or toolchain changes.
Support-tier Impact
Support tiers unchanged. Commands are labelled Bash; source-specific inputs and ID limits are explicit.
Policy Impact
No policy exceptions, new dependencies, process APIs or network surfaces.
shapemade only unrelated ordering changes, which were removed.Proof
Pinned Rust/cargo 1.95.0; Linux/Bash. Base doctor, check-fast,
cargo check --locked -p ripr --all-targetsandcargo build --locked -p ripr --bin riprexited 0.The base binary reports
20be462ca537a212ad91bb4a8a97e03846d4468f; SHA-256df668a324f34cf66ff106980a6873c79b68b47ac629c4bd32ea922f26d9bc87e.Ordinary dependency-free Rust crate: tracked
amount > thresholdchanged toamount >= threshold; native tests assert literaldiscounted_total(50,100)==50anddiscounted_total(1000,100)==990. Nativecargo test: exit 0, 2 passed.Base missing-ledger CLI: exit 2, empty stdout, no producer guidance.
Existing repo-exposure producer: exit 0, one ledger record
gap:54c07ec8eeadf203; matching rerun: exit 0,current_state_only, 1 matched record / 1 scope / 1 seam. Literal diff IDgap:rust:src/lib.rs:discounted_total:predicate_boundary:predicate:amount==threshold: exit 0,limited/canonical_gap_unresolved, 0 matched records / 0 seams.Red before production:
cargo test --locked -p ripr --test cli_smoke rerun_missing_gap_ledger: exit 101, 0 passed / 2 failed on missing refusal/help capture instructions, after nonzero fixture inventory passed.Green after repair: same command exit 0, 2 passed; broader
cargo test --locked -p ripr --test cli_smoke rerun_: exit 0, 10 passed.Literal argv, retained ID and nonzero selection assertions are independent of production ID/command builders. Root has a space; capture/producer commands run from foreign CWD.
cargo xtask shapeandcargo xtask check-process-policy: exit 0. Final explicitcargo build --locked -p ripr --bin ripr: exit 0, full head version, artifact SHA-256b0d747922229ced73f56e243714f8ddc4b01c29aab039fcfd82edb0e076ae13a. Exact committed-headcargo test --locked -p ripr --test cli_smoke rerun_: exit 0, 10 passed / 0 failed. An earlier build attempt waited on Cargo's artifact lock, was stopped with exit 143, then retried only after precommit's terminal exit; it produced no build result.Committed
cargo xtask check-fast: exit 0, 13 gates run / 1 fixture gate skipped; independentgit merge-basematched the recorded base and the successful selector reported all 7 changed files.cargo xtask precommit: exit 0 at the exact head; schema 0.2 receipt selects the same 7 paths,riprandxtask, with no skipped commands or limitations. Receipt digestsha256:42c7039f5cfec3f8df5691d8af4c53d6b9a03d62b6e7a23d7dda49d017bb9514.Independent published-head LLM review: REVIEW_READY, head
b09c818fafd755c3939249f70744daaf52b5aea9: no blocking source/oracle/contract/integration findings. Four real-Bash root/quoting cases against the final explicit-build artifact (b0d747922229ced73f56e243714f8ddc4b01c29aab039fcfd82edb0e076ae13a) recovered 1 record/scope/seam; removed-root and wrong-source controls produced zero seams/records. The absent diff ID retained its explicit limitation.Required routed Rust run 38173060884, attempt 1, subject head above: selected worker and required
Ripr Rust Small Resultcompleted SUCCESS. Actual policy/build/all-features/clippy/test/doctest/golden/fixture/verdict-corpora/PR-evidence steps passed. The independently inspected full terminal primary log reports 14,394 tests run/passed, 35 slow, 2 skipped, with both new CLI tests and parser regression explicitly PASS. Separate doctests: 2 passed, 1 ignored. The Rust-only feature lane separately passed 9,327 / 0 failed / 2 ignored. Hosted checkoute56b7b31aeb0a87e3d826739a75cb082e20d69a8has recorded base/head parents; its tree matches the committed candidate tree.Readback limit: fresh nextest artifact
11715309808is metadata-bound to this run/head, but its app-provided ZIP download returned HTTP 403 in the selected executor (curl exit 22). Raw JUnit/run-context contents remain uninspected; no workaround was attempted. Terminal primary logs establish counts and execution independently. Droid review remains queued, not clean; CodeRabbit docstring coverage is inconclusive and nonblocking. UB verification questions have a source-backed response. Normal protected squash merged this PR ase0c3f2d160b03858b8d5cd758566a892dc4cfce7.Resource budget: one Cargo process, 2 jobs, task-only target capped at 8 GiB, 15 GiB free reserve; incremental off after disposing only the terminated task's incremental cache. No unknown target cleaned.
Claim Boundary
Source-build/local-fixture proof. No installed/released binary or native Windows/macOS execution is claimed. TypeScript producer discovery is asserted in rendered help/error; this Rust fixture does not qualify TypeScript adapter execution. The change does not make ordinary Rust diff IDs resolve through repo-inventory ledgers.
Observed User Workflow
Actual emitted Bash commands recover a matching repo-inventory ID from a foreign CWD, including space, apostrophe, dollar, backtick and backslash paths. The refusal itself writes no requested artifact; replay preserves the selected repository. A missing ID stays an explicit limitation with zero seams, preventing an unrelated broad rerun.
Three bounded Linux source-debug samples on the one-function pricing fixture, with prior fixture/cache reuse: the sum of four measured command wall times (refusal + capture + producer + retry) was 94.466 / 59.554 / 50.431 ms, excluding workflow overhead and user time. Maximum command RSS was 46,892 KiB (Linux wait4). Each recovered 1 ledger record / 1 scope / 1 seam. Owned timing scratch removed. The optional /usr/bin/time utility was absent (ENOENT); the same selected executor's process counters supplied the measurement. These fixture results do not establish larger-repository or installed-release performance.
Directly observed next failure: the original ordinary Rust diff finding ID does not occur in the repo-inventory ledger, and retry returns exit 0 / limited / canonical_gap_unresolved / 0 matched records / 0 seams. Reproduction and both literal IDs are retained in existing #7354. Focused live issue/owner search found no distinct implementation claim for ID translation; this PR owns the discovery slice only. #7354 was closed by the issue owner for completion of its suggested discovery option (a). The measured ID-translation limitation remains documented here and in the issue; its resolution is not claimed.
Rollback
Revert this PR; the existing ledger producers and selection contracts remain intact.
Spec-Test-Code Traceability
Spec: RIPR-SPEC-0123.
Tests:
cli_smoke/rerun_ledger_recovery.rsand existingrerun_gap_requires_explicit_ledger.Code:
cli/rerun.rs::parse_options,cli/help/rerun.rs.Metrics: 2 red -> 2 green; 10 focused rerun tests; 1 positive record/scope/seam and 0 absent-ID seams.
Golden outputs/ADR: n/a.
Static Language Check
CI Economics
n/a: no workflow, protection, label-routing or lane changes. Preserve required
Ripr Rust Small Resultand current review/thread procedures.Engineering Check
Gates
Focused source proof above; hosted required checks remain authoritative. No package/release publication or deployment.
Integration and Closeout
Independent combined-tree review, actual merged-source tests and verified storage closeout. Actual integration parent is
ad85a83b04564a34c9de3043448901b43fa9e041(#7402). The merged commit passed 11 focused rerun tests, the producer-refusal test and two--json --outmissing-ledger probes; its binary reports the full integration SHA. The earlier full 14,394-test receipt remains candidate qualification. The ordinary full post-merge run reached terminal CANCELLED as subsequent main pushes replaced its pending run; it is not full merged-tree qualification.Both owned worktrees and the private compiler/fixture caches are released. Four distinct executable witnesses were archived and restored with matching hashes and required metadata; compact proof remains in
/workspace/ripr-cli-evidence(187 MiB), exact reviewed source ref and pinned toolchain retained for continued RC work. Original checkout/common Git and unknown targets remain intact; 29 GiB is free. #7354 is closed for its accepted discovery option (a); the reproduced Rust diff-ID limitation remains explicit. No installed-release, later-main or RC completion is claimed.