fix(ios): prepare snapshot helpers within a shared readiness budget

AN
18h ago
+1493-683

Summary

Cold Simulator AX startup can consume a capture deadline. Preparation and connection share two seconds; detached startup has a ten-second ceiling. Pending startup permits XCTest fallback without retiring the generation. Initialize the native runtime before listener readiness and await owned work on close.

Retain late startup failures for their starting generation without replay to new generations. Fix three fixture issues. 13 files change; startup notes move to apple/snapshot-bridge/README.md. No public API change or linked issue.

Rebased on main 4abff15e, after #4172 and #4217. The readiness fixture now links #4172's SnapshotBridgeSurfaceHosts.m, and adapter helpers moved to adapter.fixtures.ts to keep adapter.test.ts under the line limit. Production diffs are unchanged by the rebase.

Validation

Head bfbead48f2c9b02bcac1cf5d94b8ee6756bc7afb; base 4abff15edaf7a2634f1b2a00edd742a14e808630.

  • pnpm check:affected --run --head HEAD: 41 checks passed, exact commit; 25 lanes skipped, not passes. Broad unit: 17,364 passed, 1 skipped.
  • Focused snapshot-source, detached-attempt and route tests: 245/245. Darwin cache-native-runtime.test.ts (included): 51/51, 0 skipped, including both readiness scenarios.
  • Accepted live evidence predates the fix. Exact cold-AX pending recovery and the wider runtime matrix remain unobserved; XCTest fallback remains a workaround.
  • With a capture budget of 2 s or less, one helper death can surface twice; the route retires the generation on the first. The default is 5 s, and no production caller sets a shorter budget.
  • The Vercel check fails on deployment authorization, unrelated to this change.

AI-assisted under Andrew's direction using OpenAI Codex and Claude.