Skip to content

fix(ios): isolate release screenshot simulators - #160347

Merged
joshavant merged 6 commits into
mainfrom
fix/ios-screenshot-lifecycle
Sep 28, 2026
Merged

joshavant merged 6 commits into
mainfrom
fix/ios-screenshot-lifecycle

Conversation

@joshavant

@joshavant joshavant commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes iOS Store Release screenshot failures during the transition from iPhone to iPad, where the previous simulator remained active and the release job had less runner capacity than qualification.

User Impact

Release screenshots use one fresh simulator at a time. Store Release and CI screenshot jobs use the same xcode-27-xlarge runner label as qualification. A secretless screenshot-only workflow operation can validate a selected branch without archiving or uploading a build.

Why This Change Was Made

The screenshot lane builds once for the host simulator architecture, then creates, boots, captures, shuts down, and deletes each owned iPhone, iPad, and Watch simulator in order. Local and hosted capture intentionally require idle simulators to enforce the same one-active-simulator rule; already active, unrelated simulators remain untouched. Cleanup preserves the original capture failure and attempts deletion even if shutdown fails.

Screenshot jobs use stock simulators. CI screenshot shards retain their runner-group routing, two-device matrix, assertions, and deadlines. Optional diagnostics record bounded resource samples, phase timing, simulator counts, fixed startup classifications, and filtered crash facts in a separate screenshot-diagnostics.json; the capture ledger and collector contract remain unchanged. Raw crash reports and process arguments are excluded. Diagnostics are enabled for screenshot-only runs and CI screenshot shards, and remain off for normal releases.

Evidence

  • Two complete screenshot-only successes at 071d8ef9de61643524c754089c98868770518d6d: 36401027361 in 16m1s and 36402965674 in 15m3s. Each produced eight first-attempt iOS captures plus Watch; all nine images were visually inspected. Diagnostics confirmed one active simulator at every boot, zero after deletion, and no startup failure classifications. Subsequent changes separate diagnostic output and align CI configuration; stock capture behavior is unchanged.
  • 48 Fastlane gate cases passed (latest full command 3.02s), including lifecycle/cleanup, sanitization, and diagnostics-enabled/default producer boundaries. Lifecycle and diagnostic-ledger regressions failed against their pre-fix producers. CI measured the lifecycle case at 0.235s and sanitization at 0.074s.
  • 85 iOS release E2E contract cases and the affected mobile workflow contract passed. Workflow/lifecycle checks: 336 passed, 10 existing skips, 100.25s with one worker. Hosted-capacity checks: 25 passed in 14.89s full command; the subsequent GitHub planner suite passed all 488 tests, with the three affected count cases taking 0.307/0.329/0.270s.
  • Ruby syntax, pinned Fastlane lane loading, workflow/actionlint/zizmor checks, focused lint, formatting, and git diff --check passed. Independent reviews found no actionable issues. The local changed-file check stopped at an inherited ui-other inventory limit of 721/720 introduced by the base commit; this branch changes none of those inputs, and GitHub treats the limit as advisory.
  • Current-head CI: 36410003948, attempt 2: both screenshot shards and the combined screenshot evidence check passed, along with the hosted planner, Windows, and typecheck. Docker seed and iOS smoke also passed. CI settled with the unrelated UI failure described below and its downstream aggregate failure; no jobs were canceled. No archive or App Store upload was performed by screenshot validation.

CI findings and remaining uncertainty

Earlier CI identified two repaired test-fixture issues: a synthetic crash report used nondeterministic clock/file timestamps, and the independent hosted-runner inventory omitted xcode-27-xlarge. Both failures reproduced locally; their existing assertions now pass with explicit fixture timestamps and the missing hosted label.

The earlier smaller/SimSlim iPad job stalled in the post-edit keyboard visibility query after typing and clearing text had succeeded. Its spindump showed the app alive and the runner waiting in XCUIElement.exists, on 3 CPUs/7 GB versus 5 CPUs/14 GiB in the successful xlarge runs. CI screenshot shards now match the proven stock/xlarge setup. This does not establish whether resource pressure or simulator reconfiguration caused the original query stall.

Attempt 1 of the current CI run failed the Control UI rename-composition test's final rendered-title poll, after the patch request and subsequent list request succeeded. The exact tested merge 3422c4f8b90301fe92b0da1a9b907ba25511cea1 and its main parent da51d9edccb311174d9ae7faaeea208e7fd7d7c9 have identical UI, source, scripts, dependency, and test-harness inputs; workflow changes affect only iOS screenshots. All five cases passed locally in their original order against that exact main parent (28.48s), using the supported E2E owner. This macOS single-file replay does not explain or fix the Linux shard failure. Attempt 2 completed both native screenshot shards and the combined evidence collector successfully, but repeated the title-poll failure in the modern and legacy Escape cases (365 passed, 2 failed). The UI defect remains unresolved and independently unrelated to this iOS change. No further rerun is planned to seek a green result.

