Follow-up from the review of #515 (fixes #512).
sendInitWithRetry now breaks out of the retry loop as soon as lastExitDetails is recorded — the worker has exited, so no ACK can arrive and burning the remaining ~15s of retries is pointless. Good change. But the error it throws is still built as:
let detailMessage = `Failed to initialize proxy after ${maxRetries + 1} attempts. ${...}`;
so a launch that failed fast on attempt 2 still reports "after 6 attempts". The tests assert that wording (tests/unit/proxy/proxy-manager.start.test.ts, tests/unit/proxy/proxy-manager.handshake.test.ts), so it's pinned rather than accidental.
This is a small step back from #509 ("make the proxy-init timeout say what actually stalled"): the count is the first thing a reader uses to judge how long the launch actually spent trying, and 6-vs-2 changes that read considerably.
Suggested fix
Track the attempts actually made and report that, distinguishing the two exits:
- exhausted:
Failed to initialize proxy after 6 attempts.
- fast-fail:
Failed to initialize proxy after 2 attempts (proxy exited; further retries skipped).
Then update the two asserting tests to match.
Cosmetic only — the exit details appended to the message (code=… signal=… stderr:) already carry the actionable part.
Follow-up from the review of #515 (fixes #512).
sendInitWithRetrynow breaks out of the retry loop as soon aslastExitDetailsis recorded — the worker has exited, so no ACK can arrive and burning the remaining ~15s of retries is pointless. Good change. But the error it throws is still built as:so a launch that failed fast on attempt 2 still reports "after 6 attempts". The tests assert that wording (
tests/unit/proxy/proxy-manager.start.test.ts,tests/unit/proxy/proxy-manager.handshake.test.ts), so it's pinned rather than accidental.This is a small step back from #509 ("make the proxy-init timeout say what actually stalled"): the count is the first thing a reader uses to judge how long the launch actually spent trying, and 6-vs-2 changes that read considerably.
Suggested fix
Track the attempts actually made and report that, distinguishing the two exits:
Failed to initialize proxy after 6 attempts.Failed to initialize proxy after 2 attempts (proxy exited; further retries skipped).Then update the two asserting tests to match.
Cosmetic only — the exit details appended to the message (
code=… signal=… stderr:) already carry the actionable part.