Repository navigation
fix(ios): stabilize Watch runtime before screenshot capture - #189217
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR adds CI-only Watch runtime admission checks and cleanup of stale, unmounted runtime registrations before simulator creation. Example: watchOS 27.0 has a mounted Ready image alongside an unmounted Unusable registration.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Needs changes before merge - 2 items remain Keep this maintainer-authored draft open for investigation; its admission gate introduces an avoidable failure for healthy selected runtimes. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe iOS Fastlane screenshot lane selects a Watch runtime, admits and creates a simulator, captures the Watch image, and cleans up the simulator; the existing owner permits one CI runtime repair. flowchart TD
A[Fastlane screenshot lane] --> B[Select available Watch runtime]
B --> C[CI runtime admission]
C --> D[Inspect mounts and registrations]
D --> E[Retire stale registration]
D --> F[Create and boot simulator]
E --> D
F --> G[Capture and clean up]
Technical reviewBest possible solution: Keep admission within the existing selected-runtime recovery boundary and retain only cleanup that native evidence shows prevents the observed shutdown. Do we have a high-confidence way to reproduce the issue? Source establishes the unrelated-runtime admission failure; the reported native shutdown has linked failed runs, but this read-only review did not reproduce it. Is this the best way to solve the issue? The shared admission boundary is appropriate, but requiring unrelated runtime registrations to become healthy expands the failure surface without resolving the demonstrated shutdown. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 54a2fe137a70. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +64, Tests +62, Docs +6, Other +2. Total +134 across 5 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 31, 2026, 4:45 AM ET / 08:45 UTC. |
|
Merged via squash.
|
…#189217) * fix(ios): wait for Watch runtime cleanup before screenshots * fix(ios): stabilize Watch runtime before screenshot capture * test(ios): type Watch staging failure pairs as tuples
What Problem This Solves
Watch screenshot capture can lose its simulator when CoreSimulator periodically replaces a fallback-mounted Watch runtime. The hosted trace shows the runtime volume being unmounted and CoreSimulator explicitly ending the Watch session, even though
bootstatusexits successfully.User Impact
CI prepares a stable Watch runtime before creating its screenshot simulator. The shared lane still captures all nine images with one active simulator at a time, and boot or capture failures stop without retries. Local runtime installation remains operator-managed.
Why This Change Was Made
Waiting for initial cleanup and removing stale registrations is insufficient: retaining the MobileAsset lets the ten-minute scanner recreate the broken cryptex registration and unmount the running fallback.
The runtime repair owner now stages the same signed runtime DMG when the selected Watch runtime is a patchable cryptex mounted through the plain-volume fallback. It clones the DMG into an owned temporary directory, retires the original image with supported
simctl runtime delete, requires the old MobileAsset to be gone, and usessimctl runtime addto stage and verify the clone. The replacement must be Ready and Verified with an existing runtime bundle. The temporary clone is cleaned up on success or failure.The initial bounded cleanup is scoped to the selected watchOS runtime and retires only unmounted, unusable stale registrations beside one healthy replacement. Deleting registrations remain owned by CoreSimulator. The existing one-time missing-runtime repair and narrow code-30 reclamation recovery share the same owner. A newly downloaded fallback is stabilized by that repair, too. Healthy cryptex mounts and already staged disk images skip staging.
Evidence
git diff --checkpass. The 149-line test allocation covers the verified regression growth.1b870b2c78e81fded72913ecba732b84b611ca12: scoped-clean P0–P2. Review findings about selected-runtime scoping and preserving unavailable-runtime deletion recovery were fixed and reviewed again.No release uploads are performed by this validation. Temporary lifecycle logging and probe workflow changes are excluded from this PR.