fix: harden iOS relaunch/close lifecycle to reduce simulator flakes

Merged
TH
8mo ago
+242-6

Summary

Harden iOS session lifecycle around relaunch/close to reduce XCTest/SpringBoard race-induced flakiness.

  • Stop iOS runner before open --relaunch does close -> 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 -b failure).
  • 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 typecheck
  • pnpm test:unit
  • pnpm test:smoke