chore(diagnostics): trace Apple prepare phases and subprocess lifecycle

Merged
TH
4d ago
+653-304

Summary

Adds safe caller-phase and subprocess lifecycle evidence for the Apple prepare ios-runner inventory timeout in #3825. Eleven files; diagnostics only, 957 gross lines including moved tests, 71 net production lines.

The maintainer follow-up removes simctl grammar from host-kit, centralizes trace gating, and extends the existing timer with opt-in start/settled events. Background commands record observed abort/error/exit/close events using the same exec ID. Late events append through the existing diagnostics retention owner, including scopes without a fixed logPath.

No timeout, retry, budget, await order, cache, selection, kill, settlement, readiness or alert behavior changes. Raw argv, environment, stdin and output remain absent from exec traces.

Validation

Head 84ef0ba88ab0a98a66627314e329e833e5b7bcac; base ed98bddbd5a1cb76e329ba3ce18fa79aaa7505da.

  • Fresh frozen install/build and lint/typecheck passed.
  • Regression: e62edc4 9 failed/16 passed → fb7d9e0 25 passed. External-cancellation fix: fb7d9e0 4 failed/23 passed → head 27 passed. Disposable fresh setups; fixtures establish contracts, not the incident cause.
  • Independent Sol medium review: no findings after fixing cancellation context retention; static review only.
  • pnpm check:affected --run --head 84ef0ba88ab0a98a66627314e329e833e5b7bcac: passed; exactCommit=true, clean/matching fingerprints; 36 passed, 25 reasoned skips, 2 deduplicated; 11,526 related tests passed.

Hosted Apple/Android/Linux smoke, Coverage and Integration pass: 14 SUCCESS, 1 SKIPPED build matrix, 1 NEUTRAL; no pending/failures. Raw retained CI lines remain attributed to e62edc4. Current-head artifact 12276660658 verifies shared phase markers, inventory correlation and late background retention; no timeout was reproduced. The original timeout and cause remain unproved. Local T3 simulator discovery was previously blocked; no new device attempt was made.