Skip to content

[build-tools] replace record-sim with serve-sim recording - #4474

Draft
gwdp wants to merge 1 commit into
mainfrom
gabe/serve-sim-recording-consumer
Draft

gwdp wants to merge 1 commit into
mainfrom
gabe/serve-sim-recording-consumer

Conversation

@gwdp

@gwdp gwdp commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

Build-tools currently starts record-sim, which captures and encodes the simulator screen separately from serve-sim's WebRTC stream. The serve-sim stack now records from its shared H.264 output, so build-tools should use that client and remove the extra binary.

Depends on expo/serve-sim#208 being released first.

How

Start serve-sim record-video using the same serve-sim package spec as the preview. Wait for the token-bearing preview and recording start acknowledgement, then stop with SIGINT and wait for the manifest; retain SIGKILL fallback and retries. Remove record-sim source and worker packaging. The upload step and manifest schema are unchanged.

Test Plan

# packages/build-tools
corepack yarn jest-unit --runInBand src/steps/utils/__tests__/IosSimulatorRecordingUtils.test.ts src/steps/utils/__tests__/remoteDeviceRunSession.test.ts src/steps/functions/__tests__/uploadDeviceRunSessionScreenRecordings.test.ts
                                              73 passed
corepack yarn typecheck                        passed

# repository root
corepack yarn lint                             passed, 0 warnings/errors
corepack yarn oxfmt --check packages/build-tools/src/steps/utils/IosSimulatorRecordingUtils.ts packages/build-tools/src/steps/utils/remoteDeviceRunSession.ts packages/build-tools/src/steps/utils/__tests__/IosSimulatorRecordingUtils.test.ts packages/build-tools/src/steps/utils/__tests__/remoteDeviceRunSession.test.ts
                                              passed
bash -n packages/worker/package.sh            passed
jq empty packages/build-tools/package.json    passed
git diff origin/main...HEAD --check            passed

The built local serve-sim CLI was also exercised in a Tart VM (Xcode 26.4, pinned iPhone 17 UDID EF9955A9-7D07-4D5F-BC33-1A946BB52958). Recording with 0, 1, and 2 H.264 WebRTC viewers produced the existing manifest schema and decodable MP4s. The two-viewer run showed 357 shared encode completions, 353 frames sent to each peer, and 361 MP4 frames over seven seconds. This validates the serve-sim CLI contract and upload manifest shape; a full hosted EAS worker run remains unverified.

@gwdp gwdp added the no changelog PR that doesn't require a changelog entry label Sep 25, 2026
@github-actions

Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.35294% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.62%. Comparing base (b1f886e) to head (a0f3012).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...ools/src/steps/utils/IosSimulatorRecordingUtils.ts 81.02% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4474      +/-   ##
==========================================
+ Coverage   72.42%   72.62%   +0.20%     
==========================================
  Files         975      975              
  Lines       46617    46682      +65     
  Branches    10069    10081      +12     
==========================================
+ Hits        33760    33897     +137     
+ Misses      11857    11794      -63     
+ Partials     1000      991       -9     

☔ 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.

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

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant