You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(ios-runner): Swift retry decisions keyed on message text → typed codes #2786
The runner decides whether to retry by matching message text. AGENTS.md forbids this ("Key behavior on typed reasons and details, never error text"). Paths are under apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/; line references are at 01328de411.
RunnerTests+Lifecycle.swift:402: matches "main thread execution timed out". That text only ever appears in a Swift NSError, never in an ObjC exception, and the exception catcher sees only NSException name and reason (RunnerObjCExceptionCatcher.m:9-13). This branch is dead.
RunnerTests+Lifecycle.swift:405: in practice this is only reachable from unit tests.
RunnerTests+Lifecycle.swift:428 (shouldRetryResponse): matches "is not available" against the runner's own response messages (RunnerTests+CommandExecution.swift:1578-1601, 2127-2132).
Required behavior
Delete the :402 branch.
Give the responses that :428 needs to retry a typed error code or detail at the place they are produced, and make shouldRetryResponse decide on that field. Keep the retry behavior the same for exactly those responses.
:405: either key it on the exception name, or delete it with a comment in the PR explaining why it is unreachable.
Completion conditions
grep -n 'contains("' apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift finds no retry decision based on message text.
Unit tests pin the retry decision for each typed code.
Run pnpm check:xctest-selection, build the runner, and run the runner unit tests on the macOS host lane (see docs/agents/testing.md for signing and permissions). Add or change tests under the existing #if AGENT_DEVICE_RUNNER_UNIT_TESTS guard. Do not keep a second list of test names.
Activity