Skip to content

fix(ios): recover screenshots with deleting Watch runtimes - #189135

Merged
joshavant merged 1 commit into
mainfrom
fix/ios-watch-runtime-duplicates
Oct 31, 2026
Merged

joshavant merged 1 commit into
mainfrom
fix/ios-watch-runtime-duplicates

Conversation

@joshavant

@joshavant joshavant commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #189040

What Problem This Solves

Fixes CI screenshot capture stopping before Apple Watch when CoreSimulator lists a Deleting registration beside the selected Watch runtime's remaining image.

User Impact

CI can continue its existing one-time Watch runtime repair for this state. Multiple remaining images still stop repair before deletion; local runtime installation and screenshot retry behavior stay unchanged.

Why This Change Was Made

Log the full matching runtime inventory, then exclude registrations already marked Deleting from the deletion choice. Keep the existing targeted deletion, partial MobileAsset recovery, download, and mounted-runtime validation.

Evidence

  • Failure 41175154845: all eight iPhone/iPad tests passed, then repair rejected watchOS 27.0 / 24R362 images in Ready and Deleting states, both unmounted.
  • Extended the existing Fastlane lane regression with that inventory and a two-Ready negative control. The first case fails on the base with the exact duplicate-image error; all 15 release-gate tests pass with the fix (2.23s wall time, 1.04s Vitest duration). Fixtures exercise lane recovery and nine-image completion with simulated Apple I/O; they do not prove native CoreSimulator repair.
  • Ruby syntax, scoped lint, TypeScript formatting, test-line ratchet, and git diff --check: passed. The 15-line test allocation is only for these two regression scenarios; the shared baseline is unchanged.
  • AutoReview/Codex reviewed pinned base d76745dfc5381ab395cef5703d18c49443696692 through the final local patch, P0–P2: scoped-clean. Local ClawSweeper remains unavailable from the campaign's verified structured-result incompatibility; hosted ClawSweeper reviewed exact head 4197431d31f09e99749176532d60d0f7d651b720 with no actionable findings. Its proof note is addressed by the completed hosted run and the explicit native-condition limitation below.
  • Simplification: two production lines, 15 net test lines, no new helper or retry mechanism. Existing safety checks remain the sole owner of repair.
  • Full screenshot-only run 41177104256 passed at exact head 4197431d31f09e99749176532d60d0f7d651b720: all nine PNGs inspected; eight iPhone/iPad tests passed on first attempts; one simulator active at a time; Watch captured successfully. Qualification and upload were skipped. The native run repaired an unavailable watchOS runtime with one unmounted Ready image, downloaded it, and verified a mounted replacement. The exact Ready + Deleting inventory is covered by the regression fixture; it did not recur in this native run.
  • PR CI settled: 46 successful checks, 41 skipped, and the screenshot job plus its two resulting CI-gate status failures. The failure is described below; no branch-caused failures remain. No release upload or merge was performed.

Investigated CI failure

CI run 41177105468, screenshot job 124467192332 passed all eight iPhone/iPad tests. An available Watch runtime resolved and simulator creation succeeded without entering runtime repair. During Watch boot, simctl bootstatus -b exited but the simulator was Shutdown; the existing guard stopped capture. Diagnostics record 23.69s in bootstatus, zero active simulators afterward, and no collected crash facts. The task-owned simulator was deleted successfully.

pnpm test:ci-failed 189135 classified the job as unknown because main had no comparable job result. Source/log investigation attributes this failure outside the change: the modified repair function was never called, while the boot guard and boot lifecycle are unchanged from the base. The pre-existing boot-ended lane regression continues protecting this behavior. No boot retry or assertion change was added, and CI was not rerun for a green result. This remains a separate Watch boot reliability issue; the passing release-workflow run does not fix or explain it.

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@joshavant
joshavant marked this pull request as ready for review October 31, 2026 06:33
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR excludes Watch runtime registrations marked Deleting from the existing screenshot-repair deletion choice.

Example: CoreSimulator lists watchOS 27.0 / 24R362 with one Ready registration and one Deleting registration, both unmounted.

  • Before: Repair rejects two registered images and stops after eight iPhone/iPad screenshots.
  • After: Repair leaves the Deleting registration alone and proceeds with targeted replacement of the remaining image.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The repair is focused and source-supported, with useful regression coverage but no completed native validation of the changed recovery condition.
Proof confidence 🦐 gold shrimp (3/6) The ordinary contributor proof gate is exempt for this collaborator-authored PR; supplied after-fix evidence exercises the real Fastlane lane with simulated Apple I/O, while native screenshot validation remains in progress.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Native screenshot capture stops before Watch when an already-deleting runtime registration is counted as another repair candidate.
Reason: The maintainer-authored change repairs a recorded workflow failure without changing app behavior, local installation policy, or capture retry rules.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses an observed current-main screenshot failure with a focused repair and no identified introduced defect.

Priority: P2
Reviewed head: 4197431d31f09e99749176532d60d0f7d651b720

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Native recovery from the Ready-plus-Deleting inventory through mounted verification, Watch capture, and cleanup is not yet shown by completed hosted results.
Agent review details

How this fits together

The shared Fastlane screenshot lifecycle selects a Watch runtime, repairs unavailable CI runtimes once, and then creates the simulator for Watch capture and cleanup.

flowchart TD
  A[Screenshot lane] --> B[Watch runtime selection]
  B --> C[Existing CI runtime repair]
  C --> D[Exclude Deleting registrations]
  D --> E[Check remaining image ambiguity]
  E --> F[Targeted replacement and mounted validation]
  F --> G[Watch creation capture and cleanup]
Loading

Technical review

Best possible solution:

Keep the filter in the existing repair owner while preserving targeted deletion, ambiguity rejection, and mounted-runtime validation.

Do we have a high-confidence way to reproduce the issue?

The reported inventory deterministically reaches main's duplicate-image guard, and the added lane scenario exercises that input; no target code was executed during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete repair for the demonstrated rejection: exclude registrations already being deleted while retaining one authoritative repair path and the guard against multiple remaining candidates.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6370e0199985.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Josh Avant: Raw commit b4cfd01 adds apps/ios/fastlane/Fastfile:290 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b4cfd01c9cff; files: apps/ios/fastlane/Fastfile)
  • Peter Steinberger: Raw commit 07563dc adds apps/ios/fastlane/Fastfile:266 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 07563dc3b761; files: apps/ios/fastlane/Fastfile)

PR surface

Source +2, Tests +15, Docs +4, Other +2. Total +23 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 0 +2
Tests 1 18 3 +15
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 4 26 3 +23

Labels

Label changes:

  • add P2: An observed failure blocks the complete native screenshot workflow, with impact limited to screenshot tooling.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: An observed failure blocks the complete native screenshot workflow, with impact limited to screenshot tooling.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Inspect the existing hosted screenshot results for recovery, Watch capture, and cleanup before treating native validation as complete.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 31, 2026, 2:47 AM ET / 06:47 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant