Repository navigation
feat(repair): recover an interrupted focused finish with the original claim (#13203 slice B, recovery) - #13697
Conversation
…ed claim Recovery retains only the receipt and verify bytes the recorded evaluation outcome names, refuses a different supplied claim, revalidates a trust-bound retry's authority before recovering a missing apply projection, and gives a refused result retry-budget recovery text. A focused finish still does not gate on a passing result. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
…; close the custody unit's temp repo on error Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
|
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 46 minutes. View limit details
|
An interrupted focused finish, trust-bound or not, is promoted only after the after phase re-validates the same caller-reported result against the current HEAD, the attempt and its test file and finds it record-equal to the pending claim. An after phase without --test-result is refused and leaves the attempt recoverable. Status names one route per state (retry with the same file when recoverable, a new attempt otherwise, including non-durable-v1 protocols), the spec states the enforced rule, and after_phase_human_stdout keeps its own doc comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Exact-head review of 306300c (9 files, about 1745 changed lines). An independent fresh reviewer read the full diff through git objects in two rounds, and the owning lead checked the repairs.
Round one found a promotion path for an interrupted focused finish that skipped the caller's result when the file was omitted. The repair makes every focused promotion depend on the after phase revalidating the same result against the current HEAD, attempt and test file. It also adds a real-binary test where an Accepted interrupted finish run without the file is refused with an unchanged manifest and then recovers with the original file. The reviewer traced that forcing the recheck flag true makes that test exit 0 and fail its assertion, so it discriminates.
Inspected: recovery under the locked terminal manifest, apply-record recovery by exclusive create, accepted receipt and verify digests, the single default-status route per state, the legacy-protocol wording, doc comments, spec, help and traceability parity.
Recorded limits: the interrupt tests run on linux-gnu only because they use a preload hook. The retry-only default-status branch has coverage through the shared text function and the Started-case inventory test. Hosted CI on this exact head is the qualifying proof for the gates the review itself ran none of.
Generated by Claude Code
ripr static exposure checkCommit Took 144s. |
…nly when it can recover (#13203) A new-test proposal finished without a focused claim keeps the ordinary pending-retention route: the proposal claim revalidation now runs only when the finish holds a pending focused claim. Status offers the same-result retry for an accepted decision only when its receipt and verify files are present with the accepted digests; otherwise it gives the new-attempt route, matching the after phase's refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
The interposed-receipt test now asserts status offers the same-result retry while the accepted receipt is intact and gives the new-attempt route once the receipt digest no longer matches. The new-attempt text keeps the "if the after phase is no longer running" hedge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
|
CI on d609b2c is red for a reason outside this PR.
Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Final source and oracle review of head d609b2c.
Inspected:
- the complete after-phase recovery chain in
cli/commands/agent.rs: proposal claim block, focused recheck, trust promotion, generic retention and response/apply recovery; - retention and the evaluation start/accept/restore functions in
repair_attempt/mod.rs; focused_accepted_projection_present, where the digest comparison matches what retention reads;focused_receipt_recoveryand every consumer: default status, selected status and MCP;- the RIPR-SPEC-0011 text and traceability.
Rounds:
- Round 1 found a no-recheck promotion, repaired at 306300c.
- Devin's two findings were repaired at bb755d1.
- An independent delta review found no blockers, plus a proof gap and a missing hedge. Both were closed at d609b2c, and the retry and wrong-digest status sides are now pinned.
- Mutants that always return false or only check existence each fail the intended assertion.
Local gates on this head:
- focused_test_result: 37
- python_repair_attempt: 26
- lib agent_status: 81
- lib repair_attempt: 114
- agent_command_journey: 16
- check-traceability and precommit
The earlier hosted red came from the main compile break fixed by #13848. Hosted exact-head qualification is the remaining step.
Generated by Claude Code
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Head c79c94e is a clean merge of main (including the #13848 compile fix) into the reviewed d609b2c. The PR's own source, tests, spec and traceability are unchanged from the head reviewed in my previous disposition, so that source and oracle review carries over unchanged.
What changed is the integration basis. Hosted exact-head CI on this merge is its qualifying proof.
Generated by Claude Code
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Head c79c94e is a clean merge of main, including the #13848 compile fix, into the reviewed d609b2c.
The PR's own source, tests, spec and traceability are identical to that reviewed head, so the full source and oracle review recorded there still applies. The only change is the integration basis, and hosted exact-head CI on this merge is its qualifying proof.
Generated by Claude Code
…cupied (#13203) The after phase promotes an accepted trust-bound focused finish only while nothing exists at the apply-record compatibility path and its components are safe. Status (default, selected and MCP) now gives the new-attempt route instead of the same-result retry in any other case, so it agrees with what the after phase will do. The promotion path is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Head: f2699de. The full source review of earlier heads still applies, and this pass covers the delta c79c94e..f2699de.
trust_apply_record_blocks_focused_recovery(repair_attempt/mod.rs) mirrors the after-phase trust-promote condition incli/commands/agent.rs:- binding role present;
- safe path components;
symlink_metadataNotFound is the only state that promotes.
- Default, selected and MCP status all reach it through
focused_receipt_recovery. Status offers the same-result retry only in states where the after phase promotes. trust_bound_focused_retry_is_withheld_when_the_apply_record_path_is_occupiedcovers three cases: no binding, binding with the path occupied, and binding with the path cleared. An always-false predicate mutant breaks the occupied assertion. The stacked successor exercises the same state through the real binary.- Spec and traceability entries match the behavior.
- Graphite thread answered and resolved. Devin threads were answered earlier.
Recorded limits:
- The status text says "occupied" for the unsafe-component and unreadable cases as well. These cases still route to a new attempt.
- A separate custody question about status cache writes is tracked in #13945. It predates this PR.
Worker's local proof on f2699de:
- focused_test_result, python_repair_attempt and agent_command_journey suites;
- agent_status, repair_attempt and mcp::repair lib tests;
- fmt, check-traceability and precommit.
Hosted qualification on this exact head is the remaining proof.
Generated by Claude Code
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
VERDICT: APPROVE f2699de - no blocking findings on this head.
Exact-head source review of f2699deb (base ab93e28c), 10 files, +1876/-187. Static only: no build, no test run, no checkout. rustfmt --check (1.100.0, repo config) exits 0 on all six changed Rust files. This restores the source attestation that the earlier REVIEW_READY on this same head carried and that the 20:09Z refresh review displaced by formatting; the head has not moved.
The change makes an interrupted focused finish recoverable instead of always requiring a new attempt. The after phase gains a recovery pre-pass that re-validates the caller's --test-result against the current HEAD, attempt and test file, requires it to equal the pending normalized claim, and only then promotes the receipt/verify/focused evidence. A trust-bound attempt additionally re-verifies its retained binding and edit authority and recovers only a missing apply projection, created exclusively.
Every promotion path is gated on the same claim: the focused_claim_rechecked block, the trust_promoted block, the post-retention output block, the apply-record block and the pre-marker restore block each re-validate the supplied result and compare supplied.identity.record == pending.record before touching evidence. An after phase without --test-result is refused and leaves the attempt unchanged. with_locked_terminal_manifest_from takes the commit lock, re-reads, and compares the full manifest before the callback, so a concurrent commit cannot be rendered as this attempt's result.
The 11 new tests cover the interesting shapes: stop before the marker, stop after the marker (started and accepted), stop after retention, an interposed receipt replacement, a changed claim, a partial publication, a proposal without a result, and the fifth-refusal budget. Assertions are on manifest state and retained roles, not just exit codes.
Non-blocking notes: (1) the proposal recovery block sets refusal.stop_unrecorded and refusal.selected_attempt before validating and resets only refusal.typed on success, so a later ordinary-after failure is not recorded and does not consume the after-refusal budget - a consistency nit, deterministic, not a safety hole. (2) Most new recovery tests are Linux-gnu gated because the publication hook is an LD_PRELOAD shim; the recovery code itself is platform-independent. (3) Status is silent for an attempt interrupted after terminal retention, although a same-result retry does recover the response.
Qualification the head still lacks: no hosted Rust gate ran on this head; the merge queue's compile/test lane is the first execution of these tests. This attestation is source-level only and does not authorize landing.
|
Native composition checkpoint: G |
|
Composition repair identified and verified locally - the E0277 is a stale signature, not a logic defect. Cause. Evidence. Composed tree Fix (3 lines, no behaviour change). @@ -3070,7 +3070,8 @@ fn run_agent_repair_phase(
&manifest.seam_id,
&packet_path,
Some(id),
- )?;
+ )
+ .map_err(|error| error.to_string())?;
@@ -3191,7 +3192,8 @@ fn run_agent_repair_phase(
&manifest.seam_id,
&root.join(&packet.path),
Some(id),
- )?;
+ )
+ .map_err(|error| error.to_string())?;
@@ -3296,7 +3298,8 @@ fn run_agent_repair_phase(
&manifest.seam_id,
&packet_path,
Some(id),
- )?;
+ )
+ .map_err(|error| error.to_string())?;
Verification. With the patch applied to the composed tree, Queue state. This PR was ejected from the native queue when its group failed; |
|
Finding: composition break with main — this PR cannot qualify as-is. Measured this beat on the merge-queue stack that included this PR:
Evidence: merge_group runs This PR's own CI is green at Disposition: repair required before re-admission. Rebase onto current Not dispatched this beat; the coding lens is on the #14708 conflict repair. This is the next repair in the queue. |
…13203) Main now returns a typed ReceiptBindingError from receipt_binding_from. The three recovery call sites added by this PR run inside String-error contexts, so the composed tree failed with E0277 in the merge queue. Convert through Display, which keeps the refusal text unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUbb9AWcGogtEPEAMB
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Head: 0ccbaf1. The source and oracle review of f2699de carries over unchanged. This pass covers the two commits on top of it.
- Merge of main 60114de: no textual conflicts, and none of this PR's recovery files changed in the merge resolution.
- 0ccbaf1, three-line composition repair in
cli/commands/agent.rs. Main now returnsReceiptBindingErrorfromreceipt_binding_from. The three recovery call sites added here run in String-error contexts, so each now converts with.map_err(|error| error.to_string()).ReceiptBindingErrorimplements Display, so the refusal text is the same.- Control flow and the gating order are the same.
- The fourth call site, near line 1411, already accepts the typed error and is untouched.
- What this resolves: this is the E0277 that ejected the queue group (runs 43696783017 and 43697252882).
Local proof on this exact tree:
cargo check -p ripr --libexit 0;cargo check -p ripr --lib --testsexit 0;cargo fmt --check -p riprexit 0.
The focused suites were last run on f2699de, and this delta leaves their behavior as it was. Hosted qualification on this head is the remaining proof.
Recorded limits from the f2699de reviews still apply. The proposal recovery refusal budget, the Linux-gnu-gated publication hook tests and the post-retention status hint are non-blocking notes. #13945 tracks status cache writes.
Generated by Claude Code
|
The composition break is repaired at 0ccbaf1. I merged current main (60114de) without conflicts, then made the three Generated by Claude Code |
|
Qualification passed on 0ccbaf1:
It is ready for re-enqueue. I didn't enqueue it from this session, so the queue entry stays with the orchestrator. Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
VERDICT: APPROVE 0ccbaf1 — no blocking findings on this head.
Terminal verdict for the head I reviewed in review 5910950056 (2026-11-15T13:29Z). The source and oracle review of f2699de carries over unchanged; this pass adds the head's remote evidence and supplies the missing terminal marker.
- Head unchanged since that review.
0ccbaf18is the merge of main60114de3intoclaim/13438-pr2b, plus the three-line composition repair incrates/ripr/src/cli/commands/agent.rs(three recovery call sites convertReceiptBindingErrorwith.map_err(|error| error.to_string());ReceiptBindingErrorimplementsDisplay, so refusal text and gating order are unchanged; the fourth call site already takes the typed error). That repair removes the E0277 that ejected the queue group in runs 43696783017 and 43697252882. - Hosted evidence on this head is now complete and green: Rust gates, all four Rust test shards, shard verify and
Ripr Rust Small Resultare SUCCESS; Graphite mergeability, Graphite AI Reviews and GitGuardian are SUCCESS; CodeRabbit completed.mergeable: MERGEABLE,mergeStateStatus: CLEAN. - Threads: zero open; the four prior threads (three Devin, one Graphite) are resolved.
- Non-blocking notes from the earlier reviews still stand: the proposal recovery block can leave a later ordinary after-phase failure unrecorded, so that failure does not consume the after-refusal budget; most new recovery tests are
cfg(all(target_os = "linux", target_env = "gnu"))because the publication hook is anLD_PRELOADshim, leaving Windows/macOS toreview_fifth_focused_refusal_requires_restart; status is silent for an attempt interrupted after terminal retention; #13945 tracks the status cache writes. - Qualification: the head is behind current main and its queue-group proof was taken on an earlier base; the merge route recomputes that group, and base movement alone does not affect this source verdict.
Static only: no build, no test run, no checkout. Repository left clean; no push, label, merge, body edit or thread change.
|
Admitted to the native merge queue at Conditions checked at that exact head: current The head was unchanged since review 5910950056 (merge of main + the 3-line |
EffortlessSteven
left a comment
There was a problem hiding this comment.
VERDICT: APPROVE 0ccbaf182fb96ccd99397ec8450b23bfa4b34956b96ccd99397ec8450b23bfa4b34956 — no blocking findings on this head.
Refresh of my APPROVE at f2699deb. Delta f2699deb..0ccbaf18 is one commit, one file, +6/−3: crates/ripr/src/cli/commands/agent.rs maps ReceiptBindingError to String at the three focused-recovery call sites this PR adds.
Why it is correct: receipt_binding_from returns Result<serde_json::Value, ReceiptBindingError> (crates/ripr/src/app/repair_attempt/mod.rs:416-422), while run_agent_repair_phase returns Result<(), String> (agent.rs:2594), so the bare ? could not compile against current main. ReceiptBindingError's Display renders Other(message) verbatim and TrustedSurfaceUntrusted with the historical refusal tail (mod.rs:5507-5518), so the refusal text stays byte-identical to the pre-typing strings. No other dimension of the PR is touched.
Checks at this head: 15 success, 1 neutral, 5 skipped. mergeable is unknown from GitHub. Static review only; no build or test run.
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
VERDICT: APPROVE 0ccbaf1
Replacement carrier for review 5922032094, whose first line repeated the head SHA and so did not bind. The substantive review is unchanged: review 5910950056 reviewed this exact head, and review 5921170424 supplied the terminal verdict.
Reviewed head: 0ccbaf1
|
Queue-blocker disposition: attestation-carrier repair, not a source defect. The merge-group admission for this entry was refused at Repair: review 5930416689 at the unchanged head |
Main moved 439 commits under this branch and the merge queue ejected the previous head on the journey test. Three things changed on main: - the refusal reason for remaining gaps is now unexposed_findings_remain; - the default MCP gap list no longer lists a closed gap, it discloses one exposed item and the class filter that lists it; - an interrupted focused finish can now be recovered (#13697), and that recovered summary rebuilt its lines without the retained run, so it printed 'test run: none recorded' for a result it had just re-accepted. The recovered finish now reads the retained caller run back like the original finish, with an assertion in the existing recovery test. The journey follows the two renamed surfaces and asserts the fresh-process improved receipt before the re-check. After the re-check that read is stale on main (#15060), so it is left unasserted with a pointer. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRVkRHQuEUhaRdfMfyzE
Governing issue or accepted claim: #13203 slice B (successor 2b of the split of #13438; part of #3162)
Acceptance delta (one sentence): an interrupted focused finish can be recovered with the original caller-reported claim instead of only by a new attempt, and default status names that state and its route.
What changed
with_locked_terminal_manifest_from), including the Python apply-record path.ripr agent statusnow projects the focused recovery limitation and the new-attempt route into its unconfirmed-receipt warning (carried from review of feat(repair): custody for a caller-reported focused test result (#13203 slice B, receipt custody) #13574), checked in both default and selected-attempt renders.Deliberately not in this PR
Python recovery tests (successor 3) and the finish gate for a new-test proposal (successor 4).
Split context
#13438 was refused by admission at
qualification_scope_oversizedand is split without raising the limit; credit for the combined design goes to the lane that wrote #13438, which stays open until the successors land. Successors 1 (#13546) and 2a (#13574) are merged.Proof
Locally on the pre-rebase head 8b0cea9 (rebased onto main without conflicts):
cargo xtask precommit, goldens, check-traceability, check-process-policy, and therepair_attempt,agent_status,focused_test_resultandpython_repair_attemptsuites. Hosted CI on the exact head is the qualifying proof.Generated by Claude Code