Skip to content

gate: direct hosted Macs share each out/ variant through the Actions cache - #288

Merged
SSFSKIM merged 1 commit into
masterfrom
hosted-build-cache
Oct 28, 2026
Merged

SSFSKIM merged 1 commit into
masterfrom
hosted-build-cache

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Why

Under HOSTED_MAC_ROUTE=direct every hosted e2e job starts on an empty Mac and builds out/ itself. In the 23 direct jobs with logs since the flip (10-28), the build was a median of 140 s out of a 368 s job, 39% of hosted Mac job time. The account gets 5 concurrent macOS jobs. GitHub's limits page gives 5 for Free, Pro and Team, and larger runners share that cap, so paid runners add no slots. A set larger than 5 therefore runs in rounds, and each later round rebuilt what the first round had already built. O2's landing set 40681661133 queued 39 hosted groups behind the 5 slots at 11:39Z. The mirror route shared its build (hosted-Mac spec, Decision Log 2026-10-26 "the out/ build is shared"). The direct route dropped that.

What

  • gate-plan.mjs: a direct hosted entry whose script starts with scripts/e2e-build.sh <variant> && carries cached: <variant>. Self-hosted, guest and mirror entries do not change. The mirror fixture stays byte-identical.
  • gate.yml, in the e2e steps:
    • actions/cache/restore@v6 restores ${{ runner.temp }}/maws-e2e-build/<sha>/<variant> under the key e2e-build-<os>-<sha>-<variant>.
    • On a miss, the job builds with scripts/e2e-build.sh and saves with actions/cache/save@v6 (continue-on-error, so a save another job made first never fails this one).
    • The command's own e2e-build.sh then restores from that directory. The digest is checked there, and the job rebuilds if it doesn't match.
    • The path is the same on every hosted Mac, which a cache entry's version requires.

Proof

  • node --test .github/scripts/gate-plan.test.mjs: 79/79. The new test pins the cached entries and the order of the restore, build and save steps. The refused-start walk still passes.
  • ci-gate run 40683525095 (static, e2e:library, e2e:artifacts), green:
    • e2e:library missed the cache, built plain in 125 s and saved it ("Cache saved with key: e2e-build-macOS-579adb49…-plain").
    • e2e:artifacts waited 13.5 min for a hosted slot. It then restored the 15 MB entry in under 1 s, and the command restored out/ with the same sha256 (8005c428…). It ran 4 passed in a 121 s job; its last build-it-yourself job took 161 s.
  • reviewer-medium: no findings.

Effect

Only the first round of a large set builds; the rest skip about 2 minutes each. For a 39-group set that is about 34 × 125 s ≈ 70 slot-minutes, or about 14 minutes of wall time at 5 Macs. Runs with 5 or fewer hosted groups behave as before. The cache is 532 MB of 10 GB now, and each entry is about 16 MB.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)

…cache

A direct hosted Mac starts empty, so every hosted e2e job built out/ itself:
140 s of a 368 s job at the median (23 jobs since the flip, 39% of the hosted
Macs' job time). The account has 5 hosted Macs, so a set larger than that runs
in rounds (O2's landing set, 40681661133: 39 hosted groups), and every later
round rebuilt what the first had built.

A direct entry whose script builds out/ now carries that variant as `cached`.
The e2e job restores <sha>/<variant> from the Actions cache, else builds it with
scripts/e2e-build.sh and saves it (never red on a save another job made first);
the command's own build then restores it from that directory, checking its
digest, and builds after all when it does not match. The path is the same on
every hosted Mac, as a cache entry's version requires. Self-hosted, guest and
mirror entries are unchanged.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-28T12:11:25.340101Z 4fadaad PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit d3da8cd into master Oct 28, 2026
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…iant through the Actions cache (#288)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM deleted the hosted-build-cache branch October 28, 2026 12:12
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…ixtures #289, CI #288 and #290; wire minor stays 5)

replay-fixtures.test.ts: master's p4/p5 listing, which already reads O2's Stop-hook probe
journals under fixtures/p5; its comment names both P5 sets. Master's wire is still 4, and
the regenerated manifest is unchanged.

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant