[codex] fix studio expose reliability#17
Conversation
755af98 to
3843ee5
Compare
|
Update after remote Mac mini repro:
Validation rerun:
|
3843ee5 to
342bfd7
Compare
|
Corrected note for the latest update:
This matches the case where the WebRTC stream can still be working even though the health or simulator list endpoints temporarily fail. |
342bfd7 to
a5b420b
Compare
|
Follow-up on the hang/reconnect cause: The daemon log showed the concrete failure mode: the HTTP listener can hit Latest update fixes recovery instead of masking it:
Local reproduction/verification:
|
a5b420b to
263df42
Compare
|
Follow-up from the remote Mac mini logs: The bridge was repeatedly failing plain local fetches to Latest update adds an explicit Studio-expose recovery path:
Validation: |
263df42 to
685f4b8
Compare
|
Added the shared encode/fanout improvement for multiple Studio viewers:
Verification:
|
bc4e9e7 to
7e44bd1
Compare
|
Added an expose/WebRTC multi-viewer stress test in What it does:
Local validation:
|
7e44bd1 to
6d05f91
Compare
|
Follow-up fixes pushed in
Validated locally with |
6d05f91 to
fba1036
Compare
fba1036 to
620db98
Compare
Summary
This PR fixes the Studio expose reliability issue where a local
simdeck studio exposeprocess could keep a Studio session alive even after its local daemon was gone. In that state Studio kept showing "Starting simulator" forever because the provider bridge continued to heartbeat asprovider-online, but the SimDeck health and simulator probes could no longer succeed, so the session never returned toready.The fix makes the provider bridge lifecycle explicit. The server now passes the expose parent PID into the bridge, and the bridge exits when that parent process disappears. The bridge also tracks local daemon availability; if the local daemon remains unreachable for the configured timeout, the bridge marks the Studio session
failedand exits rather than leaving a zombieprovider-onlinesession behind. Normal shutdown still marks sessionsexpired.This also keeps the remote streaming changes that were part of the reliability work: remote sessions default to software H.264, 30 fps, balanced quality, expose remote FPS choices of 15/30/60, and avoid tearing down recoverable remote WebRTC connections on short stalls. The stream-quality endpoint is now idempotent for identical settings so clients do not churn encoders by reposting the same config.
The E2E WebRTC harness now supports Studio-hosted URLs directly. It derives the Studio SimDeck API proxy path from
/simulator/:sessionId, can pull large visual-reference screenshots directly from the local daemon when Studio RPC body size is not appropriate for PNG screenshots, records sampler errors, and treats visual artifacts as sustained/repeated failures instead of failing on one unsynchronized screenshot/video sample.Validation
npm run buildnpm run lintnpm run testnode --test scripts/studio-provider-bridge.test.mjsready.failedinstead of stayingprovider-online.0reconnects0packets lost0decoder drops50ms0