Repository navigation
CI: the queue reuses a pull request's passing results, and no browser job outlasts the unit shards - #2986
Merged
Conversation
- Only the full-ci label cancels and replaces a pull request's CI run. Any other label waits for the run in progress, then finds its checks passed on the same commit and skips them. A label run cannot skip everything up front: a skipped verify counts as passing. - 14 files in the cross-browser list ignored the engine selection and ran in full in both the Chromium and the WebKit leg, artifacts-screens (about 11 minutes) among them. They now run where Chromium is selected (ownBrowsersAsked), once. sidebar-window-buttons launches through launchBrowserEngines. A test holds every listed file to the selection. - A full browser job that runs covers the changed files in its list, so they no longer run a second time in tests (changed files). The desktop setup window's step names its file in a list the planner can read. - The queued pull request's head is fetched on a deadline of its own, and a merge group that has to go without its history says why. - The budget test builds matrix legs as GitHub does: include and exclude are lists of legs, not axes. - Comments and docs/releasing.md name the engine and shard checks.
Conflicts: byEngine (from #2913) now takes the files the WebKit rule owes and drops a changed file the cross-browser job already runs; WebKit files keep renderer-crash's test alongside browser-engines; select-scrolls runs its Chromium cases in the Chromium leg and its WebKit cases in the WebKit leg; the renderer-crash rule reads the matrix's BROWSER_ENGINE.
artifacts-screens.test.tsx took about 11 minutes in Chromium, nine of them its layout cases, and as one file it set the length of its shard and so of every run. What its describes share moves to artifacts-screens.harness.ts; the flows stay in the file, and the layout cases (each screen in light and dark, wide, narrow and on a phone) are dealt every fourth over artifacts-screens-layout-1..4.test.tsx, so the browser jobs run them side by side. The same 190 tests run; a suite test fails if a layout file goes missing or deals the wrong part.
…ide by side The window's one test file ran its 293 tests one after another for about ten minutes, the longest job of a run. What its describes share moves to setupLayout.browser.harness.ts, the move to OpenBot Cloud (about three minutes) and the approved layouts with the too-old screens (about three) move to files of their own, and the job runs the three with --parallel. The WebKit run of the key field and tab row stays on setupLayout.browser.test.ts.
`bun test --shard` dealt the sorted list out in turn, so slow files piled up on one runner: on 4 December one WebKit shard took 15.6 minutes and another 9.4. Each engine's shards now read that engine's record (scripts/browser-timings/<engine>.json, seeded from the last three runs' WebKit logs) with --timings, so they take about as long as each other and each worker starts its slowest file first. Each shard writes its own durations over the record and uploads them; `bun scripts/browser-timings.ts <run id>` merges them into a fresh record. ci-changes.ts still proves a full job covers its list with the record in its command: a record every shard of an engine reads alike only moves files between shards. One whose path differs by shard is no proof. The desktop setup window's job runs its three files with --parallel. The suite's test helper for `mentions` returns nothing for no paths, as ci-changes.ts does: git took the first pathspec for the pattern, and a comment naming a wildcard test file made a CHANGELOG-only group run tests. CONTRIBUTING says the queue reuses checks that already passed.
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
December 5, 2026 03:55
Refreshed with scripts/browser-timings.ts from this branch's first run (47475884691), where each engine ran in its own legs: the seed split each file's time by its tests' names.
Contributor
Author
|
Timings on this PR's first full run (47475884691), against 4 December's baseline (PR run 47457434745):
The slowest browser leg (Chromium shard 1, 6.1 min) is within 0.2 min of the slowest unit shard. Every shard uploaded its own durations. I then refreshed |
ataibarkai
pushed a commit
that referenced
this pull request
Dec 5, 2026
Main split setupLayout.browser.test.ts into its own files (#2986); this branch's changes to those tests now sit in the files the tests moved to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xYtaRm1VTLHW6QMDUMASK
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 this changes
Every pull request paid for the full suite twice (once on the PR, again in the merge queue), and the browser jobs were the long pole of each run: on 4 December the WebKit shards took 8.5 to 15.6 minutes and the desktop setup window 10 to 11, against 3.6 to 6.2 for the unit shards (PR run, merge-queue run).
1. Dusty's #2784, carried onto main. His 18 commits keep their authorship (merged, not squashed), with the conflicts against what main gained since (#2907's renderer-crash
test, #2913'sbyEngine) resolved:byEnginetakes the files the WebKit rule owes, and leaves out a changed file the cross-browser job already runs in full.select-scrolls-layoutruns its Chromium cases in the Chromium leg and its WebKit cases in the WebKit leg. Taken as either side alone, its WebKit cases would have run nowhere.$BROWSER_ENGINE. Before this, it no longer saw the WebKit list at all..github/ci-budgets.jsonandscripts/ci-budgets.test.tsare as Dusty wrote them.2. Bun's own selection, where it helps.
--timings/--update-timings(adopted). Each engine's shards are now cut by that engine's recorded per-file durations (scripts/browser-timings/<engine>.json), not dealt out alphabetically. Each worker starts its slowest file first, and each shard uploads what its files took.bun scripts/browser-timings.ts <run id>merges a run's shards into a fresh record.ci-changes.tsstill proves a full job covers its list with the record in its command, because a record every shard of an engine reads alike only moves files between shards. A record whose path differs by shard is no proof, and a test pins both cases.--changed(checked, not adopted). A probe on Bun 1.4.4 shows it follows static imports transitively, including JSON imports. It misses a fixture read by its path and a change tobunfig.toml.ci-changes.ts's hand-rolled search (mentions, agit grepfor a path) exists exactly for tests that name a doc or file by path, and today the partial mode only ever sees test and doc changes, since any code change runs the whole suite. No test imports another test, so--changedwould find nothingmentionsmisses, and would miss what it finds. Using it to shrink the suite on code changes would need the suite's pass-proof and count floor reworked, so it stays out.3. Browser legs levelled.
artifacts-screens.test.tsx, the 11-minute file that set the slowest shard's floor: what its describes share moved toartifacts-screens.harness.ts. Its layout cases (9 of its 11 minutes) are dealt every fourth overartifacts-screens-layout-1..4.test.tsx. Still 190 tests. A suite test fails if a layout file goes missing or deals the wrong part.setupLayout.browser.harness.ts: the move to OpenBot Cloud (about 3 min), the approved layouts and too-old screens (about 3 min), and the rest (about 3.5 min). The job runs them with--parallel. Still 293 tests, and the WebKit-tstep is unchanged.moved-apps-reconnectat about 5.5 minutes in WebKit. That is within a minute of the slowest unit shard, so it is left whole.4. Merge-queue settings (ruleset 28439267, not changed here). Today: ALLGREEN, build 4, merge 4, minimum 1, no wait, status timeout 120 minutes. The brief had build 2 and merge 2, so it was raised since. Nothing measured here points to another setting moving pull requests through faster. The 4 December delays were WebKit flakes ejecting entries and 13-to-15-minute runs, which slices A and B address, not the queue's shape. One optional change: lower the status-check timeout from 120 to 60 minutes. The longest job is capped at 30, and runner waits ran to 24, so a group whose checks never report would free the queue in an hour, not two.
Where it runs
GitHub Actions, the CI scripts and the browser test files (split, not changed in what they check). No app, server, API, database, signing or release-policy change.
Best practice consulted (searched 2026-12-04)
--timingscuts shards by recorded time, and every shard must read the same set of timings files. Its--changedbehaviour was probed here, since the page does not describe it.--timings.Proof
bun teston the CI scripts and engine tests (ci-changes,ci-run-tests,ci-budgets,browser-timings,workflow-concurrency,release-publish-order,release-ci-gate,test-floor,browser-engines,renderer-crash,artifacts-screens): 281 pass, 0 fail.bun run lint,bun run format:check,bun run typecheckand the desktop'stypecheckall pass.actionlint: no new findings. Its 19 existing ones are the$/.github/actions/...references main has too.zizmor: no findings.realMentionshelper rangit grepwith no pattern when given no paths, asci-changes.tsnever does. It now returns nothing, as the real code does.Carries #2784 by @dustywusty.
Changelog
none