fix(ios): serialize status bar normalization around simulator captures

Merged
TH
1d ago
+1446-214

Summary

Fix SM-11: hold snapshot → normalize → capture → restore under one iOS simulator status-bar lock. Plain captures and Wi-Fi/airplane writes share the hold; writes retain their budget and invalidate the cleared-state cache before mutation.

The lock and cache use platform:kind:udid. CoreSimulator creates a UUID per device; copied sets with colliding UDIDs may over-serialize, an accepted trade-off. Set-path identity changes remain reverted to main. Twelve files remain in the PR.

Help/docs distinguish the request timeout (90 seconds for standalone CLI settings, including waiting) from the 10-second status-bar command limit. Screenshot reads/preparation allow 10 seconds per command; restoration allows 30 seconds per command.

Validation

Head be0846f81c868339e01a1faff6047ffe1450acee; this round changes only help/docs from f01442f6.

  • Five focused suites: 69 passed. No behavior changed or new tests needed.
  • Exact-head affected gate passed: 16,762 unit and 317 related tests; one skipped.
  • Production route, one session, at f01442f6: worktree build on local / e2e-apex; normalized screenshot restores the seed, then concurrently requested Wi-Fi off executes and survives.
  • Two-capture overlap harness, at f01442f6: two isolated embedded HTTP daemon runtimes with seeded sessions share the platform owner; both restore the seed.

The daemon's per-device claim prevents two sessions on one device, so overlap is reachable only through direct platform callers and the harness. The capture route is unchanged; live evidence was not rerun. See live evidence and this review round. Coverage/integration remain GitHub-owned.