Repository navigation
Description
Summary
The gate job caches Chromium with actions/cache — restore and save — but ci.yml triggers
on pull_request and merge_group only. A cache saved on either ref is scoped to that ref, so no
gate run ever writes a key a later pull request or a merge-queue entry can read. The job pays a
~170 MB Chromium download plus a post-job cache upload on every first run of a pull request and on
every merge-queue entry, on the critical path of the one required check.
This is the same failure .github/workflows/browser-cache.yml's own header documents for the
browser lane, which was moved onto a main-warmed cache. The gate was never moved with it.
⚠ The comment at .github/workflows/ci.yml:84–86 states a saving this arrangement cannot
deliver — it counts a hit a merge-queue entry cannot get, because its ref is new per entry. That
prose is wrong today, whatever is decided below.
Approach
.github/workflows/ci.yml:104–110 is the gate job's cache and install pair.
.github/workflows/browser-cache.yml is the warm job that saves on each push to main, and
.github/workflows/ci.yml:198–212 is the browser lane reading it restore-only.
Two facts block a one-line fix, and both need settling before any edit.
- The keys differ. The gate keys on
playwright-${{ runner.os }}-<version>
(.github/workflows/ci.yml:107); the lane and the warm job key on
playwright-chromium-${{ runner.os }}-<version>(ci.yml:203,browser-cache.yml:45). The
~/.cache/ms-playwrightpath is identical, so the warmed cache is one rename away from serving
the gate — but a rename alone is not enough, because of (2). - The payloads differ.
scripts/check-a11y.mjscallschromium.launch()with nochannel,
i.e. the headless shell build.browser-cache.yml:51saves--no-shell, which is the full
Chromium without the shell. Unifying the keys without also installing the shell in the warm job
would hand the gate a cache it still has to download into.
So the work is: decide what the warm job saves, make the gate restore-only against that key, and
move the cache pins in scripts/ci-workflows.test.ts:310–319, which currently assert the lane
uses actions/cache/restore and saves nothing. A pin for the gate's half has to be added, or the
regression returns silently.
⚠ pnpm exec playwright install --with-deps chromium must keep running unconditionally in the
gate: --with-deps installs system libraries outside the cached directory, so a hit does not
cover them. The browser lane splits this into install on a miss and install-deps on a hit
(ci.yml:206–212); copy that shape rather than inventing one.
Open questions
What should the warm job save, so one cache serves both consumers?
- A — save both builds on
main(recommended).browser-cache.ymlruns
playwright install chromiumas well as--no-shell, under one key, and both the gate and the
lane restore it. Costs the warm job one extra download per Playwright bump; costs each consumer
nothing, and leaves one key rather than two. Nothing on the critical path grows. - B — give the a11y gate an explicit
channel: 'chromium', matching the lane, so the existing
--no-shellcache serves it unchanged. One line inscripts/check-a11y.mjs, no warm-job
change — but it changes what the accessibility gate actually drives, and
docs/testing.md§ "The accessibility lane needs a browser" records measurements taken against
the current build. Those would need re-measuring, andscripts/check-a11y.test.tsmay pin the
launch. - C — keep two keys and add a second warm job step that saves the gate's key separately. No
behaviour change to either consumer, at the cost of a second cache entry and a second thing to
keep in step.
Recommend A: it leaves one key and one claim to keep true, and does not disturb a gate whose
behaviour is measured.
Acceptance criteria
- No job in
.github/workflows/ci.ymlsaves a Chromium cache. Both consumers restore only. - A merge-queue entry and a first pull-request run both restore Chromium from the cache
browser-cache.ymlsaved onmain, measured on a real run rather than inferred. -
scripts/ci-workflows.test.tspins the gate's half as it pins the lane's: restore-only, one
key, one path, and the key agreeing withbrowser-cache.yml's. -
.github/workflows/ci.yml:84–86's comment no longer claims a saving the arrangement
cannot deliver. - The system-library install still runs on a cache hit, in both jobs.
Verification checklist
-
pnpm test:run scripts/ci-workflows.test.ts -
.claude/skills/pr-prep/check.sh -
pnpm test:a11ylocally, to confirm the gate still drives a browser it has. - Read this pull request's own
Lint, Typecheck & Buildjob log: the Chromium step must report
a cache hit, and no post-job cache upload may appear. A green job that downloaded 170 MB is
the failure mode. - Read a merge-queue entry's log for the same thing after it lands — that is the case this
ticket exists for, and the only one a pull-request run cannot demonstrate.
Notes
- Found while implementing ci(smoke): let a Dependabot run skip Smoke quietly #457, which dropped a dead
id: browser-cachefrom this same step. The
dead id was in that ticket's scope; this is not — it is a behaviour change across three files,
and it turns on a decision. - No measurement of the download's wall-clock cost here is in hand.
docs/testing.mdrecords
"a miss costs a download, never a failure" for the lane; the same holds for the gate, so this is
cost, not correctness.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsDone
Activity
Ardnived commentedon Nov 22, 2026
@sydevs-bot implement
sydevs-bot commentedon Nov 22, 2026
🤖 no session running
approved by Ardnived
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.
docs(testing): one home for the browser cache's ref-scoping rule
test(ci): absorb the two one-assertion describes into the key's table