chore(ci): cache Release's build + console dist, stop PR-side cache churn, move CodeQL/coverage off the hot path - #3666
Merged
Conversation
…hurn, move CodeQL/coverage off the hot path Data from today's runs (post-#3622 steady state): every main push paid a ~9.5-minute Release job of which Build (4m21s, no turbo cache — the same omission lint.yml had) and the vendored Console SPA build (3m11s, a pure function of the .objectui-sha pin that rarely changes) were 80%. Meanwhile PR-side cache saves (~5 turbo entries per push) churned the 10 GB Actions cache pool and evicted the main seeds — observed as sudden cold spikes (Build Core 51s → 4m30s). - release.yml: add the standard turbo cache (Build ~4½min → expected <1min), and cache packages/console/dist keyed on hashFiles(.objectui-sha, build-console.sh) — skip build-console.sh on hit, and verify the dist stamp against the pin either way via check:console-sha (its exit-1-on- drift contract covers a stale restore). - ci.yml + lint.yml: turbo caches become restore-only on PRs (actions/cache/restore); explicit main-push-only actions/cache/save steps (always(), matching the old post-step semantics) keep seeding. PRs read main's entries via the existing prefix restore-keys. - codeql.yml: drop the pull_request trigger (user decision) — ~4½ runner- minutes per PR sync; every merge is analyzed on main within minutes at the current merge cadence, plus the weekly deep pass. Note left about the Analyze check no longer reporting on PRs. - coverage → nightly (user decision): new coverage-nightly.yml (05:00 UTC + workflow_dispatch) owns the instrumented spec suite; ci.yml's push run now includes spec's plain test task instead (uninstrumented — net faster). Verified locally that spec's suite runs coverage without any build (spec has no workspace deps) and the v8 provider is present. All five workflow files parse; changeset is empty (releases nothing). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECTCrcCdZpCHw5zFSgcmGt
os-zhuang
marked this pull request as ready for review
July 27, 2026 13:45
os-zhuang
pushed a commit
that referenced
this pull request
Jul 27, 2026
Picks up #3666's CI caching fix ('stop PR-side cache churn'), which the workflow used by this PR's run predates — the run stalled for 50+ minutes on 'Run affected tests' across two attempts on separate runners.
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.
Why
Post-#3622 timing data shows the cost has moved to the push side: every main push pays a ~9.5-minute Release job, 80% of which is two cacheable steps —
pnpm buildat 4m21s (release.yml has no turbo cache, the same omission lint.yml had) and the vendored Console SPA build at 3m11s (a pure function of the rarely-changing.objectui-shapin). Separately, PR-side cache saves (~5 turbo entries per push) churn the repo's 10 GB Actions cache pool and evict the main seeds — observed today as a sudden cold-cache spike (Build Core 51s → 4m30s).Plus two explicit decisions from the maintainer: CodeQL off the PR path, coverage off the push path.
What
hashFiles('.objectui-sha', 'scripts/build-console.sh').build-console.shis skipped on cache hit; a newpnpm check:console-shastep verifies the dist stamp against the pin either way (the script's exit-1-on-drift contract covers a stale restore). Expected ~3 min → ~10s whenever the pin is unchanged. Note: actual npm-publish runs still rebuild the console insidepnpm run release— this cache accelerates the (vastly more common) non-publish pushes.actions/cache/restorereplacesactions/cache; explicitactions/cache/savesteps run on main pushes only (always(), matching the old post-step save-even-on-failure semantics). PRs keep reading main's entries through the existing prefix restore-keys; what they lose is only same-PR incremental caching between pushes, which the churn made unreliable anyway.pull_requesttrigger removed (maintainer decision): ~4½ runner-minutes per PR sync; at the current merge cadence every change is analyzed on main within minutes of merging, plus the weekly deep pass.coverage-nightly.yml(05:00 UTC +workflow_dispatch) owns the instrumented spec suite and thecoverage-reportartifact; ci.yml's push run now includes spec's plain test task instead — net faster, since the plain suite is cheaper than the instrumented one it replaces.Expected effect
Verification
workspace:deps; suite readssrc/directly;@vitest/coverage-v8present) — verified with a live single-file coverage run in a fresh worktree.hashFilesinputs (.objectui-sha,scripts/build-console.sh) exist at repo root.check:console-shasemantics confirmed from the script header: exit 1 on stamp/pin drift, warn-only when unstamped, pass when in sync.🤖 Generated with Claude Code
https://claude.ai/code/session_01ECTCrcCdZpCHw5zFSgcmGt
Generated by Claude Code