test(ios-smoke): wait once more when the runner is still starting behind a deep link - #3063
Conversation
…ind a deep link A relaunch can restart the runner, and on a loaded CI Mac its start outlasts the first 15 s destination wait. That wait ends in runner-start readiness exhaustion, which returned without probing, so iOS's 'Open in Agent Device Tester?' confirmation stayed unanswered and the caller's wait failed on APP_NOT_RUNNING. One more wait lets the started runner see the pending launch and the helper answer it; a second runner-start timeout still returns. The miss classification moves into its own function.
|
The code looks right at 9b3995e, and all 14 checks pass. I found no conflicts, so this is ready for human review. Not blocking: I did not run the unit tests locally, so their result on the PR head and on main comes from reading the code. I could not read the #3057 runner log, so the timeline of the runner starting after the first 15 s wait comes from the PR body. CI does exercise this helper, but it does not show that this change removes the flake. Whether one extra 15 s wait is enough on a loaded CI host is best judged from the next few iOS smoke runs. |
* origin/main: 0.21.17 feat(daemon): report the host CPU architecture in /health (callstack#3048) feat: add daemon policy to confine devices, commands, and device shutdown (callstack#3064) test(web): wait for the killed fake daemon to be reaped before asserting it is gone (callstack#3066) fix(ios): write the simulator clipboard from the runner (callstack#3065) test(daemon-client): a restart probe that fails outright near the RPC deadline reports the daemon unavailable (callstack#3058) fix(daemon-client): a client whose daemon lost the start race adopts the winner (callstack#3057) fix(android): honor boot --timeout as the emulator boot deadline (callstack#3059) test(ios-smoke): wait once more when the runner is still starting behind a deep link (callstack#3063)
Summary
The iOS smoke test
live iOS simulator fixture E2Ekeeps failing atwait for Automation lab, right afteropen --relaunch --launch-url agent-device-test-app:///automation?.... The final error isapp 'com.callstack.agentdevicelab' is not running(wait_capture_stalled,APP_NOT_RUNNING). The failure screenshot shows iOS's "Open in "Agent Device Tester"?" confirmation, unanswered.It hit #3056 once and #3057 twice today. In #3057's run the uploaded
runner.logshows the cause:opensucceeds at 14:51:37. The relaunch restarts the runner, and xcodebuild launches it at 14:51:33.Running testsat 14:51:54,LISTENER_READYat 14:51:55. That is runner-start readiness exhaustion.answerDeepLinkConfirmationreturns on runner-start exhaustion without probing (test(ios-smoke): answer deep-link prompt after readiness exhaustion #3044 gated the probe totarget-discovery), so the prompt is never answered.READ_TARGET_NOT_RUNNINGon every read (14:51:55 to 14:52:14) until the wait times out.The helper now waits once more after a runner-start timeout, without an alert probe. The next wait is the first that can see the pending launch: it ends on
APP_NOT_RUNNING, and the existing path answers the confirmation. A second runner-start timeout still returns without probing. That keeps #3044's point: a runner that really failed costs one extra 15 s wait, not the whole 5-wait budget with probes. The miss classification moves intoclassifyDestinationMiss(fallow complexity); its outcomes are unchanged for every other reason.Two test-harness files changed; production behavior is unchanged.
Validation
ios-simulator-e2e-deep-link-confirmation.test.ts(13 pass):alert get,alert accept, wait;Both fail on
main.pnpm check:affected --run: passed, including fallow.