Skip to content

feat: add iOS runner prepare command#673

Merged
thymikee merged 4 commits into
mainfrom
codex/prepare-ios-runner
Jun 2, 2026
Merged

feat: add iOS runner prepare command#673
thymikee merged 4 commits into
mainfrom
codex/prepare-ios-runner

Conversation

@thymikee
Copy link
Copy Markdown
Member

@thymikee thymikee commented Jun 2, 2026

Summary

Add agent-device prepare ios-runner --platform ios [--timeout <ms>] as an explicit CI/bootstrap command.

The command resolves the target iOS device, ensures it is ready, starts/reuses the XCTest runner via a lightweight uptime command, and reports timing/output without launching an app or mutating session state.

Document the command in help workflow for iOS CI before replay/test so the runner build/start cost is paid before the first snapshot.

Timeout behavior is explicit:

  • prepare ios-runner now defaults to a cold-build-safe 240s request timeout, while still accepting --timeout.
  • snapshot defaults to a faster 30s request timeout and now accepts --timeout <ms> as an escape hatch for legitimately slow captures.
  • Snapshot timeout hints point first-time iOS runner startup users toward prepare ios-runner.

prepare is intentionally kept out of the MCP tool surface because it is a shell/CI bootstrap command; agents already get runner prewarm through normal open flows.

Validation

  • pnpm exec vitest run src/utils/__tests__/daemon-client.test.ts src/utils/__tests__/args.test.ts src/daemon/handlers/__tests__/session.test.ts src/commands/__tests__/command-surface-metadata.test.ts src/mcp/__tests__/router.test.ts
  • pnpm check (outside sandbox)
  • node bin/agent-device.mjs snapshot --help
  • node bin/agent-device.mjs prepare --help
  • AGENT_DEVICE_STATE_DIR=/private/tmp/agent-device-feedback-state node bin/agent-device.mjs prepare ios-runner --platform ios --device "iPhone 17 Pro" --verbose -> Prepared iOS runner: iPhone 17 Pro
  • AGENT_DEVICE_STATE_DIR=/private/tmp/agent-device-feedback-state node bin/agent-device.mjs snapshot -i --platform ios --device "iPhone 17 Pro" --timeout 30000 --json -> passed in ~6.5s

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Size Report

Metric Base Current Diff
JS raw 1.1 MB 1.1 MB +586 B
JS gzip 363.1 kB 363.2 kB +128 B
npm tarball 468.0 kB 468.1 kB +122 B
npm unpacked 1.6 MB 1.6 MB +817 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 24.8 ms 25.0 ms +0.2 ms
CLI --help 39.3 ms 39.3 ms +0.0 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/args.js -1.7 kB -539 B
dist/src/session.js +910 B +262 B
dist/src/1352.js +471 B +140 B
dist/src/9542.js +349 B +134 B
dist/src/command-metadata.js +172 B +45 B

@thymikee thymikee merged commit 041b482 into main Jun 2, 2026
18 checks passed
@thymikee thymikee deleted the codex/prepare-ios-runner branch June 2, 2026 19:08
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-02 19:08 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