@clawsweeper

clawsweeper Bot commented Sep 28, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: ios App: ios size: L labels Sep 28, 2026
@joshavant
joshavant marked this pull request as ready for review September 28, 2026 09:38
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 28, 2026, 7:25 AM ET / 11:25 UTC (Revision 5).

ClawSweeper review

What this changes

The branch captures iOS Store screenshots on fresh simulators, adds optional diagnostics and a screenshot-only workflow operation, and moves screenshot jobs to larger runners.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this PR open. Hosted captures support the screenshot repair, but the previously reported scheduling defect remains at the reviewed head: screenshot-only runs occupy the release and reconciliation queue.

Priority: P2
Reviewed head: 9bcf24902555d651a90fee52a0af906d3cd777bb

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Real hosted capture evidence is strong, while the unresolved release-queue conflict keeps the patch from being merge ready.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Two hosted screenshot-only runs at an earlier PR head completed the real iPhone, iPad, and Watch capture path; current-head CI also passed both screenshot shards and their evidence check. The new diagnostics artifact is separate from the unchanged capture ledger, so no existing stored-data upgrade is required.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Two hosted screenshot-only runs at an earlier PR head completed the real iPhone, iPad, and Watch capture path; current-head CI also passed both screenshot shards and their evidence check. The new diagnostics artifact is separate from the unchanged capture ledger, so no existing stored-data upgrade is required.
Evidence reviewed 10 items Introduced scheduling conflict: The PR adds a screenshots operation while the workflow-wide ios-release concurrency group still applies to every operation.
Shared release lock: Lines 52–55 retain one noncanceling concurrency group; the new screenshot job begins at line 62, ahead of the release and reconciliation jobs in the same workflow.
Current-main boundary: Fetched current main has release and reconciliation operations, but no screenshot-only operation or fresh-simulator screenshot path; the PR remains useful.
Findings 1 actionable finding [P2] Isolate screenshot-only runs from the release lock
Security None None.

How this fits together

The iOS screenshot lane takes a simulator build and selected device models and produces Store images and capture evidence. The release workflow also handles uploads and reconciliation, with workflow concurrency controlling when those operations can run.

flowchart TD
  A[Selected workflow operation] --> B[Workflow concurrency group]
  B --> C{Operation}
  C -->|Screenshots| D[Screenshot capture lane]
  C -->|Release or reconcile| E[Store release work]
  D --> F[Fresh simulators in sequence]
  F --> G[Images and diagnostics]
Loading

Before merge

  • Isolate screenshot-only runs from the release lock (P2) - The new screenshots operation inherits the workflow-wide ios-release concurrency group, so a capture can queue an upload or reconciliation for roughly its 15-minute run. Give screenshots a separate group while keeping release and reconciliation serialized. This remains from the earlier review of the same head.
  • Resolve merge risk (P1) - A screenshot-only capture uses the release workflow's concurrency group and can hold an upload or reconciliation in the queue for the duration of capture.
  • Complete next step (P2) - Separate screenshot-only runs from the release concurrency group and verify that release and reconciliation remain serialized before merge.

Findings

  • [P2] Isolate screenshot-only runs from the release lock — .github/workflows/ios-release.yml:15
Agent review details

Security

None.

PR surface

Tests +177, Docs +36, Config +65, Other +183. Total +461 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 5 228 51 +177
Docs 4 44 8 +36
Config 2 79 14 +65
Generated 0 0 0 0
Other 2 269 86 +183
Total 13 620 159 +461

Review metrics

Metric Value Why it matters
Production and test code production +269/−86 lines; tests +228/−51 lines The production growth implements simulator ownership and bounded diagnostics, with failure-path test coverage alongside it.

Merge-risk options

Maintainer options:

  1. Separate screenshot scheduling (recommended)
    Use a distinct group for screenshot-only dispatches and assert that release and reconciliation still share the existing group.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Give screenshot-only dispatches a distinct workflow concurrency group while keeping release and reconcile-and-record in ios-release, and add a focused workflow contract check for both mappings.

Technical review

Best possible solution:

Give screenshot-only validation its own concurrency group while release and reconciliation continue sharing their existing group; retain the proven sequential simulator cleanup and separate diagnostics artifact.

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

Yes. The introduced screenshot operation and unchanged workflow-wide concurrency group establish the scheduling conflict from source; this review did not dispatch competing Actions runs.

Is this the best way to solve the issue?

No, not yet. Hosted captures support the simulator repair, but the new validation operation needs separate scheduling before this is a safe release workflow change.

