Skip to content

fix(ios): recover partial Watch runtime deletion during screenshots - #179148

Merged
joshavant merged 2 commits into
mainfrom
fix/ios-watch-runtime-reclaim
Oct 21, 2026
Merged

joshavant merged 2 commits into
mainfrom
fix/ios-watch-runtime-reclaim

Conversation

@joshavant

@joshavant joshavant commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #178891

What Problem This Solves

iOS release screenshot capture stops before Watch capture when Apple removes a runtime registration but fails to reclaim its backing MobileAsset, as observed in run 39521844120.

User Impact

CI can complete the existing Watch runtime repair after this specific partial-deletion error. Local runtime installation remains operator-managed, and failed screenshot tests are never retried.

Why This Change Was Made

Apple's diagnostic explicitly instructs callers to scan and mount orphaned runtimes, then delete the runtime again. The existing repair now follows that sequence once, only for the observed SimDiskImageError code 30 and MobileAsset message. It classifies Fastlane's complete command output through error_callback, preserving the signature when the exception recap is truncated or omitted. It re-resolves the selected Watch runtime's image identifier after scanning, preserves the ambiguous-image guard, and then continues the existing download and mounted-runtime verification. Scan failures, unrelated errors, and a second deletion failure stop the lane.

The change stays in the existing repair owner: no new helper, retry framework, or configuration. Net changes are +16 production lines, +69 test lines in the existing lane fixture, and +6 documentation lines. The fixture supports the pinned Fastlane shell handler to cover its output contract.

Evidence

  • The new regression failed against the original implementation through the screenshot lane: eight iPhone/iPad PNGs were captured, then the observed error prevented Watch capture.
  • All 15 focused Fastlane gate tests passed with the corrected callback handling: 0.731s test time and 2.14s runner wall time in the lightweight fixture, and 0.489s test time in final-head CI. With pinned Fastlane 2.241.0, they passed in 2.751s test time and 4.09s runner wall time. The actual Fastlane shell handler runs a child process that emits a long synthetic diagnostic and exits 30; that regression failed against exception-message matching and passes against the complete-output callback. Coverage also includes a changed image identifier after re-registration, repeated deletion failure, unrelated deletion failure, and scan failure; existing runtime, boot, capture, and cleanup contracts remain covered.
  • Ruby syntax, targeted TypeScript typecheck/lint, formatting, and git diff --check passed. Independent P0–P2 review found no actionable issues.
  • Final-head hosted screenshot capture and evidence validation passed on eca29864f38aaf22430ad966dd7093ab74fa759f: all eight iPhone/iPad tests passed once, Watch capture completed, and the complete screenshot set passed reduction.
  • The hosted runner encountered a real Watch creation failure (runtime path not found). Targeted deletion, download, mounted-runtime verification, and subsequent Watch capture succeeded. The partial-deletion error did not occur in this run; its recovery branch is proven by the red-to-green regression, not by a claim that the hosted run triggered it. The underlying intermittent runtime-availability failure is not fixed by this PR.
  • All final-head CI checks settled with no failures. Fresh independent review and the updated automated PR review have no remaining code findings.

No build upload or release publication was performed.

@clawsweeper

clawsweeper Bot commented Oct 21, 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 21, 2026 06:32
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR scans orphaned Watch runtimes and retries targeted deletion once after Apple’s specific partial MobileAsset deletion error.

Example: watchOS 27.0 runtime deletion reports SimDiskImageError code 30 after eight iPhone and iPad screenshots.

  • Before: Runtime repair stops before downloading a replacement or capturing Watch.
  • After: CI scans and mounts orphaned runtimes, resolves the image identifier again, retries deletion once, and continues after mounted-runtime verification.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct repair with the earlier finding resolved; confidence in the specific recovery branch rests on harness evidence rather than an inspected native execution.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored PR is outside the ordinary contributor proof gate; prior-head native capture passed, while the changed partial-deletion branch is supported by reported fixture execution through the pinned Fastlane handler.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Screenshot automation can finish phone and tablet capture, then fail while repairing the Watch runtime.
