Repository navigation
improve: reduce iOS screenshot preparation delays - #188927
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
joshavant
marked this pull request as ready for review
October 31, 2026 01:29
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 31, 2026
* improve: reduce iOS screenshot runner contention * fix: preserve Spotlight diagnostic controls * test: verify release source before credential access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
iOS screenshot runners can spend substantial time waiting for CPU headroom between fresh simulators.
User Impact
Reduces the measured simulator preparation cycle on disposable hosted runners. Normal CI capture, screenshot-only runs, and Store/TestFlight release capture use the same host Spotlight setting already used by release qualification. Local commands leave host indexing unchanged.
The optional
startup_probediagnostic keeps indexing enabled because its Spotlight experiment needs indexed positive controls. Existing runner sizes, deadlines, checks, screenshot inventory, and release admission remain unchanged.Why This Change Was Made
Disable host indexing before checkout rather than changing simulator behavior, adding caches, or relaxing headroom checks. The production change is three existing-command workflow steps; temporary accounting scripts and benchmark inputs are excluded.
Evidence
Acceptance rule agreed before the experiment: five interleaved fresh-runner baseline/disabled samples at one fixed source revision and runner class; lower median and tail total-cycle time with all existing checks passing, followed by a successful full screenshot capture. The total includes the final headroom wait after iPad cleanup.
All 10 samples passed all 25 commands, exclusivity assertions, cleanup, and final headroom. Each used
17d465f42d01b6075247d34feae64045c7b4ff5d,xcode-27-xlargewith 5 available CPUs, imagexcode-27-arm64version20261026.0314.1, macOS 27.0.1 (26A434), and Xcode 27.1 (27A9275). Both release jobs were skipped. Resource timelines and stack sampling were disabled.Median improved 32.7%; the slowest observed cycle improved 36.7%. Five samples per condition do not establish a reliable long-term tail estimate. Ranges overlap. This measures the stock simulator cycle, not whole screenshot-pipeline runtime, and does not identify the precise external service responsible.
Most savings came from waiting for headroom: median combined headroom waits fell from 132.0s to 36.0s. Active command totals slightly regressed (180.2s to 186.9s median). In particular, the first iPhone inventory median rose from 25.6s to 29.6s, and the later iPhone status-bar median rose from 1.1s to 3.8s. The complete table below retains these regressions; the accepted primary metric is the complete cycle with safety checks preserved.
All interleaved runs and phase timings
Dispatch from the frozen benchmark branch with
operation=screenshots, alternatingspotlight_mode=baselineanddisabled, andresource_diagnostics=false,startup_probe=false. The committed workload isscripts/ios-simulator-accounting-probe.pyat the benchmark SHA.Phase p95 values use the same linear interpolation across five observations.
Native accounting covers the command and waited-for descendants, excluding external CoreSimulator services. Median accounted CPU was 4.60s baseline versus 4.62s disabled; maximum command RSS was approximately 104 MiB in both. No swaps or block I/O were charged to these commands. These counters do not establish total host CPU, memory, or I/O savings.
Local checks: workflow lint/actionlint/zizmor and formatting passed. The required macOS workflow batch passed (1,034 tests, 10 existing skips; 314.96s total). The focused release-qualification file passed all 96 tests (2.63s wall); its added assertion first failed on the unconditional candidate and passed after exempting the existing diagnostic. Type checking, test-file lint, and the test-line ratchet passed. The 16-line allocation covers the diagnostic contract and the existing source-before-credentials contract, with no new test process or case.
Initial PR CI exposed a test that assumed checkout must be the first release step. Runner setup now precedes checkout, so the test locates checkout by its action identity, exercises the following source-verification shell step, and explicitly verifies that credential-bound steps follow verification. The failure reproduced locally; all 23 mobile-release CI tests then passed (18.12s wall), along with the matching scripts test typecheck, file lint, formatting, and test-line ratchet.
Full screenshot-only capture passed on
7e19257efd914d8edb279d098353ab2dba3204e5: all four iPhone images, all four iPad images, and the Watch image were retained as valid PNGs. The existing capture receipts record successful first attempts for iPhone/iPad; every build/capture/cleanup phase succeeded and recorded one active simulator during capture and zero after cleanup. The capture step took 13m23s; this is a correctness check, not a before/after whole-pipeline speedup claim. Images and diagnostics artifact expires November 14.Subsequent commits exempt
startup_probe=true, add its regression/documentation, and repair the source-admission test. This run usedstartup_probe=false, so its executed preparation and capture path is unchanged. Qualification and release/upload jobs were skipped; no app was uploaded.Independent AutoReview completed scoped-clean at P0–P2 on the complete local patch from base
0b1cd5f1d4dd392db586260ade21b43a955e2579, including the source-admission repair subsequently committed as final head19b6645ff058a57843c34f820a3955f3cac5c13a(correctness confidence 0.96). Local ClawSweeper failed twice on the same structured-output schema error; its first response identified the diagnostic interaction, which was fixed and tested. Neither failed attempt is counted as a completed review. The documented AutoReview fallback supplied the valid independent assessment.Final-head PR CI passed on
19b6645ff058a57843c34f820a3955f3cac5c13a, including the repaired source-admission shard. The native exact-head watcher reportedGREEN; the separate final gate publisher also succeeded.