You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
close: require proof that open booted an Apple simulator before the implicit stop #4791
For an Apple simulator, open infers boot ownership from the inventory snapshot: device.booted !== true before open means bootedByOpen. If another actor boots that simulator between the snapshot and open's own boot step (for example a concurrent xcrun simctl boot), the session still records bootedByOpen: true, and plain close shuts the simulator down. The launched-process check answers not-applicable for every non-Android device, and booting a simulator takes no device claim, so nothing verifies the boot.
Android emulators do not have this gap: close stops only the process that open launched.
Expected
Plain close stops an Apple simulator only when open has positive proof that it caused the boot. Options: record that open's own boot step performed the boot (not only that the snapshot said stopped), or record the simulator boot time that DeviceBootObservationService already reads and withhold the stop with a warning when the observed boot is not the one open caused.
Acceptance
A routed test: the snapshot says stopped, another actor boots the simulator before open's boot step, open succeeds, plain close keeps the simulator and warns.
A live iOS simulator run of cold stop, prebooted retention and the foreign-boot case.
The issue reports a concrete race in Apple simulator ownership inference: a simulator can be booted by another actor after the pre-open snapshot, yet open records bootedByOpen and plain close later shuts it down. It gives expected behavior and acceptance criteria for a routed test and iOS simulator run.
Fixed by #4864, merged into 0.22. Plain close stops an Apple simulator only when open's own boot step reports that it performed the boot. The routed foreign-boot test and the live iOS simulator runs (cold stop, prebooted retention, foreign boot) are on the PR.
Activity
apex-sentinel-staging commentedon Nov 20, 2026
Apex Sentinel · Issue review
Suggested label:
bugThe issue reports a concrete race in Apple simulator ownership inference: a simulator can be booted by another actor after the pre-open snapshot, yet open records bootedByOpen and plain close later shuts it down. It gives expected behavior and acceptance criteria for a routed test and iOS simulator run.
Required sections
thymikee commentedon Nov 20, 2026
Status: not started. Sequenced after #4842 (failed open stops the emulator it booted) merges, because both change the launch-ownership path.
fix(close): stop an Apple simulator only on its open's own boot proof (…
thymikee commentedon Nov 20, 2026
Fixed by #4864, merged into
0.22. Plainclosestops an Apple simulator only when open's own boot step reports that it performed the boot. The routed foreign-boot test and the live iOS simulator runs (cold stop, prebooted retention, foreign boot) are on the PR.fix(close): stop an Apple simulator only on its open's own boot proof (…
fix(close): stop an Apple simulator only on its open's own boot proof (…