Reason: The maintainer-authored repair addresses an observed failure, and the overlapping PR’s closing discussion explicitly endorses this narrower direction.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs an observed screenshot automation failure, resolves the earlier complete-output finding, and has no remaining actionable correctness or security finding.

Priority: P2
Reviewed head: eca29864f38aaf22430ad966dd7093ab74fa759f

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The specific partial-deletion branch has reported red-to-green fixture coverage, including the real Fastlane shell handler, but no inspected native simctl recovery trace.
Agent review details

How this fits together

The Fastlane screenshot lanes consume simulator inventory and built apps, repair unavailable Watch runtimes in CI, and produce screenshots and capture evidence.

flowchart TD
  A[Screenshot lane] --> B[Watch simulator admission]
  B --> C[Existing runtime repair]
  C --> D[Targeted image deletion]
  D --> E[Scan and resolve after specific failure]
  E --> D
  C --> F[Download and verify mounted runtime]
  F --> G[Watch screenshot capture]
Loading

Technical review

Best possible solution:

Land the bounded recovery in the existing Fastlane repair owner while preserving targeted deletion, mounted-runtime verification, and terminal capture failures.

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

Current-main source propagates the reported deletion failure before replacement download, and the author reports a base-red/head-green screenshot-lane regression; no target code was executed during this review.

Is this the best way to solve the issue?

The smallest complete fix extends the existing repair owner with one specifically gated scan and deletion retry, without adding a parallel provisioning path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4d38e97ae952.

Provenance checked

  • Watch runtime deletion and replacement keeps the original intent (07563dc: Provision Watch simulators and replace a uniquely identified broken runtime image after an observed CI creation failure.)
  • Shared admission, diagnostics, and lane fixture keeps the original intent (598e945: Consolidate unavailable-runtime recovery under one CI-only owner while preserving terminal boot and capture failures.)
  • Screenshot simulator lifecycle regression keeps the original intent (03f92a5: Exercise sequential task-owned simulators and cleanup through the existing screenshot lane.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Josh Avant: Raw commit 598e945 adds apps/ios/fastlane/Fastfile:288 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 598e945b9ff5; 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 +16, Tests +69, Docs +6. Total +91 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 21 5 +16
Tests 1 73 4 +69
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 100 9 +91

Root-cause cluster

Relationship: canonical
Canonical: #179148
Summary: The overlapping submission repairs the same partial MobileAsset deletion failure and was explicitly closed in favor of this PR.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The observed failure interrupts native screenshot automation, with limited impact outside CI and release tooling.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-21T06:53:19.847Z sha 919fe80 :: needs changes before merge. :: [P2] Classify the complete command output instead of the exception recap

Reviewed October 21, 2026, 3:07 AM ET / 07:07 UTC (Revision 2).

@joshavant

Copy link
Copy Markdown
Collaborator Author

Fixed the complete-output finding in eca29864f38aaf22430ad966dd7093ab74fa759f. Runtime deletion now classifies Fastlane's error_callback output and explicitly stops on unrelated or repeated failures.

The regression now covers a diagnostic longer than Fastlane's exception recap and runs against the actual pinned Fastlane 2.241.0 shell handler through OPENCLAW_TEST_FASTLANE_BUNDLE=1. It failed against the previous exception-message matcher and passes with the correction; all 15 focused tests pass in both modes. Independent review of the final staged change found no actionable P0–P2 issues. Final-head CI is running; the PR body distinguishes it from prior-head hosted evidence.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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 rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@joshavant
joshavant merged commit b4cfd01 into main Oct 21, 2026
114 of 115 checks passed
@joshavant
joshavant deleted the fix/ios-watch-runtime-reclaim branch October 21, 2026 07:51
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…penclaw#179148)

* fix(ios): recover partial Watch runtime deletion during screenshots

* fix(ios): inspect complete Watch runtime deletion output
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: S 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