Repository navigation
Conversation
…oot on observed state The screenshot retry, the runner fallback and the skipped-boot-check recovery each decided from the tool's prose. `screenshot.ts` matched "timeout waiting for screen surfaces", a POSIX-domain string pair, and six spellings of a shutdown state, so any CoreSimulator wording change could silently retire all three decisions at once. `tool-provider.ts` is the one adapter that runs `xcrun simctl` itself, so it is the one place allowed to read simctl's error protocol. It takes the top-level header's `domain= NSPOSIXErrorDomain, code=60` and stamps `details.reason`; a nested `Underlying error` line, another domain or code, stdout, and a caller-supplied command or simctl callback stay unattributed. The reason is stamped, never host-kit's `timeoutMs`, which is that layer's own evidence that it killed a child at its deadline. Recovery now asks the tool what state the simulator is in. `simulator.ts` owns the one boot-state read and takes the caller's ceiling, so the probe runs under a 5s screenshot-owned budget instead of the 60s inventory budget. Only the literal `Shutdown` authorizes a boot: `Booted`, `Booting`, `Creating` and `Shutting Down` describe a simulator that is already on its way, and a listing that failed, omits the simulator, or names no state proves nothing. A canceled request is terminal and never reaches the probe; a probe that is itself canceled travels on; every other probe failure answers `false` and leaves the capture's own error, details and hint, as the reported failure. The boot memo policy is unchanged, so a simulator turned off outside this process is still not seen until the memo expires. Refs #4442
Size Report
Startup median (7 runs, lower is better):
|
|
Coverage is base-blocked at 855aa4a, before coverage thresholds: The same test, location and assertion already fail in unchanged-main CI at d78be6c8, with the same Node 24.13 and coverage command. The source and test are byte-identical between that base and this head. This PR's failed job is retained as failed. The fixture mocks |
|
Pushed the fixture correction as 50034fe. All existing identity, zombie, command, ordering and call-count assertions remain; the dedicated Linux Regression proof in an isolated simulated Linux process/filesystem boundary, with the original assertions unchanged: corrected fixture 21 passed; removing only the seven-line isolation 1 failed / 20 passed, at the exact PID-202 start-time/zombie assertion from the failed Coverage jobs; restored fixture 21 passed. The harness was removed and source hashes restored. This models the boundary; it is not a Linux-host run. One pinned pnpm 11.17.0 exact affected gate passed at 5003: Real Linux CI is now running on the pushed fix. The original 855a Coverage job remains failed; this was a source correction, not a retry of unchanged CI. The PR stays draft: native Shutdown recovery and the real code-60 header remain unproven. |
|
Thanks for the typed timeout work. At 855aa4a I found one likely regression in the new retry rule, and the live evidence the PR body says is missing is still missing.
This change rewires native screenshot retry, runner fallback and skipped-boot recovery on the local simulator route, and every test feeds hand-written stderr. If the typed reason never fires on real hardware, the retries disappear and the tests still pass. Please run once on an owned simulator. First, capture with Not blocking, take or leave: The Coverage failure looks unrelated: the diff only touches This review covers 855aa4a. The newer head 50034fe only adds a host-kit liveness test fixture, which does not touch the findings above and may address the Coverage failure. |
|
I own #4544 and am addressing this review. The preamble finding is accepted. Local commit The native requests remain open. The earlier ordinary Settings screenshot did not prove recovery or a real timeout header. I am checking a deterministic supported T3-bound route before another owned-simulator attempt, including whether a running batch can retain the session across T3 shutdown without admission booting first. I will attach actual command/probe/capture evidence and raw adapter stderr if reachable, and will not substitute scripted stderr for it. The separate Linux process-fixture correction is already pushed at |
Summary
Fixes #4442. Replace screenshot-error prose matching with a timeout reason stamped by the local simctl adapter. A fresh JSON state read, capped at 5 seconds, permits one boot/re-capture only for literal
Shutdown.Changes 15 files. Scope expansion: isolate process-identity test fixtures from live Linux
/proc, fixing the matching unchanged-base Coverage failure without changing assertions or production code.Custom command providers lose prose-derived code-60 retries. Eligible capture failures may add a probe. Existing boot-memo and capture/boot signal limitations remain.
Validation
Base
d78be6c88715ad80fc658497f23f91c86bf9489b; tested head50034fe3afeaba5893090fdc4f060586dda5fb9f.exactCommit=true,checkoutChanged=false,failOpen=false. Eight checks passed; unit 19,824 passed/10 skipped, related 377 passed. Full-unit fallback retained. Provider integration deduplicated; four coverage/replay checks skipped.