Full review comments:

  • [P2] Isolate screenshot-only runs from the release lock — .github/workflows/ios-release.yml:15
    The new screenshots operation inherits the workflow-wide ios-release concurrency group, so a capture can queue an upload or reconciliation for roughly its 15-minute run. Give screenshots a separate group while keeping release and reconciliation serialized. This remains from the earlier review of the same head.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against dd3fb2bd9cf2.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The remaining defect can delay iOS release operations but has a bounded workflow repair.
  • merge-risk: 🚨 automation: The added screenshot-only operation can occupy the workflow lock needed by release and reconciliation automation.
  • merge-risk: 🚨 compatibility: Local screenshot capture now requires idle simulators, an intentional operator requirement documented in the PR discussion and setup instructions.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (linked_artifact): Two hosted screenshot-only runs at an earlier PR head completed the real iPhone, iPad, and Watch capture path; current-head CI also passed both screenshot shards and their evidence check. The new diagnostics artifact is separate from the unchanged capture ledger, so no existing stored-data upgrade is required.
  • proof: sufficient: Contributor real behavior proof is sufficient. Two hosted screenshot-only runs at an earlier PR head completed the real iPhone, iPad, and Watch capture path; current-head CI also passed both screenshot shards and their evidence check. The new diagnostics artifact is separate from the unchanged capture ledger, so no existing stored-data upgrade is required.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs test/scripts/mobile-release-ci.test.ts.
  • [P1] node --import tsx scripts/check-workflows.mts.
  • [P1] git diff --check.

What I checked:

  • Introduced scheduling conflict: The PR adds a screenshots operation while the workflow-wide ios-release concurrency group still applies to every operation. (.github/workflows/ios-release.yml:15, 9bcf24902555)
  • Shared release lock: Lines 52–55 retain one noncanceling concurrency group; the new screenshot job begins at line 62, ahead of the release and reconciliation jobs in the same workflow. (.github/workflows/ios-release.yml:52, 9bcf24902555)
  • Current-main boundary: Fetched current main has release and reconciliation operations, but no screenshot-only operation or fresh-simulator screenshot path; the PR remains useful. (.github/workflows/ios-release.yml:13, dd3fb2bd9cf2)
  • Simulator lifecycle: The screenshot lane creates a simulator from the selected model and runtime, checks exclusive activity, and attempts shutdown and deletion while preserving the capture error. (apps/ios/fastlane/Fastfile:248, 9bcf24902555)
  • Real screenshot-only runs: The PR body reports two complete screenshot-only captures at 071d8ef; GitHub reports both workflow runs successful, and the first run's capture job succeeded. (071d8ef9de61)
  • Current-head capture checks: At the exact PR head, both iOS screenshot shards and the screenshot evidence job succeeded. The overall CI run failed on a Control UI test; the PR body records its separate investigation. (9bcf24902555)

Likely related people:

  • joshavant: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Separate screenshot-only concurrency from release and reconciliation, then check the focused workflow contract.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-09-28T09:45:38.914Z sha 071d8ef :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T09:57:42.045Z sha c1dd1cf :: blocked before merge. :: [P1] Preserve local capture when unrelated simulators are active | [P2] Keep the diagnostic ledger readable by the evidence collector
  • reviewed 2026-09-28T10:37:35.319Z sha 9bcf249 :: blocked before merge. :: [P2] Give screenshot-only runs a separate concurrency group
  • reviewed 2026-09-28T10:54:15.810Z sha 9bcf249 :: blocked before merge. :: [P2] Isolate screenshot-only runs from the release lock

@joshavant

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@joshavant

Copy link
Copy Markdown
Collaborator Author

Addressed the diagnostic ledger finding by writing optional diagnostics to apps/ios/build/screenshot-diagnostics.json, outside the collector's strict results directory. The version-1 ledger and accepted directory entries remain unchanged. The existing lane regression now exercises diagnostics both enabled and disabled, verifies stale diagnostic cleanup, and failed against the previous producer. All 48 focused tests pass; workflow checks and independent review pass.

The idle-simulator precondition is an intentional maintainer decision for this repair. Local and hosted capture must enforce the same one-active-simulator invariant. An unrelated running simulator is left untouched, and the error explains that it must be shut down when no longer in use before capture proceeds. Allowing another active simulator would reintroduce the resource contention this work is intended to prevent. This requirement is documented in the local screenshot instructions and PR body.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 28, 2026
@joshavant
joshavant merged commit 03f92a5 into main Sep 28, 2026
323 of 335 checks passed
@joshavant
joshavant deleted the fix/ios-screenshot-lifecycle branch September 28, 2026 15:07
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
* fix(ios): isolate release screenshot simulators

* fix(ios): select screenshot build architecture with build settings

* test(ios): make crash diagnostic fixture timestamps deterministic

* fix(ios): keep screenshot diagnostics separate from release evidence

* fix(ios): align CI screenshots with release runner setup

* test(ci): count larger hosted Xcode screenshot runners
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios docs Improvements or additions to documentation merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant