Repository navigation
ci(browser): run Browser regression (other scripts) in three parts on the self-hosted PC - #3988
Conversation
… the self-hosted PC
On the self-hosted PC "Browser regression (other scripts)" was one job of six workers that took
about 20 minutes, nearly the whole run (the next longest job takes about 6). The matrix that
already splits it over four jobs on GitHub's runners and five on the VM runners now gives the
self-hosted PC three parts of six workers each ("Browser regression (other scripts 1/3)" to
"3/3"), split by scripts/ci-browser-parallel.ts's BROWSER_SHARD as the hosted shards are.
Nothing else about the job changes: the same scripts (each in exactly one part), the same retry,
script timeout, job timeout, environment, check slots and draft and docs-only skips. The
"Integration and browser" check still takes the matrix job's one result, which fails when any
part fails, is cancelled or is skipped. A fork pull request's Linux jobs stay on ubuntu-24.04 and
its four hosted shards.
What follows from three parts:
- scripts/ci-runner-route.sh counts six Linux jobs, not four, as a run's need for room on the
self-hosted pool; ci-runner-route.test.ts now holds that number to ci.yml's routed jobs and
checks the matrix each route output gives (a fork's: the four hosted shards).
- scripts/release-ci-reuse.ts accepts main's run with the three parts (CI_SHARD_COUNTS 3, 4, 5),
so a Release run can still take main's own CI run; release-ci-reuse.test.ts and
release-validate-workflow.test.ts list main's run with the three parts.
- scripts/pages-gate.test.ts fails when one of browser-other's scripts is in no part or in two,
for every number of parts its matrix gives.
- docs/development.md and the self-hosted runner README say three parts and six jobs.
Co-authored-by: sisyphus-dev-ai <[email protected]>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
The paragraph on what bounds the P620 described a 30 GiB host that held one browser spike but not two. The P620 has 184 GiB now. Measured on this pull request's runs with six workers per part: one part peaked at 5.6 to 10.2 GiB, the three parts of one run at 15.2 to 19.0 GiB together, and available memory never fell below 79.9 GiB on the P620 or 77.8 GiB on the second host. The paragraph also says each part takes one check slot, five per run. Co-authored-by: sisyphus-dev-ai <[email protected]>
Merge passMerged head
Merge pass note for #3988 at a988512 (ci(browser): run Browser regression (other scripts) in three parts on the self-hosted PC). What it does: on the self-hosted machine the browser-regression job that took about 20 of a run's 21 minutes now runs as three parts, as it already runs as four on GitHub's runners and five on the VM runners. Measured on this pull request's four attempts: a run 21.5 minutes before, 9.4 after (8.6 to 12.9). |
What
On the self-hosted PC, Browser regression (other scripts) was one job of six workers that took about 20 minutes, nearly all of a run's 21 (the next longest job takes about 6). The matrix that already splits it over four jobs on GitHub's runners and five on the VM runners now gives the self-hosted PC three parts of six workers each,
Browser regression (other scripts 1/3)to3/3, split byscripts/ci-browser-parallel.ts'sBROWSER_SHARDexactly as the hosted shards are.One expression changes in
ci.yml('[1]'becomes'[1,2,3]'in the self-hosted branch of the matrix). What follows from it:scripts/ci-runner-route.sh: a run needs room for six Linux jobs on the pull requests' pool, not four (linux_jobs=6). A test now holds this number toci.yml's routed jobs.scripts/release-ci-reuse.ts:CI_SHARD_COUNTSis[3, 4, 5], so a Release run can still take main's own CI run (main's run lists the three parts now).docs/development.mdandscripts/self-hosted-runner/README.mdsay three parts and six jobs.Not changed: branch protection, repository settings and variables, runners,
on:, concurrency andcancel-in-progress, timeouts (job 50 min, script 600 s), the retry rule (BROWSER_RETRYunset: a failed script runs once more),BROWSER_WORKERS(6 self-hosted, 3 hosted),CHECK_MAX_RUNS/CHECK_WAIT_SECONDS, the draft and docs-only skips, the hosted and VM branches of the matrix, and the merge rule (main's newest run green before the next batch: nothing in this PR touches it).The lead's five conditions
1. No check removed or weakened: every script runs in exactly one part
Generated by each tree's own code (
selectBrowserScripts,serialBrowserScripts,shardScriptsofscripts/ci-browser-parallel.ts, withbrowser-other'sBROWSER_SCRIPTS/BROWSER_EXCLUDEread from that tree'sci.yml): main at30faaefbcwith today's self-hostedBROWSER_SHARD=1/1, against this branch with1/3,2/3,3/3:diffmain vs unionTo reproduce it, save this as
listing.tsand run it against a checkout of main and one of this branch, then diff the sorted second columns:The test:
scripts/pages-gate.test.ts"runs each of browser-other's scripts in exactly one of its parts, for every number of parts its matrix gives" reads the matrix's lists fromci.yml(3, 4 and 5 parts), dealsbrowser-other's scripts with the realci-browser-timings.json, and fails when a script is in no part or in two. Checked to fail both ways: withshardScriptschanged to also put every script into part 1 (in two parts), and to drop sidebar-filter-demo (in no part).The full listing of the three parts is at the end of this description.
2. The required checks keep their names
Fast checks,Integration and browserandNative Windows installare untouched jobs with untouched names.Integration and browserstillneeds: [changes, integration, browser-main, browser-other]and readsneeds.browser-other.result, which for a matrix job issuccessonly when every part succeeded, andfailure/cancelled/skippedwhen any part was (GitHub's matrix result, as today on hosted runs with four shards). Its script is unchanged, so it fails exactly when it did.scripts/workflow-needs.test.tsandscripts/release-ci-reuse.test.tspass on the newci.yml.3. Before and after, measured
Measured from the Actions API on this PR's run 43913916704: attempt 1 on the push, attempts 2-4 by
gh run rerunof the whole run, each after the previous ended and only while the pool had room (every attempt routed to our PC). "Run" = first job's start to last job's end. Before = attempt 1 of green runs with the one job on a self-hosted runner.Every script passed in every attempt, none on a second run (no FLAKY line in any part's log). No timeout was raised and no retry added.
The cost, plainly: the browser job-minutes go from about 20 to about 23 per run (three set-ups instead of one), and to 29 when parts wait for a check slot (attempt 1); the run's self-hosted runner-minutes are 35.3 median against 36.1 for PRs before (other jobs ran a little shorter), 43.7 in the run whose parts waited for slots.
CI_SELF_HOSTED_CAPACITYis a repository variable, not changed by this pull request; the CI supervisor decides it after the merge, with a measurement.Where the time goes now: each part's own lane (
Total: ... passed in) took 360-389 s (1/3), 443-447 s (2/3) and 370-389 s (3/3). Part 2/3 holdssidebar-filter-demo-regression.ts, 429-432 s on its own: that script is the floor, and part 2/3 is at it. A split balanced by the measured per-script times of these runs (every script still in one part) gives, simulated, 432 / 379 / 379 s against today's 436 / 360 / 371 s: about 10 s off the longest part, not worth a change. The longer parts in attempts 1 and 3 were waiting for one of second host's three check slots (278, 196, 146 s), not running scripts.Memory (read only:
docker stats --no-streamof everyherdr-ci-*runner container and the host'sMemAvailable, every 5 s on both machines, attempts 2-4 whole, attempt 1 from its middle; the "before" is main's push run 43915554579, one job of six workers on P620-main-2, inside the same window):A part peaks at 5.6-10.2 GiB, like the one job did (9.2): the spike belongs to the six scripts a worker pool runs at once, and each part has six workers. One run's three parts reached at most 19.0 GiB together; two runs' parts at their worst at once would be about 38 GiB. The lowest available memory on either host in the whole window was 72.6 GiB (P620, during main's single-job run and the owner's own work), so on today's machines (the P620 has 184 GiB) two runs' spikes at once leave more than 30 GiB available. The README's "holds one browser spike but not two" was measured when the P620 had 30 GiB; the second commit (README only) says what is true on today's hosts, with these numbers.
Check slots: each part runs
bun run check run, so it takes one slot of its host'sCHECK_HOST_MAX_RUNSlike Integration tests and ui-regression: a run now holds five slot lanes (three before). The P620'shost.envsetsCHECK_HOST_MAX_RUNS=6andCHECK_HOST_BROWSER_WORKERS=6(so six workers per part there, asci.ymlasks), the second host's onlyCHECK_HOST_MAX_RUNS=3.4. Fork pull requests go where they go today
scripts/ci-runner-route.shstill printslinux="ubuntu-24.04"for a fork before it reads anything else, and the matrix's hosted branch is still'[1,2,3,4]'. New tests inscripts/ci-runner-route.test.tsrun the real route script and feed itslinux=output throughci.yml's own matrix expression (they first check they read that whole expression): a fork pull request gets the four hosted shards whatever the variables say (CI_SELF_HOSTED_LABELS,CI_LINUX_SELF_HOSTED_LABELS,CI_FAST_SELF_HOSTED_LABELS, a dispatch input, andpull_request_target); a same-repository run on our PC gets three, main's pool three, a busy pool four hosted, the VM runners five. Changing the hosted list to'[1,2,3]'fails the fork test.scripts/light-runner-workflow.test.ts(no pull request job reaches a self-hosted runner without the fork guard) passes unchanged.5. The merge rule
Nothing here reads or writes it: no change to the merge pass, branch protection or
on:. Concurrency (validation-CI-<ref>, cancel only for pull requests) is unchanged.Also asked: Detect changes'
codeoutput gates the matrix job exactly as it gated the one job (theif:is the job's, not a part's); the logs artifact is uploaded by every part asbrowser-other-<part>-<run>-<attempt>(the name the hosted shards already use, whichscripts/ci-browser-timings.tsalready reads), with the screenshots on failure or cancel as before; each part's name saysk/3.What it costs, and what to watch
bun run build,build:shell, ffmpeg, the demo build), so the browser job-minutes per run go up; the table above gives the measured self-hosted runner-minutes per run before and after.CHECK_MAX_RUNS6 per PC (andCHECK_HOST_MAX_RUNS3 where a host sets it, e.g. second host). A part that finds the slots taken waits for one; that wait counts against its 50-minute timeout, as for every lane today.linux_jobs=6): withCI_SELF_HOSTED_CAPACITYat 10, a same-repository pull request now goes to our PC while at most 4 (was 6) other heavy jobs are queued or running there, and to GitHub's runners (four shards, as today) otherwise. So two pull request runs that start together put the second one on hosted runners, where today both would fit. Replaying the last 24 hours (47 same-repository pull request runs with their jobs, 38 of them started while another run held pool jobs): with 4 jobs per run and capacity 10, none would have gone hosted; with 6 and capacity 10, 7 of 47 would have (a lower bound: the other runs in that replay held four jobs, not six); with 6 and capacity 12, none. Keeping today's behaviour (two runs at once on our PC) needsCI_SELF_HOSTED_CAPACITY= 12, against 9 pull request runners online now (4 on the P620, 5 on second host), so up to 3 jobs would then wait for a runner. The variable is the owner's; this PR does not touch it.self-hosted-ovis-main) is 4 runners, all on the P620 (read 2026-11-16 17:42Z). A main run puts Detect changes there first, then seven jobs (Fast checks, Integration, ui-regression, the three parts, herdr-core) on those 4 runners: four start, and the three that wait start as herdr-core (about 0.5 min), Fast checks and Integration (about 3 min) end. So main's run should take about 3 + 8 = 11-12 minutes, not 21; its five slot lanes share the P620's six slots with the pull requests' lanes there. The first main run after the merge must be watched.CI_SHARD_COUNTS3, 4, 5):release.ymlandrelease-validate.ymlcheck outgithub.shaand run that commit's ownscripts/release-ci-reuse.ts, so a Release of a commit from before this merge runs the old check (one job accepted) against its one-job main run, and one after it runs this check against a three-part main run. No release loses its reuse.scripts/ci-browser-timings.jsonbalances the parts and is stale for some scripts (sidebar-filter-demo: 121 s in the table, about 430 s on CI; 14 newer scripts are not in it). That moves time between parts, not scripts; refreshing it (bun scripts/ci-browser-timings.ts --runs 5) is a separate change.How to go back
Revert this PR's one commit: the matrix gives
'[1]'again, and the route, release reuse, tests and docs return with it.Validation
bun run check faston the final tree (through the toolchain's heavy-run wrapper): passed, before each of the two pushes (the second push is the README paragraph only).bun test ./scripts/ci-runner-route.test.ts ./scripts/release-ci-reuse.test.ts ./scripts/pages-gate.test.ts ./scripts/light-runner-workflow.test.ts ./scripts/ci-browser-parallel.test.ts ./scripts/workflow-needs.test.ts ./scripts/ci-browser-timings.test.ts: 229 pass, 0 fail.linux_jobs=4(ci-runner-route, 5 tests); the hosted list made'[1,2,3]'(the fork test).30faaefbcvs this branch): identical, no duplicates.The three parts (214 scripts)
Part 1/3 (72)
scripts/machine-events-browser-regression.ts,scripts/terminal-dispose-browser-qa.ts,scripts/herdr-restart-regression.ts,scripts/terminal-switch-resize-regression.ts,scripts/terminal-early-keys-demo-regression.ts,scripts/terminal-viewport-regression.ts,scripts/terminal-touch-burst-regression.ts,scripts/mirror-scroll-demo-regression.ts,scripts/chat-no-rewind-demo-regression.ts,scripts/terminal-selection-cell-bg-regression.ts,scripts/terminal-late-faces-regression.ts,scripts/terminal-hangul-seam-regression.ts,scripts/terminal-sync-output-regression.ts,scripts/terminal-bundled-mono-regression.ts,scripts/setup-dialog-demo-regression.ts,scripts/interface-font-demo-regression.ts,scripts/files-panel-demo-regression.ts,scripts/old-safari-demo-regression.ts,scripts/security-summary-demo-regression.ts,scripts/security-summary-captures-light-demo-regression.ts,scripts/push-health-demo-regression.ts,scripts/relay-device-indexeddb-regression.ts,scripts/install-hint-demo-regression.ts,scripts/usage-account-management-regression.ts,scripts/unconfirmed-input-demo-regression.ts,scripts/shortcut-exact-modifiers-demo-regression.ts,scripts/portal-regression.ts,scripts/deep-link-demo-regression.ts,scripts/chat-history-browser-qa.ts,scripts/new-session-skills-browser-qa.ts,scripts/chat-virtual-browser-qa.ts,scripts/grok-chat-browser-qa.ts,scripts/devin-chat-browser-regression.ts,scripts/plan-chip-demo-regression.ts,scripts/tap-targets-demo-regression.ts,scripts/claude-image-browser-qa.ts,scripts/chat-visualization-browser-qa.ts,scripts/omp-codex-image-browser-qa.ts,scripts/file-viewer-regression.ts,scripts/markdown-outline-browser-qa.ts,scripts/virtual-source-browser-qa.ts,scripts/tab-agent-mark-demo-regression.ts,scripts/header-context-demo-regression.ts,scripts/chat-greeting-demo-regression.ts,scripts/chat-local-send-follow-demo-regression.ts,scripts/chat-selection-turn-end-demo-regression.ts,scripts/diff-line-notes-demo-regression.ts,scripts/chat-svg-figures-demo-regression.ts,scripts/chat-math-demo-regression.ts,scripts/terminal-paste-insert-variants-demo-regression.ts,scripts/composer-fit-demo-regression.ts,scripts/chat-outcome-note-browser-qa.ts,scripts/inbox-mode-panes-demo-regression.ts,scripts/sidebar-heads-demo-regression.ts,scripts/sidebar-machine-layout-demo-regression.ts,scripts/sidebar-machine-removal-demo-regression.ts,scripts/sidebar-selection-contrast-demo-regression.ts,scripts/sidebar-tokens-demo-regression.ts,scripts/sidebar-background-workspaces-demo-regression.ts,scripts/sidebar-scrollbar-grip-demo-regression.ts,scripts/pane-mute-demo-regression.ts,scripts/prompt-dock-demo-regression.ts,scripts/plugin-actions-demo-regression.ts,scripts/background-agent-states-phone-demo-regression.ts,scripts/background-agent-states-korean-demo-regression.ts,scripts/palette-machines-demo-regression.ts,scripts/narrow-pane-demo-regression.ts,scripts/phone-split-grid-demo-regression.ts,scripts/recent-folders-regression.ts,scripts/relay-account-pcs-regression.ts,scripts/herdr-profiles-browser-qa.ts,scripts/relay-media-browser-qa.tsPart 2/3 (71)
scripts/workspace-rows-regression.ts,scripts/lan-exposure-notice-regression.ts,scripts/terminal-switch-regression.ts,scripts/terminal-release-no-watch-demo-regression.ts,scripts/terminal-touch-burst-history-regression.ts,scripts/terminal-images-demo-regression.ts,scripts/terminal-ghostty-demo-regression.ts,scripts/terminal-cjk-punctuation-regression.ts,scripts/terminal-served-font-regression.ts,scripts/pane-paging-demo-regression.ts,scripts/external-link-tab-regression.ts,scripts/ideal-state-idle-regression.ts,scripts/agent-entry-points-demo-regression.ts,scripts/setup-row-demo-regression.ts,scripts/file-text-size-demo-regression.ts,scripts/docked-file-link-demo-regression.ts,scripts/files-documents-demo-regression.ts,scripts/security-summary-captures-dark-demo-regression.ts,scripts/relay-direct-demo-regression.ts,scripts/device-security-demo-regression.ts,scripts/cliproxy-settings-regression.ts,scripts/terminal-keyboard-demo-regression.ts,scripts/conversation-search-browser-qa.ts,scripts/chat-gjc-streaming-browser-qa.ts,scripts/copilot-chat-browser-qa.ts,scripts/omo-chat-browser-qa.ts,scripts/agy-chat-browser-qa.ts,scripts/gjc-status-browser-regression.ts,scripts/math-browser-qa.ts,scripts/chat-markdown-images-browser-qa.ts,scripts/grok-image-browser-qa.ts,scripts/file-viewer-page-scripts-browser-qa.ts,scripts/text-file-edit-regression.ts,scripts/web-panel-mobile-regression.ts,scripts/pwa-update-browser-qa.ts,scripts/revision-bound-update-demo-regression.ts,scripts/diff-find-demo-regression.ts,scripts/keyboard-viewport-regression.ts,scripts/droplet-demo-regression.ts,scripts/phone-back-demo-regression.ts,scripts/restored-draft-demo-regression.ts,scripts/chat-quote-selection-end-regression.ts,scripts/chat-tool-paths-demo-regression.ts,scripts/terminal-paste-insert-demo-regression.ts,scripts/composer-send-demo-regression.ts,scripts/composer-draft-demo-regression.ts,scripts/held-rows-demo-regression.ts,scripts/chat-working-line-demo-regression.ts,scripts/replay-clipboard-demo-regression.ts,scripts/command-outcome-demo-regression.ts,scripts/sidebar-activity-demo-regression.ts,scripts/inbox-mode-rail-demo-regression.ts,scripts/sidebar-filter-demo-regression.ts,scripts/drawer-modal-regression.ts,scripts/sidebar-split-access-demo-regression.ts,scripts/sidebar-peek-demo-regression.ts,scripts/pc-load-demo-regression.ts,scripts/sidebar-context-ring-demo-regression.ts,scripts/agent-helpers-fold-demo-regression.ts,scripts/sidebar-agent-tree-demo-regression.ts,scripts/agent-lock-demo-regression.ts,scripts/agent-state-groups-demo-regression.ts,scripts/pane-mute-captures-demo-regression.ts,scripts/workspace-touch-reorder-demo-regression.ts,scripts/opencode-prompt-regression.ts,scripts/pi-questionnaire-browser-regression.ts,scripts/background-agent-detail-demo-regression.ts,scripts/context-menu-inputs-demo-regression.ts,scripts/render-crash-demo-regression.ts,scripts/machine-dialog-regression.ts,scripts/relay-e2e-regression.tsPart 3/3 (71)
scripts/pending-pane-switch-regression.ts,scripts/sticky-modifiers-regression.ts,scripts/terminal-view-replay-demo-regression.ts,scripts/pane-lifetime-regression.ts,scripts/terminal-arrows-clicks-regression.ts,scripts/omo-question-wheel-regression.ts,scripts/core-history-scroll-demo-regression.ts,scripts/codex-drag-demo-regression.ts,scripts/mirror-fold-demo-regression.ts,scripts/application-paging-regression.ts,scripts/link-menu-demo-regression.ts,scripts/key-bar-customization-demo-regression.ts,scripts/key-bar-hold-repeat-regression.ts,scripts/settings-pages-demo-regression.ts,scripts/settings-palette-search-demo-regression.ts,scripts/settings-rows-demo-regression.ts,scripts/settings-segmented-demo-regression.ts,scripts/agents-sign-in-demo-regression.ts,scripts/theme-first-paint-demo-regression.ts,scripts/theme-file-demo-regression.ts,scripts/boot-loading-demo-regression.ts,scripts/alert-webhook-demo-regression.ts,scripts/relay-join-browser-qa.ts,scripts/relay-qa-teardown-regression.ts,scripts/pane-input-focus-demo-regression.ts,scripts/herdr-prefix-keys-demo-regression.ts,scripts/session-history-browser-qa.ts,scripts/conversation-search-demo-regression.ts,scripts/chat-scroll-padding-regression.ts,scripts/chat-selection-copy-regression.ts,scripts/chat-fallback-browser-qa.ts,scripts/omo-plan-browser-regression.ts,scripts/agent-skill-menu-demo-regression.ts,scripts/terminal-autoswitch-demo-regression.ts,scripts/pi-image-browser-qa.ts,scripts/copilot-image-browser-qa.ts,scripts/palette-local-page-demo-regression.ts,scripts/install-state-demo-regression.ts,scripts/file-preview-text-browser-qa.ts,scripts/repo-diff-browser-qa.ts,scripts/file-viewer-mobile-regression.ts,scripts/phone-glass-header-demo-regression.ts,scripts/phone-safe-area-demo-regression.ts,scripts/reconnect-header-demo-regression.ts,scripts/reply-comments-demo-regression.ts,scripts/chat-select-quote-demo-regression.ts,scripts/chat-list-markers-demo-regression.ts,scripts/chat-request-details-demo-regression.ts,scripts/todo-snapshots-demo-regression.ts,scripts/prompt-card-lifetime-browser-qa.ts,scripts/inbox-mode-demo-regression.ts,scripts/sheet-outside-tap-demo-regression.ts,scripts/sidebar-declutter-demo-regression.ts,scripts/sidebar-spacing-demo-regression.ts,scripts/sidebar-split-demo-regression.ts,scripts/hide-pc-demo-regression.ts,scripts/sidebar-branch-line-demo-regression.ts,scripts/agent-groups-demo-regression.ts,scripts/prompt-card-timing-demo-regression.ts,scripts/files-prompt-regression.ts,scripts/background-agent-states-desktop-demo-regression.ts,scripts/artifacts-browser-regression.ts,scripts/health-flap-demo-regression.ts,scripts/touch-long-press-demo-regression.ts,scripts/phone-worktree-sheet-regression.ts,scripts/preferences-sync-regression.ts,scripts/machine-conflict-regression.ts,scripts/relay-pairing-prompt-regression.ts,scripts/machine-own-ovis-regression.ts,scripts/relay-shell-browser-qa.ts,scripts/relay-dashboard-browser-qa.ts