fix(#517): report the attempts actually made when proxy init fails fast - #521
Merged
Conversation
Follow-up from the #515 review: the retry loop breaks out early once the worker has exited (no ack can arrive), but the thrown message was still built from the constant retry budget — a launch that fast-failed on attempt 2 reported "after 6 attempts", misreading how long the launch spent trying. Track the attempts actually made and say which exit happened: - exhausted: "Failed to initialize proxy after 6 attempts." - fast-fail: "Failed to initialize proxy after 2 attempts (proxy exited; further retries skipped)." The exit details appended to the message (code/signal/stderr) are unchanged. The two pinning tests now assert the new wording, and the exhaustion test pins that the full count keeps its plain form. Fixes #517 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtvNu3aNB1nw1URRL5UTgR
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Follow-up from the #515 review (#517): the retry loop breaks out early once the worker has exited (no ack can arrive), but the thrown message was still built from the constant retry budget — a launch that fast-failed on attempt 2 reported "after 6 attempts". The count is the first thing a reader uses to judge how long the launch actually spent trying, so 6-vs-2 changes the read considerably.
Change
sendInitWithRetrynow tracks the attempts actually made and distinguishes the two exits:Failed to initialize proxy after 6 attempts.Failed to initialize proxy after 2 attempts (proxy exited; further retries skipped).The exit details appended to the message (
code=… signal=… stderr:) are unchanged — they still carry the actionable part.Tests
proxy-manager.start.test.ts— the ProxyManager loses a late init ACK: any worker boot >500ms fails the whole launch as 'Failed to initialize proxy after 6 attempts' #512 fast-fail test now pins the new wording (after 2 attempts (proxy exited; further retries skipped)+ exit details).proxy-manager.handshake.test.ts— fast-fail test pins the new wording; the exhaustion test pins that the full count keeps its plain form (after 6 attempts., no suffix).Full unit suite (4227 tests) and lint pass.
Fixes #517
🤖 Generated with Claude Code
https://claude.ai/code/session_01XtvNu3aNB1nw1URRL5UTgR