Skip to content

[build-tools] Let serve-sim start the iOS Simulator for Appium - #4603

Merged
gwdp merged 5 commits into
mainfrom
gwdp/serve-sim-appium-startup
Oct 20, 2026
Merged

gwdp merged 5 commits into
mainfrom
gwdp/serve-sim-appium-startup

Conversation

@gwdp

@gwdp gwdp commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Why

Let serve-sim start the Simulator and app while Appium is being prepared.

How

  • Select Xcode and the Simulator once, then use the shared startup path. Check the egress guard before install/launch and wait for Appium before reporting the session.
  • Appium still handles later app actions. Existing prepared workflows and Android keep their current path.
  • Stop controller setup when Simulator startup fails; drain owned commands and preserve the first error.
  • Surviving callers retry a canceled shared FFmpeg install together.

Release compatible serve-sim, deploy the worker, then enable the new workflow inputs.

Test Plan

  • Codex rebased onto main at d0cb5a2d6, preserving preview privacy/CORS settings and idle-timeout coverage. All 260 focused tests, typecheck, changed-file lint and formatting pass locally, including two new privacy-forwarding regressions. CI passes on 9c145a4, and the Devin review of that head reported no new findings.
  • Earlier local launch E2E passed: Universe-generated steps through build-tools download/install/start to pinned serve-sim on a real iOS Simulator. Verified one app start, arguments and deep link. Cloud calls used loopback adapters. Hosted Appium runs on the current head remain pending; the hosted Argent QA of [build-tools] Let serve-sim start the iOS Simulator for Argent #4602 does not cover the Appium path.

Cold startup benchmark

Session Main median Stack median Median paired saving
appium 48.34s 34.29s 11.64s (25.4%)

Codex measured four alternating pairs per type on an initialized iPhone 17 Pro Simulator (iOS 26.4, Tart 6 CPU / 8 GiB), starting shut down with the app absent and packages cached. Timing runs from worker entry to local session reporting, using real controllers and native boot/install/launch with loopback cloud adapters.

This compares the completed startup stack e0b7462 against main 4aca8b1, with the same pinned local serve-sim #260 build; it does not isolate this PR's contribution. Hosted dispatch and first browser frame were not measured.

Savings are the median of paired differences, not the difference between the two arm medians. All four pairs were faster, by 10.53–16.61s. Appium timing ends after server readiness; WDA session creation was not measured.

Authorship and LLM use

Gabe wrote the initial implementation and guided the design. Codex implemented and split the changes. AI review led to fixes for startup order and cleanup. Gabe reviewed the final diff after the rebase, including the conflict resolution, and can answer questions.

Generated with T3 Code, using Codex and Claude Code.

@gwdp
gwdp added this pull request to stack #4604 October 10, 2026 08:40
@gwdp

This comment has been minimized.

@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.28571% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.29%. Comparing base (d0cb5a2) to head (9c145a4).

Files with missing lines Patch % Lines
...ls/src/steps/functions/startAppiumRemoteSession.ts 95.84% 4 Missing ⚠️
...ld-tools/src/steps/utils/remoteDeviceRunSession.ts 91.67% 3 Missing ⚠️
...ges/build-tools/src/steps/utils/preinstalledWda.ts 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4603      +/-   ##
==========================================
+ Coverage   75.25%   75.29%   +0.04%     
==========================================
  Files        1053     1053              
  Lines       52045    52148     +103     
  Branches    11357    11387      +30     
==========================================
+ Hits        39162    39260      +98     
- Misses      11895    11900       +5     
  Partials      988      988              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp gwdp changed the title [build-tools] Let serve-sim start Appium iOS sessions [build-tools] Let serve-sim start the iOS Simulator for Appium Oct 10, 2026
@gwdp
gwdp force-pushed the gwdp/serve-sim-appium-startup branch from 875a7e9 to 1099760 Compare October 10, 2026 16:25
@gwdp

This comment has been minimized.

@gwdp
gwdp force-pushed the gwdp/serve-sim-appium-startup branch 2 times, most recently from 56e2520 to 039acac Compare October 10, 2026 16:53
@gwdp
gwdp removed this pull request from stack #4604 October 10, 2026 16:54
@gwdp
gwdp added this pull request to stack #4606 October 10, 2026 16:55
@gwdp

This comment has been minimized.

