Repository navigation
fix(harness): count a crash before the request as a failed attempt - #149
Merged
Merged
Conversation
A crash with the attempt set and no draft open, before `llm.started` or asleep in retry backoff, charged neither counter: the restart is uncounted by design, and the resume treated attempt 1 as fresh. A host that kept dying there looped forever. The resume now counts that attempt as failed, so the retry budget bounds it. A shutdown still resends the same attempt uncharged. Found by a codex review of the previous change. `recovery.backoff` regenerated: each attempt number moves by one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Problem
After #147, a crash with
attemptset and no draft open, beforellm.startedor asleep in retry backoff, charged neither counter. The restart is uncounted by design (the run was not being worked on), and the resume treated attempt 1 as fresh. A host that kept dying at that point, for example in a request hook or provider setup, was restarted forever.Fix
The resume counts that attempt as failed, streaming or not, so the retry budget bounds it. A shutdown still resends the same attempt uncharged. One branch in
Loop.run; the restart rule is unchanged.Found by a codex review of #147. The review's other findings are gaps against the reference where nothing is lost and a fix needs a new column or new plumbing; they are recorded in the design notes and left.
Tests
recovery.backoffregenerated: each attempt number moves by one, and the message for a crash with no draft reads "The host stopped before attempt N was sent". Recovery 15/15; harness loop, thread and control suites 86/86;vp checkandvp run typecheckclean.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.