Skip to content

feat(ios): route Simulator snapshots through AX bridge - #2279

Open
thymikee wants to merge 1 commit into
mainfrom
codex/2197-simulator-routing
Open

feat(ios): route Simulator snapshots through AX bridge#2279
thymikee wants to merge 1 commit into
mainfrom
codex/2197-simulator-routing

Conversation

@thymikee

@thymikee thymikee commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

Closes #2197.

Eligible local iOS Simulator snapshots now use the packaged AX bridge and the existing TypeScript presentation engine. XCTest remains the typed, generation-scoped fallback; a failed bridge attempt disables that generation, while a relaunched app may try the bridge again.

The route preserves full producer, intent, generation, presentation, and fallback identity so post-action comparison fails closed across source changes. Providers, physical devices, tvOS, macOS, custom actions, interactions, and XCTest runner prewarm are unchanged. Runtime shutdown also closes the bridge helper.

Scope: 19 files in the Apple snapshot command family and shared snapshot identity contracts; no neighboring command family was added.

Validation

Validated commit 1600d40.

  • pnpm check:affected --run passed all runnable gates: format, lint, types, layering, fallow, builds, and 5,587 tests across 731 files.
  • Planted-red checks proved routing/circuit behavior and fail-closed tap corroboration.
  • On an iOS 26.2 Simulator, exact target resolution found the app PID/generation; the bridge acquired and TypeScript presented 26 interactive nodes with simulator-ax-bridge identity. The helper closed and the simulator was restored.
  • The public open path reached unchanged XCTest prewarm but Xcode package resolution timed out before session creation. No stale device claim remained; GitHub native/device lanes remain authoritative.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 2.61 MB 2.64 MB +33.7 kB
JS gzip 878.4 kB 889.4 kB +11.0 kB
npm bundled raw 2.61 MB 2.64 MB +33.7 kB
npm bundled gzip 878.4 kB 889.4 kB +11.0 kB
npm tarball 1.04 MB 1.05 MB +10.3 kB
npm unpacked 3.52 MB 3.56 MB +34.4 kB
npm clean-installed 3.52 MB 3.56 MB +34.4 kB

npm unpacked components

Component Base Current Diff
JS / dist source 2.77 MB 2.80 MB +34.3 kB
Apple runner source/project 544.4 kB 544.4 kB 0 B
Apple snapshot presentation source 33.8 kB 33.8 kB 0 B
Apple Simulator snapshot bridge source 30.5 kB 30.5 kB 0 B
macOS helper source 54.8 kB 54.8 kB 0 B
Android helper artifacts 43.3 kB 43.3 kB 0 B
Other package files 46.7 kB 46.8 kB +77 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 32.1 ms 30.0 ms -2.0 ms
CLI --help 84.7 ms 80.2 ms -4.5 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/runtime4.js +4.1 kB +1.5 kB
dist/src/interaction2.js +301 B +61 B
dist/src/interactor.js +70 B +10 B

Top changed packed files

Packed file Base Current Diff
dist/src/adapter.js 0 B 27.2 kB +27.2 kB
dist/src/runtime4.js 51.3 kB 55.4 kB +4.1 kB
dist/src/ios-snapshot-planning.js 0 B 1.9 kB +1.9 kB
dist/src/runner-presentation.js 5.8 kB 5.1 kB -706 B
dist/src/sdk-selectors.d.ts 35.8 kB 36.3 kB +501 B
dist/src/ios-snapshot-runtime.js 10.2 kB 10.7 kB +488 B
dist/src/interaction2.js 33.5 kB 33.8 kB +301 B
dist/src/apps-simctl.js 0 B 264 B +264 B
dist/src/physical-device-control.js 14.8 kB 14.6 kB -184 B
dist/src/sdk-contracts.d.ts 18.3 kB 18.4 kB +125 B

@thymikee

thymikee commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

Review at exact head 1600d40d077b02a547349396b0677d15902bb7ab: blocked on two comparison-lineage bugs plus the exact-head iOS failure.

  1. snapshot-route.ts stamps XCTest fallback with the pre-acquisition target lineage. When bridge acquisition reports a stale/relaunched target, XCTest may capture the new app while the result is labeled with the old generation. Re-resolve before fallback or make that fallback explicitly incomparable, and add a stale-generation -> fallback regression.
  2. Target-resolution failure creates a comparison identity with only stable targetId; two results with omitted generations compare equal. They can straddle an app relaunch and still be treated as one baseline. Unknown-generation fallback must fail closed across comparisons, with a closest-negative regression.
  3. Exact-head iOS Smoke is red: the regular depth-1 fixture now routes through the bridge and no longer provides the asserted snapshotQuality.backend === "tree". Reconcile the shipped output/evidence contract and rerun the iOS lane green.

The route otherwise reuses the Apple runtime/facade and shutdown seams cleanly, and the merged source lifecycle already provides authoritative OS process-start-time checks around acquisition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ios): route Simulator snapshots through the bridge with bounded fallback

1 participant