Skip to content

fix: harden iOS replay runner prewarm#705

Merged
thymikee merged 4 commits into
mainfrom
codex/ios-replay-runner-reliability
Jun 7, 2026
Merged

fix: harden iOS replay runner prewarm#705
thymikee merged 4 commits into
mainfrom
codex/ios-replay-runner-reliability

Conversation

@thymikee
Copy link
Copy Markdown
Member

@thymikee thymikee commented Jun 7, 2026

Summary

  • Health-check iOS runner prewarm through the existing prepare/uptime path so stale cached runners are recovered before replay commands.
  • Stop stale Apple runner sessions during iOS relaunch across CLI process boundaries: first shut down any in-memory session, then terminate device-scoped xcodebuild test-without-building runner processes left by standalone prepare.
  • Clean stale device-scoped xcodebuild runner processes before launching a new local runner session, so CI remains reliable even when prepare ios-runner was skipped.
  • Start normal iOS runner prewarm after app open, while preserving the Maestro before-open path.
  • Add runner command lifecycle log lines and upload iOS replay attempt artifacts under test/artifacts paths.
  • Touched files: 9; scope stayed within iOS replay runner reliability, session open ordering, workflow artifacts, and diagnostics.

Validation

  • pnpm exec vitest run src/platforms/ios/__tests__/runner-session.test.ts src/daemon/handlers/__tests__/session.test.ts src/platforms/ios/__tests__/runner-command-retry.test.ts
  • pnpm check:quick
  • pnpm build
  • pnpm build:xcuitest
  • node --experimental-strip-types src/bin.ts prepare ios-runner --platform ios --timeout 300000 --json
  • node --experimental-strip-types src/bin.ts test test/integration/replays/ios/simulator/01-settings.ad --retries 2 --artifacts-dir test/artifacts/replays-ios-simulator-smoke-local-stale-kill --report-junit test/artifacts/replays-ios-simulator-smoke-local-stale-kill.junit.xml passed first attempt in 13.9s; runner log showed the stale prepared runner ended with BUILD INTERRUPTED, not XCTest TEST EXECUTE FAILED.
  • No-prework validation: after pnpm clean:daemon, ran node --experimental-strip-types src/bin.ts test test/integration/replays/ios/simulator/01-settings.ad --retries 2 --artifacts-dir test/artifacts/replays-ios-simulator-smoke-local-no-prework --report-junit test/artifacts/replays-ios-simulator-smoke-local-no-prework.junit.xml; passed first attempt in 16.6s, with open doing runner prewarm and subsequent runner-backed actions completing quickly.
  • pnpm check:unit was rerun outside the sandbox and failed in unrelated Android .aab tests; rerunning that file directly passed: pnpm exec vitest run src/platforms/android/__tests__/index.test.ts

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

Size Report

Metric Base Current Diff
JS raw 1.1 MB 1.1 MB +469 B
JS gzip 372.1 kB 372.2 kB +97 B
npm tarball 482.7 kB 482.9 kB +239 B
npm unpacked 1.6 MB 1.6 MB +1.1 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 25.9 ms 25.9 ms -0.1 ms
CLI --help 41.2 ms 41.2 ms +0.1 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/2415.js +471 B +108 B
dist/src/session.js -2 B -11 B

@thymikee thymikee merged commit 5c083ea into main Jun 7, 2026
18 checks passed
@thymikee thymikee deleted the codex/ios-replay-runner-reliability branch June 7, 2026 18:37
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 7, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-07 18:37 UTC

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.

1 participant