Skip to content

[build-tools] Record Android sessions by default through a session host - #4418

Open
vonovak wants to merge 11 commits into
mainfrom
codex/android-session-recording-poc
Open

vonovak wants to merge 11 commits into
mainfrom
codex/android-session-recording-poc

Conversation

@vonovak

@vonovak vonovak commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Why

Upload Android session recordings through the existing screen-recording artifact contract so the website replays them next to automation events. Recording must outlive preview tunnels: closing or replacing a preview must not stop it, and upload must not delay automation cleanup.

How

  • Record Android sessions by default, like iOS.
  • The worker starts the Hub with a recording directory and a stop token, finalizes the recording before stopping the Hub, and uploads it with the existing metadata.
  • DeviceSessionHost owns the process and the recording for the whole session. A preview is just a tunnel to it; closing a preview no longer stops the process. finishAsync() is terminal and idempotent. Agent Device, Appium, Argent and web-preview callers migrate; the old combined API is removed.
  • iOS and Android share the recording validation and upload code. Automation cleanup runs alongside host finalization.

Stack 1/6: this PR → #4420#4430#4431#4435#4441. Companion Hub PR: expo/expo-device-hub#112.

Rollout: publish the Hub release first. Recording needs exactly one booted emulator; otherwise the Hub starts without it and logs a warning. iOS recording steps are unchanged.

Test plan

  • Host tests cover no-preview recording, concurrent opens and finish, close and reopen, stale handles, late opens and failure cleanup, for all four callers.
  • Local end-to-end: API session, Android capture, real Agent Device events, website stop, uploads and playback with marker seeking.
  • Not exercised: production Linux launcher, a new live iOS session.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.50980% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.36%. Comparing base (30a3924) to head (e36c377).

Files with missing lines Patch % Lines
...rc/steps/utils/deviceRunSessionScreenRecordings.ts 84.22% 6 Missing ⚠️
...ls/src/steps/functions/startArgentRemoteSession.ts 83.34% 3 Missing ⚠️
...s/build-tools/src/steps/utils/deviceSessionHost.ts 98.13% 3 Missing ⚠️
...unctions/uploadDeviceRunSessionScreenRecordings.ts 75.00% 1 Missing ⚠️
...ld-tools/src/steps/utils/remoteDeviceRunSession.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4418      +/-   ##
==========================================
+ Coverage   72.30%   72.36%   +0.06%     
==========================================
  Files         970      972       +2     
  Lines       46146    46219      +73     
  Branches     9906     9924      +18     
==========================================
+ Hits        33363    33442      +79     
+ Misses      11788    11783       -5     
+ Partials      995      994       -1     

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

@vonovak vonovak changed the title [build-tools] Add opt-in Android session recording upload [build-tools] Record Android sessions by default Sep 17, 2026
@vonovak
vonovak force-pushed the codex/android-session-recording-poc branch from 5898c5c to c5e8a2c Compare September 17, 2026 08:39
@vonovak vonovak changed the title [build-tools] Record Android sessions by default [build-tools] Record Android sessions by default through a session host Sep 17, 2026
@vonovak
vonovak marked this pull request as ready for review September 17, 2026 15:15
@vonovak
vonovak marked this pull request as draft September 17, 2026 15:16
@vonovak
vonovak removed this pull request from stack #4421 September 17, 2026 16:06
@vonovak
vonovak marked this pull request as ready for review September 17, 2026 16:06
@vonovak
vonovak added this pull request to stack #4432 September 17, 2026 16:06
@vonovak
vonovak force-pushed the codex/android-session-recording-poc branch from 2a49381 to e4abd13 Compare September 18, 2026 08:09
vonovak and others added 2 commits September 18, 2026 11:59
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D29AEWN9ajZXbzobHUH4fF
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

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