@gwdp
gwdp force-pushed the gwdp/serve-sim-appium-startup branch 2 times, most recently from 68549a3 to 5c38164 Compare October 10, 2026 17:31
@gwdp
gwdp force-pushed the gwdp/serve-sim-appium-startup branch 2 times, most recently from 0688843 to effd1f9 Compare October 10, 2026 18:27
@gwdp
gwdp force-pushed the gwdp/serve-sim-appium-startup branch from effd1f9 to 9f6e9f8 Compare October 10, 2026 18:50
@gwdp

This comment has been minimized.

@gwdp
gwdp force-pushed the gwdp/serve-sim-appium-startup branch from 9f6e9f8 to 6b6c939 Compare October 10, 2026 20:06
@gwdp

This comment has been minimized.

@gwdp
gwdp force-pushed the gwdp/serve-sim-appium-startup branch 2 times, most recently from 1bb3828 to 8f760c3 Compare October 15, 2026 18:24
@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

devin-ai-integration[bot]

This comment was marked as resolved.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp
gwdp marked this pull request as ready for review October 15, 2026 19:08
@gwdp
gwdp requested a review from szdziedzic October 15, 2026 19:08
@gwdp
gwdp removed this pull request from stack #4606 October 17, 2026 01:44
@gwdp
gwdp added this pull request to stack #4671 October 17, 2026 01:44
Base automatically changed from gwdp/serve-sim-argent-startup to main October 20, 2026 00:12
@gwdp
gwdp force-pushed the gwdp/serve-sim-appium-startup branch from 98e7731 to 9c145a4 Compare October 20, 2026 01:09
@gwdp

gwdp commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Codex rebased #4603 onto current main d0cb5a2d6, including merged #4602. New head: 9c145a490.

Resolved the conflicts by retaining main’s preview privacy, frame-ancestor/CORS settings and idle-timeout test coverage alongside Appium startup and failure cleanup. Added two focused tests for forwarding those preview settings on prepared and consolidated startup paths; both reject the missing-forwarding resolution. All 260 focused tests, typecheck, changed-file lint and formatting pass. No hosted Appium or device run was performed for this rebase; fresh CI and Devin review are pending. Upper stack branches were left unchanged.

— Codex

@gwdp

gwdp commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

/devin review

Please review rebased head 9c145a490, especially preview privacy/CORS forwarding, idle-timeout compatibility, startup error propagation and shared FFmpeg ownership. The worker targets current main after merged #4602.

— Codex

@devin-ai-integration

Copy link
Copy Markdown

Starting Devin Review.

Devin Review

@github-actions

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

@gwdp
gwdp merged commit 5ec3d84 into main Oct 20, 2026
11 checks passed
@gwdp
gwdp deleted the gwdp/serve-sim-appium-startup branch October 20, 2026 02:12
AndrewSouthpaw added a commit to AndrewSouthpaw/eas-cli that referenced this pull request Oct 22, 2026
…t-dirs

* upstream/main: (128 commits)
  [build-tools] stop logging workflow hook parsing in build logs (expo#4717)
  [build-tools] retry download_build network failures and report their cause (expo#4690)
  [eas-cli][build-tools] Bump Node.js to 22.23.4 (expo#4714)
  [eas-cli] make command descriptions lowercase without trailing periods (expo#4385)
  [build-tools] Add `max_duration_seconds` to sandboxes (expo#4702)
  [eas-cli] Show simulator session errors in simulator:get (expo#4694)
  [eas-cli] Show why a simulator session failed to start (expo#4693)
  [worker] Mask secrets in every field of uploaded log records (expo#4698)
  [eas-build-job][build-tools] Check Android launch inputs before the session starts (expo#4696)
  bump STAGING and PRODUCTION to 25.3.0 in cli-versions.json
  v25.3.0
  [eas-cli] Add --system-image to eas simulator:start (expo#4500)
  [build-tools] Wait up to five minutes for Google Play to process an uploaded bundle (expo#4700)
  [build-tools] Quote Android launch arguments for the device shell (expo#4695)
  [build-tools] Forward network capture through local egress (expo#4598)
  [build-tools] Let serve-sim start the iOS Simulator for Appium (expo#4603)
  [build-tools] Let serve-sim start the iOS Simulator for Argent (expo#4602)
  [build-tools] Upload iOS Simulator session screen recording metadata (expo#4689)
  [build-tools] Reset the session idle timer on serve-sim preview input (expo#4691)
  [eas-cli] Add a checkout prompt experiment to the Free plan build limit error (expo#4633)
  ...
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.

2 participants