Skip to content

[build-tools] Avoid cold runtime scans with preinstalled WDA - #4618

Merged
gwdp merged 5 commits into
mainfrom
gwdp/wda-preinstalled-startup-20261013
Oct 14, 2026
Merged

gwdp merged 5 commits into
mainfrom
gwdp/wda-preinstalled-startup-20261013

Conversation

@gwdp

@gwdp gwdp commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

Cold WDA startup can trigger a slow Simulator runtime scan.

How

Use Appium’s matching preinstalled WDA runner, with a bounded download and fallback to xcodebuild. Security protections stay enabled. The release note is an @expo/build-tools patch changeset.

Test Plan

Production QA passed on three fresh Xcode 26.6/iOS 26.5 workers: preparation + first Appium connection 10.14 / 13.27 / 10.56s, versus 107.39s for a fresh legacy control with an 81.18s runtime scan. Optimized captured logs contain no runtime scan; all three ~150s recordings saved manifests and fully decoded. Legacy recording was partial, without a manifest.

Ordinary API smoke passed app interaction, screenshots/source and 150s hold, with a fully decoded 161.73s video. Allocation took 68.25s; first Appium connection took 7.22s. Worker logs confirm preinstalled WDA without a client override.

66 focused tests, lint/format, Node 22/24 CI and changeset checks passed. Prior Tart Xcode 27/iOS 27 validated recording, real 60s timeout and xcodebuild fallback (34.7s first connection). Local typecheck retains 7 existing non-WDA errors.

Limits: sampled workers had 10/20 GB RAM; this is not a fleet guarantee. Download-failure fallback recording and broader runtimes remain unverified. Ordinary API logs expose no direct helper hash.

Authorship and LLM use

Gabe directed and reviewed the original patch. Codex implemented it, fixed Szymon’s timeout finding, and rebased/moved the release note to a changeset; human review of the follow-up is pending.

— Codex

@gwdp

This comment has been minimized.

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.38%. Comparing base (8545feb) to head (78fd6c7).

Files with missing lines Patch % Lines
...ges/build-tools/src/steps/utils/preinstalledWda.ts 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4618      +/-   ##
==========================================
+ Coverage   74.37%   74.38%   +0.02%     
==========================================
  Files        1027     1028       +1     
  Lines       50215    50242      +27     
  Branches    10856    10859       +3     
==========================================
+ Hits        37342    37368      +26     
- Misses      11883    11884       +1     
  Partials      990      990              

☔ 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

This comment has been minimized.

@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@gwdp
gwdp requested a review from szdziedzic October 14, 2026 03:20
@gwdp
gwdp marked this pull request as ready for review October 14, 2026 03:20
Comment thread packages/build-tools/src/steps/utils/preinstalledWda.ts Outdated
@gwdp

This comment has been minimized.

@devin-ai-integration

This comment has been minimized.

@gwdp
gwdp force-pushed the gwdp/wda-preinstalled-startup-20261013 branch from 37dfb6b to 6c88224 Compare October 14, 2026 21:16
@gwdp
gwdp force-pushed the gwdp/wda-preinstalled-startup-20261013 branch from 6c88224 to 3d19a14 Compare October 14, 2026 21:23
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding a changeset!

@gwdp
gwdp merged commit 7ebd9f1 into main Oct 14, 2026
10 checks passed
@gwdp
gwdp deleted the gwdp/wda-preinstalled-startup-20261013 branch October 14, 2026 22:30
@gwdp

gwdp commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Production QA confirms a nice win: ~90% lower median cold-start time on fresh hosted workers.

Codex ran the tests after production promotion and verified the helper actually loaded on each diagnostic VM. On Xcode 26.6/iOS 26.5, preparation + first Appium connection took 10.14 / 13.27 / 10.56s, versus 107.39s for a fresh legacy control. The control logged an 81.18s runtime scan and reproduced a partial recording without a manifest. Optimized captured logs contained no runtime scan; all three ~150s recordings saved manifests and fully decoded without errors. Benchmark evidence.

The ordinary API smoke also passed: 7.22s first Appium connection after 68.25s allocation-to-ready, app interaction/screenshots/source, and a 150s hold. Its complete 161.73s recording decoded without errors; worker logs confirmed preinstalled WDA without a client override.

Security remained enabled. Owned sessions are stopped and monitoring is disabled. These are sampled results (10/20 GB medium workers), not a fleet guarantee; download-failure fallback recording and broader runtimes remain unverified.

— Codex

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