refactor(ios-runner): key runner retry decisions on typed failures, not message text - #2831
Merged
thymikee merged 2 commits intoSep 23, 2026
Conversation
Size Report
Startup median (7 runs, lower is better):
|
Member
Author
|
Reviewed at 2700f2f. Retry decisions now use typed failure reasons instead of message text, and the retry outcomes stay the same. The code looks right. The Smoke Tests failure at This needs #2828 to merge first. |
thymikee
added this pull request to stack #2830
September 23, 2026 17:20
…res, not message text The response retry now reads a runner-internal `retryableFailure` that the target-app-unavailable responses carry from the place they are produced; it is excluded from encoding so the host sees the same error JSON. The exception retry drops the main-thread-timeout branch (that text is only ever a Swift NSError, never an ObjC exception reason) and the snapshot timeout branch (snapshot dispatches through its own recovery loop and never reaches the exception catcher). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Moves the wire-shape pin to a Models test file and adds a field-drift check: every stored ErrorPayload field except the runner-internal retryable failure must reach the encoded JSON. The exception-retry test builds its commands through the shared fixture helper. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
thymikee
force-pushed
the
refactor/2786-runner-typed-retry-codes
branch
from
September 23, 2026 18:08
2700f2f to
2d7ec91
Compare
22 tasks
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
Stacked on #2828.
The runner's retry decisions no longer read message text (Swift only, 6 files):
shouldRetryResponsereads the runner-internalErrorPayload.retryableFailure, whichErrorPayload.targetAppUnavailablesets. It is not encoded, so the wire JSON and TS decoding do not change. Only read-only commands reached these responses, so retry behavior is the same.NSError..snapshotbranch: snapshot takesexecuteSnapshotDispatchedand never reachesexecuteOnMainSafely.Differences from the issue: the
kAXErrorServerNotFoundmatch stays because it is XCTest's own exception reason, which has no typed handle. The completion grep still finds that one commented line.Closes #2786
Validation
Rebased onto
mainata913cb222. Signed macOS host lane: 241/241 at2d7ec919a.check:affected --runis green at the stack head60e533284. The evidence below is from before the rebase.Tested SHA
2700f2f3e.pnpm check:affected --run: green.check:xctest-selectionpasses. The iOS simulator build succeeded.Lifecycle.swiftrestored, the new retry tests fail.snapshot -i,screenshot,find get text, and close all passed. The unavailable-target retry was not reproduced live; unit tests cover it./code-review high): fixed the Models test placement, added a field-drift check, and switched to the shared fixture. Rejected adding a wire code (it changes the AppError code), restructuring the catcher (out of scope), and logging the retry reason (single case).🤖 Generated with Claude Code