Repository navigation
test(ios): pin a read-only cancel in the connect retry delay - #3413
Merged
Merged
Conversation
A read-only command sent to a starting runner retries refused connects. A cancellation that lands in the retry delay after a refused attempt now has a test at the exchange: the command is reported `dispatched: no`, its charge is withdrawn, and no status poll is sent. The rule that an attempt failure counts as possibly written unless it proves otherwise gets one local helper in waitForRunner instead of two copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Size Report
Startup median (7 runs, lower is better):
|
Member
Author
|
The new test at 3db5e06 looks good to me, and I found nothing to change. The |
Contributor
|
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.
Summary
Follow-up to #3409, covering two of the reviewer's non-blocking notes.
runner-exchange.test.ts): a read-onlysnapshotgoes to a starting runner, the connect attempt is refused (ECONNREFUSED), and the request is canceled in the retry delay that follows. The exchange reportsdispatched: 'no', withdraws the charge, and sends nothing after the single refused attempt, so there is no status poll. The test passed on the current code, so no bug here. It fails if the loop reports'unknown'for that case, as main did before fix(ios): disclose whether a canceled read-only runner send was written #3409.runner-startup-transport.ts): the rule that an attempt failure counts as possibly written unless it proves otherwise now lives in one localrecordAttemptWriteEvidence, used by bothsetLastErrorand the cancellation.catch. No behavior change.Scope note on #3409:
waitForRunner's cancel classification also reaches the readiness preflight (runner-exchange.ts~L425). A canceled preflight now carriesdispatched: 'no'or'unknown'instead of no value. Graceful shutdown (runner-disposal.ts~L159) also callswaitForRunner, but it passes no signal and swallows every error, so nothing changes there.2 files touched.
Validation
Commit
3db5e066d:pnpm check:affected --runpassed (2960 tests, including fallow), andeager-closure-budgets.test.tspassed. The new test failed when the loop reported'unknown'.No live device run: these are unit-level changes (a test and a pure refactor), with no new device path.
🤖 Generated with Claude Code