Skip to content

fix(ci): avoid duplicate iOS screenshot builds - #173596

Merged
vincentkoc merged 7 commits into
mainfrom
fix/ci-ios-capture-economics-20261015
Oct 16, 2026
Merged

vincentkoc merged 7 commits into
mainfrom
fix/ci-ios-capture-economics-20261015

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The iPhone and iPad screenshot jobs repeat the same simulator build and native toolchain setup.

User Impact

CI keeps all nine release screenshots and their XCTest evidence while using one native capture job. The existing combined lane captures device families serially, so native wall time may increase even as duplicated build work disappears. This PR makes no measured speedup or cost-reduction claim: inspected historical two-job captures have different native source or locked dependencies and are not a compatible comparison.

Why This Change Was Made

Use the existing Fastlane lane that builds the simulator target once, captures four iPhone and four iPad scenarios, then reuses the Watch app dependency for its capture. The evidence collector accounts for every image, result bundle, and capture ledger entry before publishing three family manifests in one artifact. The reducer preserves exact source/toolchain provenance, digest checks, complete coverage, and reducer-only retry reuse. It rejects families mixed across capture attempts.

The capture selection, pinned runner tier, Xcode 27.0 build 27A266a, screenshot identities, and final release evidence artifact remain unchanged. Successful runs retain hardware and phase diagnostics. Hosted-row accounting and CI documentation follow the new job.

Related: #169493. That PR changes capture selection; this change retains selection and removes duplicated builds.

Evidence

  • Frozen candidate: 3b76bbfbc2ec8c8fcdb79a673dbf35b55ec48b54, integrating exact main fix 56c315156f4542f197a2b7f727681ba3f41c21b5 for the stale UI test cleanup observed in the previous run. Independent source review and subsequent exact bindings are clean; the original nine-file task patch remains unchanged after normalization against that base.
  • Current CI: https://github.com/openclaw/openclaw/actions/runs/38847594438, attempt 2 (one authorized native failed-surface host recovery). PR head is 3b76bbfbc2ec8c8fcdb79a673dbf35b55ec48b54; actual CI merge checkout is 1f127a9482c0f88b1ac3ce632b4d09ae4acaca01. Preflight selected full validation, Node, and iOS screenshots.
  • Passed at this head: screenshot evidence (28 tests), Fastlane gates (15), workflow guards (169), and workflow planning (615): 827 tests. Other selected Linux, UI, type, and guard jobs passed.
  • Attempt 1 native capture job 116801859465 verified Xcode 27.0 build 27A266a, built once in 224.22s, and passed all eight iPhone/iPad XCTest captures on attempt 1. The failure artifact contains four 1320x2868 iPhone PNGs, four 2064x2752 iPad PNGs, eight xcresults, and eight successful ledger entries. It contains no Watch image and is incomplete evidence.
  • Attempt 1 host runtime failure: creating Apple Watch Ultra 4 (49mm) with com.apple.CoreSimulator.SimRuntime.watchOS-27-0 failed with exit 145 / CoreSimulator error 401. Raw stderr identifies watchOS 27.0 build 24R362: The watchOS 27.0 simulator runtime is not available. / runtime path not found. The collector did not run, reducer job 116805574442 skipped, and required gate 116805676802 failed correctly. No complete capture artifact or final reduced evidence was produced.
  • The passing earlier d004 capture and attempt 1 failed capture report the same xcode-27-arm64 image version 20261012.0260.1, macOS 27.0.1 build 26A434, and Xcode 27.0 build 27A266a, under the unchanged xcode-27-xlarge label. The passing run's exact Watch runtime identifier was not logged and remains UNKNOWN. Earlier complete nine-image capture: https://github.com/openclaw/openclaw/actions/runs/38830853409. It is prior-head evidence and does not qualify this candidate or the changed CI receiver/reducer path.
  • The one-option logging repair exposed the runtime error. A real child-process probe against pinned Fastlane 2.240.1 confirmed visible failure stderr and an unchanged successful UUID return. Ruby syntax and all 15 existing lifecycle scenarios passed, including one build / nine PNGs / eight results / zero remaining owned simulators in the combined fixture. No retry, fallback, timeout, selection, or lifecycle ordering was changed.
  • Attempt 2 host recovery passed: native job 116809115061 ran on new GitHub Actions runner 1023013534 under the unchanged xcode-27-xlarge label and image version. It performed one build in 232.54s, passed eight XCTest captures, captured the Watch image, and packaged the complete evidence. Native job elapsed time was 15m33s; its capture step took 13m31s. The prior host was runner 1023008297. No source change, custom workflow, provisioning, coverage skip, or additional recovery attempt was used.
  • The existing job-rerun API reran the native job and its dependents. Passed Linux checks retain their original execution timestamps; the 827 focused test results were carried forward rather than rerun. Exact-name artifact download and strict reducer job 116813250802 passed; required gate 116813537145 and the workflow passed at the unchanged PR head.
  • Final artifact 12025716327: ios-release-screenshots-1f127a9482c0f88b1ac3ce632b4d09ae4acaca01, 11,357,379 bytes, archive digest sha256:a595983781e2b78b733da8dbc6ef9b9df4612edfcac1d7b9116c1b27c09a4c68. Independent native proof review accepted actual producer/reducer logs, reviewed owner blobs, nested receiver topology, and same-workflow/SHA/toolchain/hash provenance for all nine PNGs, three families and eight results. Workflow attempt 2 contains first OpenClaw capture attempts (attempt 1); these are distinct counters. Hosted collection and reduction accepted the required complete evidence. Independent local final-archive byte/dimension inspection was unavailable after three guarded transfers returned unexpected EOF; no further ZIP transfer will be attempted. The trusted hosted strict collector/reducer and artifact publication passed. Current binary dimensions were not independently read locally; independent proof review accepted this as nonmandatory for this CI routing change.

Review Follow-through

The earlier single-artifact extraction mismatch is fixed by downloading the exact artifact name into the explicit container path expected by the strict reducer. A receiver-layout regression exercises that path through the real collector and reducer. The documentation and main-conflict findings are fixed.

The current-head ClawSweeper review covers 3b76bbfbc2ec8c8fcdb79a673dbf35b55ec48b54 and reports no findings or before-merge code changes. It identified missing complete native pipeline proof; the unchanged-head host recovery now passes capture, named-artifact download, strict reduction, and the required gate. The local archive inspection limitation is recorded separately above. The optional workflow-shape test is retained because it guards removal of per-family overrides and the capture matrix, plus retention of phase diagnostics; functional proof comes from collector/reducer tests, the receiver-layout regression, and native CI.

Named follow-up ios-runtime-admission: capture the actual same-image runtime JSON contract, then evaluate early runtime inventory/admission before the generic build and eight captures. The existing iOS E2E owner already checks runtime availability. No admission change is implemented, and detectability of this stale-path failure from runtime metadata alone is not yet proven.

Production changes add 40 net lines relative to the integrated main base, chiefly to give combined evidence one complete ownership and validation boundary. Tests add 90 net lines; documentation is line-neutral.

@vincentkoc vincentkoc self-assigned this Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 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 scripts Repository scripts size: M labels Oct 16, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces two iOS screenshot jobs with one build and a combined evidence artifact.

Example: Full validation captures four iPhone images, four iPad images, and one Watch image.

  • Before: Two native jobs each prepare the toolchain and build the simulator target.
  • After: One native job builds once and captures the same nine images with eight XCTest results.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, coherent implementation with no definite introduced bug; available native evidence covers only part of the changed pipeline.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Maintainers incur repeated native toolchain setup and simulator compilation for the same screenshot validation.
Reason: The existing combined lane removes duplicate preparation, and the maintainer-authored proposal explicitly accepts the scheduling tradeoff.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it removes verified duplicate build work, has maintainer-approved direction, and has no definite introduced correctness finding.

Priority: P3
Reviewed head: 3b76bbfbc2ec8c8fcdb79a673dbf35b55ec48b54

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The pending current-head CI run must establish all nine images and eight XCTest results through collection, download, reduction, and final evidence publication.
Agent review details

How this fits together

Native CI builds candidate sources and captures screenshots; workflow-owned tooling validates their coverage, digests, and provenance before publishing release evidence and satisfying the aggregate gate.

flowchart LR
  A[Preflight] --> B[Combined native capture]
  B --> C[Evidence collector]
  C --> D[Artifact download]
  D --> E[Strict reducer]
  E --> F[Release evidence]
  F --> G[CI gate]
Loading

Technical review

Best possible solution:

Keep one capture owner and the strict reducer, with serial native capture as the documented tradeoff.

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

Current main runs two matrix jobs through the same clean-build Fastlane lane, establishing the duplicate preparation directly from source.

Is this the best way to solve the issue?

Reusing the existing combined lane is a focused solution that avoids build-product caching or cross-job transfer while retaining strict evidence ownership.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Screenshot scheduling changes intended behavior with a stated reason (e27433c: Parallel device-family shards shortened the serial screenshot tail; the current proposal explicitly prioritizes eliminating duplicate builds and acknowledges possible longer wall time.)
  • Evidence coverage and integrity keeps the original intent (e27433c: Require complete screenshot coverage, capture outcomes, digests, and reducer-owned provenance before publishing evidence.)
  • Workflow-owned parser keeps the original intent (5778f39: Prevent candidate/workflow revision mismatches from applying stale artifact topology rules.)
  • Retained producer attempts keeps the original intent (030a6ec: Allow successful evidence retained across workflow retries while rejecting mixed attempts and failed producer reruns.)
  • Simulator creation diagnostics changes intended behavior with a stated reason (03f92a5: Simulator isolation introduced the quiet creation call; the current body explains exposing its suppressed failure output after an unexplained Watch creation failure.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit e27433c adds scripts/ios-screenshot-evidence.mjs:156 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e27433c22ed7; files: scripts/ios-screenshot-evidence.mjs)
  • Peter Steinberger: Raw commit 030a6ec adds scripts/ios-screenshot-evidence.mjs:625 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 030a6eca356e; files: scripts/ios-screenshot-evidence.mjs)
  • Josh Avant: Raw commit 03f92a5 adds apps/ios/fastlane/Fastfile:248 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 03f92a56beca; files: apps/ios/fastlane/Fastfile)

PR surface

Source 0, Tests +90, Docs 0, Config -2, Other +42. Total +130 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 4 228 138 +90
Docs 1 2 2 0
Config 1 29 31 -2
Generated 0 0 0 0
Other 3 81 39 +42
Total 10 341 211 +130

Review metrics

Metric Value Why it matters
Production versus test LOC Production +111/-71; tests +228/-138 Production growth chiefly establishes complete combined-source accounting; tests adapt existing contracts and add receiver-layout and unknown-device coverage.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a CI efficiency improvement without an application behavior change or demonstrated urgent regression.
  • merge-risk: 🚨 automation: The PR changes capture topology, artifact transfer, and aggregate dependencies; the maintainer explicitly accepts losing parallel family capture.
  • 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.

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 (2 earlier review cycles)
  • reviewed 2026-10-16T00:54:46.487Z sha d004176 :: needs changes before merge. :: [P3] Update the reducer documentation to name the combined capture
  • reviewed 2026-10-16T01:56:06.692Z sha 48c4fef :: needs maintainer review before merge. :: none

Reviewed October 16, 2026, 12:06 AM ET / 04:06 UTC (Revision 3).

@vincentkoc
vincentkoc marked this pull request as ready for review October 16, 2026 01:49
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 16, 2026
* commit '56c315156f4542f197a2b7f727681ba3f41c21b5': (23 commits)
  fix(ui): remove stale Lit cleanup from model catalog tests
  refactor(tests): consolidate iMessage discovery checks (#173624)
  fix(auto-reply): retire older collect cancellation after admission
  fix(memory): avoid rebuilding initially empty indexes after restart (#173622)
  fix(test): preserve subprocess runtime identity (#173446)
  perf(sessions): batch transcript index reconciliation (#173620)
  fix(gateway): share GitHub options preparation during reconnects (#173589)
  perf(control-ui): open the composer model picker without list-wide work (#173275)
  fix: finish compile-cache cleanup after short CLI commands exit (#173603)
  refactor(ui): finish native shell rendering (#171554)
  fix: preserve standalone CLI profiles and settle Doctor shutdown (#173154)
  refactor: centralize agent memory host typing (#173619)
  fix: camera fallback picker opens away from the attachment button (#173618)
  refactor: deduplicate existing CI runner routing with YAML anchors (#172670)
  fix(ai): preserve multiline Google replies and report malformed streams (#173612)
  refactor(tests): remove duplicate speech policy test (#173606)
  refactor(ui): simplify page rendering and derivations (#173608)
  fix(release): Linux channel promotion fails after a withdrawn Windows companion (#173615)
  fix(update): wait for native Gateway ownership before restarting (#173588)
  test(sessions): admit schema probe fixture writes behind maintenance
  ...
@openclaw-barnacle openclaw-barnacle Bot added the app: ios App: ios label Oct 16, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vincentkoc
vincentkoc merged commit f123f32 into main Oct 16, 2026
216 of 219 checks passed
@vincentkoc
vincentkoc deleted the fix/ci-ios-capture-economics-20261015 branch October 16, 2026 07:18
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* fix(ci): share the iOS screenshot build

* fix(ci): preserve the screenshot artifact container on download

* merge: integrate main for iOS screenshot workflow conflicts

* style(ci): format the combined screenshot evidence changes

* docs(ci): name the combined screenshot capture

* fix(ios): expose screenshot simulator creation errors

* Merge main at a11e38b to include the UI test cleanup fix

* commit 'a11e38b8bb1eb58aaf392a0eab458dbb47aad30f': (23 commits)
  fix(ui): remove stale Lit cleanup from model catalog tests
  refactor(tests): consolidate iMessage discovery checks (openclaw#173624)
  fix(auto-reply): retire older collect cancellation after admission
  fix(memory): avoid rebuilding initially empty indexes after restart (openclaw#173622)
  fix(test): preserve subprocess runtime identity (openclaw#173446)
  perf(sessions): batch transcript index reconciliation (openclaw#173620)
  fix(gateway): share GitHub options preparation during reconnects (openclaw#173589)
  perf(control-ui): open the composer model picker without list-wide work (openclaw#173275)
  fix: finish compile-cache cleanup after short CLI commands exit (openclaw#173603)
  refactor(ui): finish native shell rendering (openclaw#171554)
  fix: preserve standalone CLI profiles and settle Doctor shutdown (openclaw#173154)
  refactor: centralize agent memory host typing (openclaw#173619)
  fix: camera fallback picker opens away from the attachment button (openclaw#173618)
  refactor: deduplicate existing CI runner routing with YAML anchors (openclaw#172670)
  fix(ai): preserve multiline Google replies and report malformed streams (openclaw#173612)
  refactor(tests): remove duplicate speech policy test (openclaw#173606)
  refactor(ui): simplify page rendering and derivations (openclaw#173608)
  fix(release): Linux channel promotion fails after a withdrawn Windows companion (openclaw#173615)
  fix(update): wait for native Gateway ownership before restarting (openclaw#173588)
  test(sessions): admit schema probe fixture writes behind maintenance
  ...

Co-authored-by: Vincent Koc <[email protected]>
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L 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