Skip to content

fix(ios): recover simulator recorder startup failures - #2447

Open
PLASMA-FR wants to merge 1 commit into
callstack:mainfrom
PLASMA-FR:fix/ios-recorder-recovery-a-o9z3yuye
Open

fix(ios): recover simulator recorder startup failures#2447
PLASMA-FR wants to merge 1 commit into
callstack:mainfrom
PLASMA-FR:fix/ios-recorder-recovery-a-o9z3yuye

Conversation

@PLASMA-FR

@PLASMA-FR PLASMA-FR commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #2170.

Recover iOS Simulator recording startup without leaving CoreSimulator's host-wide recording slot stuck. Unpublished recorder rollback now sends SIGINT, waits a bounded five seconds for graceful detach, and escalates only if the process remains alive. A native simctl recordVideo exit 16 is returned as non-retriable DEVICE_IN_USE with details.reason: apple_simulator_recording_busy and actionable recovery guidance; other exits retain their existing classification.

Startup now observes exits that settle before PID discovery or on the final process-identity poll. The provider scenario proves a failed start adopts no recorder and a later start/stop succeeds. Five files, +195/−26.

Validation

Tested 06e98c7e6a7bf0517c31339fb2a4814ae055d9cc with Node 24.13.1 and pnpm 11.17.0.

  • The focused regressions failed before the fix; 19 simulator-host tests and the provider contention/recovery scenario pass.
  • AGENT_DEVICE_VITEST_MAX_WORKERS=1 pnpm check:affected --run passes: 301 files / 2,144 tests, 12 command-doc tests, format, lint, types, layering, Fallow, and build.
  • GitHub Coverage, Integration, and every platform smoke job pass on this head. This Linux host cannot run CoreSimulator, and ordinary iOS smoke does not poison/recover the host recording slot; that native contention scenario remains a disclosed review risk.

@thymikee

Copy link
Copy Markdown
Member

No code findings at 06e98c7. The tests cover error classification, graceful rollback and failed-start cleanup through the daemon. Before this is ready, please add a macOS/CoreSimulator run that observes real recording contention and confirms a subsequent recording starts and stops after the SIGINT rollback; the injected exit-16 process and ordinary iOS smoke do not prove the host recording slot is released.

thymikee added a commit that referenced this pull request Sep 10, 2026
…grace

The exit-16 classifier and graceful start rollback are owned by #2447 with the DEVICE_IN_USE contract; drop the overlapping COMMAND_FAILED classifier here to keep one start-path error contract. Keep only the non-overlapping daemon-startup fix: an orphaned simctl recorder is reaped with the same finalize grace the live stop path allows, plus a startup-wiring test. Refs #2170.
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.

iOS sim: ungraceful recorder kill leaves CoreSimulator host recording lock dangling (code 16 for all later recordings)

2 participants