fix: harden iOS relaunch/close lifecycle to reduce simulator flakes
Merged
TH
8mo ago+242+242+012345678901234567890123456789-6-6-0123456789
Summary
Harden iOS session lifecycle around relaunch/close to reduce XCTest/SpringBoard race-induced flakiness.
- Stop iOS runner before
open --relaunchdoesclose -> open. - Stop iOS runner before
close <app>dispatch (and avoid double-stop). - Add configurable iOS simulator settle delays after close/open (
AGENT_DEVICE_IOS_SIMULATOR_POST_CLOSE_SETTLE_MS,AGENT_DEVICE_IOS_SIMULATOR_POST_OPEN_SETTLE_MS). - Make runner simulator boot preflight strict (do not ignore
simctl bootstatus -bfailure). - Add ordering tests for iOS relaunch and close paths.
- Touched files: 3.
- Scope note: expanded slightly beyond the session handler command family into one downstream iOS runner file (
src/platforms/ios/runner-client.ts) for startup preflight hardening.
Validation
pnpm typecheckpnpm test:unitpnpm test:smoke