Repository navigation
fix(recovery): late verify timeouts fail the candidate, not the run - #36
Merged
Merged
Conversation
A hyper_connection target died as "failed ... ctest timed out after 60s" with no RunFinished in its journal and 0 LLM calls recorded, after doing real search work. Two gaps: - finalize's winner re-verify and the shape gate's verifies used `?`, so a hung test unwound the whole target (cursor advanced, journal unclosed, checkpoint kept). Now a verify error in finalize demotes to gate failure (fallback with a closed journal, specific "re-verify timed out" cause); shape-gate verify errors restore the test file and Skip the gate (only an actual reported failure can fail it). - campaign's Err arm never accounted usage: recover (calls, tokens) from the dead run's journal (delta-accounted, so resumes never double-count) and keep budgets honest. Adds exec::is_timeout plus unit tests for it and journal_usage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the live campaign:
hyper_connectiondied asfailed ... ctest timed out after 60s— noRunFinishedin its journal, 0 LLM calls recorded — after doing real search work (rich correctness-failure detail and all).Fix 1: demote late verify errors to gate outcomes
finalize's winner re-verify and both shape-gate verifies used?, so one hung test unwound the whole target (cursor advanced, journal unclosed, checkpoint kept):fallbackwith closed journal, cleared checkpoint, and a specific cause (winner re-verify timed out: …vs generic rebuild failure).exec::is_timeouthelper (all tool timeouts bail with "… timed out …").Fix 2: recover usage from dead runs
The campaign
Errarm now replays the failed run's journal and delta-accounts(calls, tokens)exactly likeaccount()— so budgets stay honest and a resumed-then-failed target is never double-counted. Previously the usage vanished (observed: real spend recorded as 0).Recovery semantics (unchanged, verified)
RunFinished), checkpoints clear on the fallback path, cursor advances, state saves after every target — resume behaves exactly as before.failedstill means "genuine run error" (discover/baseline/etc.); timeouts now surface asfallbackwith cause instead.account(), so a failed target that is later manually rerun can't double-count.Validation
cargo build --releaseclean;cargo test121 passed (2 new:is_timeout_matches_tool_timeouts,journal_usage_sums_journaled_calls);pytest21 passed.