fix(ios): handle delayed launch confirmations without stopping XCTest
Merged
TH
6d ago+203+203+012345678901234567890123456789-38-38-01234567890123456789
Summary
open <app> --relaunch --launch-url <url> can reach SpringBoard before its “Open in” sheet appears, while the target app is still stopped. Read system alerts before querying the app, and skip stopped-app AX queries so XCTest does not record a failure.
Wait for initial presentation using a dedicated three-second window. After a failed accept, check presence once rather than waiting for another sheet. Keep typed no-alert outcomes. The regression fixture terminates an installed app on both Apple platforms.
Eight files; scope stays within Apple launch confirmation and its tests.
Validation
Tested commit: 5108ef2717a9be00110b3537cb2cb11488d6901f.
| Regression | base 7c40b78 | head 5108ef2 |
|---|---|---|
| Failed-accept presence and no-prompt budget tests | 2 failed | 2 passed |
- Exact-head
pnpm check:affected --base b6f07032642c17ba83296a750eb138d3f453e5db --head 5108ef2717a9be00110b3537cb2cb11488d6901f --run: passed, including 1,321 related tests. Focused suite: 82 passed. - Live daemon evidence, iOS 26.2 at head: real prompt accepted after controlled delayed handoff; zero stopped-app XCTest errors. No-prompt app-exit case:
unobservable,postOpenSettleDurationMs: 4444. Sessions and temporary apps cleaned up; simulator powered off. - Corrected fixture passed macOS CI at unchanged native source
7c40b78(327 XCTests, zero failures). Earlier native mutation failed without the guard and passed after restoration. - Final-head CI passed: 16 successful checks and one optional matrix skipped, including successful Integration Tests and Coverage. GitHub reports
CLEANandMERGEABLE; all review threads are resolved.