Skip to content

[eas-cli] Add --max-idle-time-minutes flag to eas simulator - #4156

Draft
szdziedzic wants to merge 1 commit into
mainfrom
szdziedzic-claude/eas-simulator-idle-timeout-2c8cf2
Draft

[eas-cli] Add --max-idle-time-minutes flag to eas simulator#4156
szdziedzic wants to merge 1 commit into
mainfrom
szdziedzic-claude/eas-simulator-idle-timeout-2c8cf2

Conversation

@szdziedzic

@szdziedzic szdziedzic commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Why

EAS Simulator sessions cost money while they run. Today a session that nobody uses keeps running until its max duration. This PR adds the CLI half of an opt-in idle timeout: the user sets it when starting the session, and EAS stops the session after that many minutes without activity.

Related PRs:

How

eas simulator gets a new optional --max-idle-time-minutes integer flag. It is passed as maxIdleTimeMinutes on CreateDeviceRunSessionInput. The CLI only rejects negative values; the server owns the allowed range and rejects the value for serve-sim sessions, which have no activity signal yet.

generated.ts is hand-edited to include the new input field until the server schema ships.

Deployment order

  1. [build-tools] Stop remote simulator sessions after max_idle_time_minutes without activity #4157 (build-tools) — land and release first, then deploy to workers. Not a hard dependency: old build-tools ignores the unknown max_idle_time_minutes step input, so jobs never crash on it. The timeout only takes effect once workers run that code.
  2. https://github.com/expo/universe/pull/29784 (WWW) — deploy second. It stores maxIdleTimeMinutes, adds the mutation input field, and starts sending the step input.
  3. This PR (CLI flag) — land last, after the WWW deploy. The GraphQL server rejects the unknown maxIdleTimeMinutes input field until then, and the verify-graphql-code check here fails until the schema ships.

Test Plan

  • New unit test: the flag is passed through to the createDeviceRunSession mutation.
  • eas-cli simulator suites pass. yarn typecheck, yarn lint, and yarn fmt:check are clean across all packages.

🤖 Generated with Claude Code

@szdziedzic
szdziedzic force-pushed the szdziedzic-claude/eas-simulator-idle-timeout-2c8cf2 branch from 5d7a255 to 95419a1 Compare August 5, 2026 18:18
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 62.43%. Comparing base (54f0b53) to head (9ced7ee).

Files with missing lines Patch % Lines
.../src/graphql/mutations/DeviceRunSessionMutation.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4156   +/-   ##
=======================================
  Coverage   62.43%   62.43%           
=======================================
  Files        1008     1008           
  Lines       45730    45730           
  Branches     9625     9625           
=======================================
  Hits        28548    28548           
  Misses      15721    15721           
  Partials     1461     1461           

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@szdziedzic
szdziedzic force-pushed the szdziedzic-claude/eas-simulator-idle-timeout-2c8cf2 branch from 95419a1 to e933995 Compare August 5, 2026 21:22
@szdziedzic szdziedzic changed the title [eas-cli][build-tools] Add opt-in max idle time for EAS Simulator sessions [eas-cli] Add --max-idle-time-minutes flag to eas simulator Aug 5, 2026
@brentvatne brentvatne added the ai-review Commits pushed to PRs with this label be automatically reviewed. label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

🤖 AI code review

Decision: Approve

Overall PR risk: Low. The change is additive: it adds one optional --max-idle-time-minutes flag to eas simulator and forwards it as maxIdleTimeMinutes on the existing CreateDeviceRunSessionInput. When the flag is not set, the mutation payload stays the same as before, so the --json/--non-interactive paths, SIGINT cleanup, and polling loop are all unaffected. No reviewer reported a correctness, consistency, or security defect. The main plausible risk is scoped to sessions where a user sets the flag, and it depends on server-side validation that ships in a separate PR; the blast radius is one command and one opt-in flag, and rollback is direct.

No findings.


This review is advisory — it never blocks a merge and never auto-approves.

@szdziedzic
szdziedzic force-pushed the szdziedzic-claude/eas-simulator-idle-timeout-2c8cf2 branch 2 times, most recently from 9ced7ee to e933995 Compare August 5, 2026 21:52
@github-actions

github-actions Bot commented Aug 5, 2026

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

ai-review Commits pushed to PRs with this label be automatically reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants