fix: long mobile media recordings time out - #99455
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 7:34 AM ET / 11:34 UTC. Summary PR surface: Source +24, Tests +4. Total +28 across 2 files. Reproducibility: yes. from source inspection. Current main allows recording durations up to 300,000ms while the agent transport and Gateway node invoke timers default to 30,000ms; I did not run a failing live current-main repro. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge the shared recording timeout helper once required current-head checks finish, preserving explicit transport and invoke timeout overrides. Do we have a high-confidence way to reproduce the issue? Yes from source inspection. Current main allows recording durations up to 300,000ms while the agent transport and Gateway node invoke timers default to 30,000ms; I did not run a failing live current-main repro. Is this the best way to solve the issue? Yes. The dedicated node media tool is the narrow owner for these recording wait budgets, and using the existing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b52d98861e8c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +24, Tests +4. Total +28 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
28850e6 to
5390352
Compare
5390352 to
b6b05aa
Compare
b6b05aa to
4a08902
Compare
|
Land-ready verification for exact head
Known proof gap: emulator camera output was validated as a real playable MP4 and through Gateway timing/logs; no useful visual screenshot distinguishes this timeout-only behavior change. |
|
Exact-head closeout for
The timeout-only change has no meaningful screenshot delta; the real media artifact, Gateway timing, and exact-source invocation are the useful proof. |
|
Merged via squash.
|
* fix node media recording invoke timeouts * refactor(agents): separate recording timeout budgets --------- Co-authored-by: NianJiuZst <180004567+NianJiuZst@users.noreply.github.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
What Problem This Solves
Long
camera_clipandscreen_recordactions could outlive the default 30-second agent-to-Gateway transport timeout. The forwarded node invocation has its own timer, so one shared timeout value also left the enclosing transport with no time to receive and process the node result.Why This Change Was Made
Recording actions now use two lifecycle-owned budgets:
The existing 300-second tool duration cap remains unchanged. Explicit
timeoutMsandinvokeTimeoutMsoverrides remain independent so callers retain cancellation control at either layer.The same helper owns both
camera_clipandscreen_record, avoiding parallel timeout policy.AI-assisted: yes. Maintainer deep review rewrote the original shared-timeout approach, added focused table-driven coverage, ran fresh autoreview, and exercised the final path against a real source Gateway and Android emulator node.
User Impact
Long mobile camera clips and screen recordings can finish without the outer Gateway request expiring first. Existing short recordings, duration limits, dangerous-command opt-in, and explicit timeout behavior remain intact.
Evidence
Exact head:
b6b05aad0b257353c18ad3b54fc1c3a0d1ff460cnode scripts/run-vitest.mjs src/agents/tools/nodes-tool.test.ts:app:assemblePlayDebug, installed onemulator-5554, connected and re-approved through an exact-source Gateway.camera_clipthrough the patched agentnodestool withdurationMs=31000and audio disabled.ffprobeduration: 30.781767 seconds.Screen recording requires an interactive Android MediaProjection consent prompt, so live proof uses
camera_clip; focused tests cover the identical shared timeout path for both actions.