Skip to content

[build-tools] Stop remote simulator sessions after max_idle_time_minutes without activity - #4157

Merged
szdziedzic merged 1 commit into
mainfrom
szdziedzic-claude/eas-simulator-idle-timeout-build-tools
Aug 6, 2026
Merged

[build-tools] Stop remote simulator sessions after max_idle_time_minutes without activity#4157
szdziedzic merged 1 commit into
mainfrom
szdziedzic-claude/eas-simulator-idle-timeout-build-tools

Conversation

@szdziedzic

@szdziedzic szdziedzic commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Why

Now we have event logs for agent-device and argent and we can finally add --max-idel-time-minutes setting to simulator session.

How

  • eas/start_argent_remote_session and eas/start_agent_device_remote_session get a new optional max_idle_time_minutes input. A missing value disables the timeout.
  • we record timestamp of latest event
  • we pass it to waitForDeviceRunSessionStoppedAsync and use it to stop a session when we go over max idle time

For now only argent/agent-device session events count as activity. Interaction through the serve-sim web preview does not produce these events yet.

Deployment order

  1. **This PR (build-tools)
  2. https://github.com/expo/universe/pull/29784 (WWW)
  3. [eas-cli] Add --max-idle-time-minutes flag to eas simulator #4156 (CLI flag)

Test Plan

CI passes

…tes without activity

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@szdziedzic
szdziedzic force-pushed the szdziedzic-claude/eas-simulator-idle-timeout-build-tools branch from 4510039 to 54494b6 Compare August 5, 2026 21:21
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.11111% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.45%. Comparing base (54f0b53) to head (54494b6).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...c/steps/functions/startAgentDeviceRemoteSession.ts 0.00% 4 Missing ⚠️
...ls/src/steps/functions/startArgentRemoteSession.ts 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4157      +/-   ##
==========================================
+ Coverage   62.43%   62.45%   +0.02%     
==========================================
  Files        1008     1008              
  Lines       45730    45762      +32     
  Branches     9625     9637      +12     
==========================================
+ Hits        28548    28577      +29     
- Misses      15721    15724       +3     
  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.

@szdziedzic
szdziedzic requested review from gwdp, krystofwoldrich and sjchmiela and removed request for sjchmiela August 5, 2026 21:38
@szdziedzic
szdziedzic marked this pull request as ready for review August 5, 2026 21:38

@krystofwoldrich krystofwoldrich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good.

@krystofwoldrich krystofwoldrich added the ai-review Commits pushed to PRs with this label be automatically reviewed. label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

🤖 AI code review

Decision: Approve

Overall PR risk: Low. The change is additive: it adds an optional max_idle_time_minutes input to eas/start_argent_remote_session and eas/start_agent_device_remote_session, and an optional idle-timeout branch to the shared waitForDeviceRunSessionStoppedAsync wait loop. When the input is absent, the code runs exactly as before, so no existing workflow is affected until someone opts in. No reviewer reported a concrete correctness, consistency, or security defect. The main plausible risk noted by the security reviewer is that an opted-in session could stop early, because only agent-device and argent event logs count as activity; a user who only watches the serve-sim web preview produces no such events. This risk is bounded to the two new step files, and rollback is direct by removing the input or reverting the step files and wait loop.

No findings.


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

@szdziedzic
szdziedzic merged commit 42cf2cb into main Aug 6, 2026
14 checks passed
@szdziedzic
szdziedzic deleted the szdziedzic-claude/eas-simulator-idle-timeout-build-tools branch August 6, 2026 15:35
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