Skip to content

[eas-build-job] add DeviceRunSession.Job - #4412

Draft
szdziedzic wants to merge 1 commit into
mainfrom
szdziedzic-claude/eas-simulator-job-schema
Draft

szdziedzic wants to merge 1 commit into
mainfrom
szdziedzic-claude/eas-simulator-job-schema

Conversation

@szdziedzic

@szdziedzic szdziedzic commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Why

EAS Simulator sessions (device run sessions) currently reach the worker as a Generic.Job with a hand-built list of eas/* steps. The steps engine runs strictly in sequence, so the build download, tool installs, and TURN credential fetch all wait for the simulator boot, and ordering rules such as "capture must start before the app launches" live only in the API server's step lists. See the discussion in expo/universe#30577.

This is the first PR of a stack that gives sessions a typed job payload and a worker-owned lifecycle:

  1. [eas-build-job] add DeviceRunSession.Job #4412 (this PR) [eas-build-job] the DeviceRunSession.Job payload
  2. [build-tools] add device run session runner #4413 [build-tools] the session runner
  3. [worker] run device run session jobs #4414 [worker] dispatch

How

  • Adds DeviceRunSession.Job (packages/eas-build-job/src/deviceRunSessionJob.ts): a Zod schema describing the session (controller, duration, idle timeout, tunnel domain), the device (iOS or Android, discriminated on platform), the optional application to install and launch, and the optional local egress.
  • type: 'device-run-session' is the job-family discriminator. Generic.JobZ already reserves platform and type as never for this purpose; build jobs use type for their Workflow, generic jobs leave it undefined, and session jobs set this literal. The comment in generic.ts now names all three families.
  • Exports Generic.BuilderEnvironmentSchemaZ so the new schema reuses it, and exports the StaticWorkflowInterpolationContext type.
  • This PR does not add the new job to the Job union yet; [build-tools] add device run session runner #4413 does that together with the code that handles it.

Test Plan

  • New schema tests: valid iOS and Android payloads round-trip, and the schema rejects local egress on Android, an idle timeout that is not shorter than the duration, two application sources, a build-job type, a set platform, and an empty session id.
  • yarn typecheck, yarn lint, yarn fmt:check, and cd packages/eas-build-job && yarn test pass.

🤖 Generated with Claude Code

@szdziedzic
szdziedzic added this pull request to stack #4415 September 15, 2026 19:45
@szdziedzic
szdziedzic force-pushed the szdziedzic-claude/eas-simulator-job-schema branch from f4682fc to 37c3973 Compare September 15, 2026 19:47
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.21%. Comparing base (97007d1) to head (37c3973).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4412      +/-   ##
==========================================
+ Coverage   72.19%   72.21%   +0.02%     
==========================================
  Files         970      971       +1     
  Lines       46046    46071      +25     
  Branches     9875     9882       +7     
==========================================
+ Hits        33240    33265      +25     
  Misses      11811    11811              
  Partials      995      995              

☔ 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant