Skip to content

ci(browser): run Browser regression (other scripts) in three parts on the self-hosted PC - #3988

Merged
devswha merged 2 commits into
mainfrom
ci/browser-other-scripts-parts
Nov 16, 2026
Merged

devswha merged 2 commits into
mainfrom
ci/browser-other-scripts-parts

Conversation

@devswha

@devswha devswha commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

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) to 3/3, split by scripts/ci-browser-parallel.ts's BROWSER_SHARD exactly 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 to ci.yml's routed jobs.
  • scripts/release-ci-reuse.ts: CI_SHARD_COUNTS is [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.md and scripts/self-hosted-runner/README.md say three parts and six jobs.

Not changed: branch protection, repository settings and variables, runners, on:, concurrency and cancel-in-progress, timeouts (job 50 min, script 600 s), the retry rule (BROWSER_RETRY unset: 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, shardScripts of scripts/ci-browser-parallel.ts, with browser-other's BROWSER_SCRIPTS/BROWSER_EXCLUDE read from that tree's ci.yml): main at 30faaefbc with today's self-hosted BROWSER_SHARD=1/1, against this branch with 1/3, 2/3, 3/3:

scripts
main, today's one job 214
part 1/3 72
part 2/3 71
part 3/3 71
union of the parts 214 distinct, 0 in two parts
diff main vs union identical

To reproduce it, save this as listing.ts and run it against a checkout of main and one of this branch, then diff the sorted second columns:

// bun listing.ts <checkout> <shard>...   prints "<shard>\t<script>"
const [root, ...shards] = process.argv.slice(2);
const lane = await import(`${root}/scripts/ci-browser-parallel.ts`);
const ci = Bun.YAML.parse(await Bun.file(`${root}/.github/workflows/ci.yml`).text()) as any;
const step = ci.jobs["browser-other"].steps.find((s: any) => s.name === "Browser regression (parallel)");
const selected: string[] = lane.selectBrowserScripts(lane.serialBrowserScripts(await Bun.file(`${root}/scripts/ci-browser.sh`).text()), step.env.BROWSER_SCRIPTS, step.env.BROWSER_EXCLUDE);
const timings = JSON.parse(await Bun.file(`${root}/scripts/ci-browser-timings.json`).text());
for (const shard of shards) for (const script of lane.shardScripts(selected, timings, shard)) console.log(`${shard}\t${script}`);
bun listing.ts <main checkout> 1/1 | cut -f2 | sort > main.txt
bun listing.ts <branch checkout> 1/3 2/3 3/3 | cut -f2 | sort > parts.txt
uniq -d parts.txt     # nothing
diff main.txt parts.txt   # nothing

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 from ci.yml (3, 4 and 5 parts), deals browser-other's scripts with the real ci-browser-timings.json, and fails when a script is in no part or in two. Checked to fail both ways: with shardScripts changed 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 browser and Native Windows install are untouched jobs with untouched names. Integration and browser still needs: [changes, integration, browser-main, browser-other] and reads needs.browser-other.result, which for a matrix job is success only when every part succeeded, and failure / cancelled / skipped when 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.ts and scripts/release-ci-reuse.test.ts pass on the new ci.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 rerun of 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.

runs run (median, range) Browser (other scripts), first part start to last part end browser job-minutes self-hosted runner-min / run hosted runner-min / run
before: main, push 10 21.5 (20.4-23.5) 20.7 (19.8-22.9) 20.7 33.7 (31.1-35.4) 5.0
before: same-repository PRs 19 21.1 (19.0-24.1) 20.0 (18.1-22.1) 20.0 36.1 (31.2-40.8) 4.8
after: this PR, 4 attempts 4 9.4 (8.6-12.9) 8.6 (7.9-12.0) 23.0 (21.5-29.4) 35.3 (34.2-43.7) 4.9 (4.8-5.2)
attempt run parts 1/3, 2/3, 3/3 (min) where slot wait self-hosted min result
1 12.9 11.3, 11.2, 6.9 all three on second host 1/3 278 s, 2/3 196 s 43.7 green
2 8.9 7.0, 8.1, 6.9 1/3 P620, 2/3 and 3/3 second host none 34.7 green
3 9.8* 9.1, 8.0, 7.0 1/3 second host, 2/3 and 3/3 P620 1/3 146 s 35.8 browser and required checks green; *Native macOS session identity was never given a hosted macOS runner ("not acquired by Runner of type hosted", GitHub's macOS arm64 capacity) and was cancelled after 15 min, so the run is red and its 15.5 min end is that job's; 9.8 is without it
4 8.6 6.8, 7.9, 6.7 1/3 and 3/3 second host, 2/3 P620 none 34.2 green

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.

  • On the host with three check slots, a run's parts waited 146 to 278 s for a slot in two of four attempts. That host's cap of three browser-heavy jobs at once is the owner's own setting and is not changed here.
  • Routing: with 6 Linux jobs per run and capacity 10, 7 of the last day's 47 same-repository runs would have gone to hosted runners (a lower bound); capacity 12 would keep today's behaviour. CI_SELF_HOSTED_CAPACITY is a repository variable, not changed by this pull request; the CI supervisor decides it after the merge, with a measurement.
  • Main's run: reasoned at 11 to 12 minutes on its 4 runners; to be watched on the first run after the merge.

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 holds sidebar-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-stream of every herdr-ci-* runner container and the host's MemAvailable, 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):

part (runner) peak GiB running at the peak parts' sum at the worst moment lowest MemAvailable on that host in the window
before one job (P620-main-2) 9.2 omo-chat, terminal-bundled-mono, chat-scroll-padding, file-preview-text, markdown-outline, conversation-search 9.2 P620 72.6 GiB (all runner containers 19.0 then, 23.9 at most)
attempt 2 1/3 (P620-3) 10.2 install-hint, terminal-sync-output, virtual-source, terminal-bundled-mono, markdown-outline, terminal-selection-cell-bg 19.0 P620 79.9 (containers 21.3 at most)
2/3 (second host appb-3) 5.6 sidebar-filter-demo and five more second host 78.9 (containers 15.4 at most)
3/3 (second host appb-2) 7.3 relay-shell, relay-dashboard, todo-snapshots and three more
attempt 3 1/3 (second host -2) 8.1 same six as attempt 2's 1/3 15.2 second host 77.8 (containers 15.8 at most)
2/3 (P620-4) 5.6 sidebar-filter-demo and five more P620 83.4 (containers 22.8 at most, main's one job running beside it)
3/3 (P620-3) 9.2 relay-shell, relay-dashboard and four more
attempt 4 1/3 (second host appb-3) 8.3 terminal-sync-output, virtual-source, terminal-bundled-mono, markdown-outline, terminal-selection-cell-bg, tap-targets 15.7 second host 81.2 (containers 12.2 at most)
2/3 (P620-6) 6.3 sidebar-filter-demo and five more P620 87.1 (containers 14.4 at most)
3/3 (second host -1) 7.6 relay-shell, relay-dashboard, todo-snapshots and three more

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's CHECK_HOST_MAX_RUNS like Integration tests and ui-regression: a run now holds five slot lanes (three before). The P620's host.env sets CHECK_HOST_MAX_RUNS=6 and CHECK_HOST_BROWSER_WORKERS=6 (so six workers per part there, as ci.yml asks), the second host's only CHECK_HOST_MAX_RUNS=3.

4. Fork pull requests go where they go today

scripts/ci-runner-route.sh still prints linux="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 in scripts/ci-runner-route.test.ts run the real route script and feed its linux= output through ci.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, and pull_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' code output gates the matrix job exactly as it gated the one job (the if: is the job's, not a part's); the logs artifact is uploaded by every part as browser-other-<part>-<run>-<attempt> (the name the hosted shards already use, which scripts/ci-browser-timings.ts already reads), with the screenshots on failure or cancel as before; each part's name says k/3.

What it costs, and what to watch

  • Runner-minutes: each part repeats the set-up (checkout, install, 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 slots: a run now holds five herdr-backed lanes (Integration, ui-regression, three parts) instead of three, against CHECK_MAX_RUNS 6 per PC (and CHECK_HOST_MAX_RUNS 3 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.
  • Room on the pull requests' pool (linux_jobs=6): with CI_SELF_HOSTED_CAPACITY at 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) needs CI_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.
  • Main's own runs (reasoned, not measured here): main's pool (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.
  • Release reuse (CI_SHARD_COUNTS 3, 4, 5): release.yml and release-validate.yml check out github.sha and run that commit's own scripts/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.json balances 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 fast on 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.
  • The new tests fail on purpose-made mutations (each reverted): a script in two parts, a script in no part (pages-gate); linux_jobs=4 (ci-runner-route, 5 tests); the hosted list made '[1,2,3]' (the fork test).
  • The listing in condition 1 (main 30faaefbc vs this branch): identical, no duplicates.
  • Before/after: GitHub's own runs, above. Not run: the browser lanes locally (they are what CI measures here), and main's push run with the parts (it happens after a merge).
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.ts

Part 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.ts

Part 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

… 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]>
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Browser regression checks now run in three parts on self-hosted runners, four parts on hosted runners, or five parts on VM runners.
    • Self-hosted runner capacity requirements have been updated to account for the revised workload.
  • Documentation
    • Development and runner guidance now reflects the updated browser-check splitting and capacity requirements.

The browser-other workflow now uses three shards on self-hosted runners, four on hosted runners, and five on VM runners. Runner capacity calculations, shard tests, and release-CI reuse checks are updated to reflect these matrix sizes.

Changes: Browser Regression Sharding

Layer / File(s) Summary
Browser shard matrix and distribution
.github/workflows/ci.yml, scripts/pages-gate.test.ts, scripts/ci-runner-route.test.ts, docs/development.md
The workflow selects three, four, or five browser-other shards based on runner labels. Tests check matrix sizes and that selected scripts appear in exactly one nonempty shard. The development guide describes the shard counts and log uploads.
Self-hosted runner capacity
scripts/ci-runner-route.sh, scripts/ci-runner-route.test.ts, docs/development.md, scripts/self-hosted-runner/README.md
The self-hosted Linux job count changes from four to six. Capacity tests and runner documentation use the updated count.
Release-CI shard reuse
scripts/release-ci-reuse.ts, scripts/release-ci-reuse.test.ts, scripts/release-validate-workflow.test.ts
The release reuse shard-count contract changes to three, four, or five. Fixtures and tests use the updated matrix sizes and check complete shard sets.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

  • devswha/ovis#2683: Introduced the browser regression sharding contract used by this change.
  • devswha/ovis#2723: Established the runner capacity calculation that this change updates.
  • devswha/ovis#3802: Updated release-CI reuse for a five-shard matrix; this change modifies the same shard-count contract.

Suggested labels: github_actions

Merge Risk: Minimal · up to 267d5

This change splits the self-hosted browser regression job into three parts and updates routing capacity, release reuse and docs to match. No concrete defects were identified, and the change is low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Browser regression (other scripts) moves from one job to three parts on the self-hosted PC. The changeset matches this: the ci.yml matrix expression changes from [1] t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The PR description is thorough and covers the template's Change and Validation sections. The Change section explains the problem (the self-hosted browser job taking about 20 minutes), the resulting be…
Full details: Title check

Explanation

The title names the main change: Browser regression (other scripts) moves from one job to three parts on the self-hosted PC. The changeset matches this: the ci.yml matrix expression changes from [1] to [1,2,3], with routing, release reuse, tests, and docs updated to match. The title is specific and concise, and it uses the ci(browser) prefix.

Full details: Description check

Explanation

The PR description is thorough and covers the template's Change and Validation sections. The Change section explains the problem (the self-hosted browser job taking about 20 minutes), the resulting behavior (three parts of six workers each), and the knock-on edits to routing, release reuse, and docs. It also gives measurements and a rollback path. The Validation section lists the commands run, their results, and the checks that were not run locally. The template's linked-issue request is not addressed: the description does not link an issue where a maintainer agreed to the change. That is a minor gap, since the rest of the template is filled in.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 30faaef and 267d543.

Files selected for processing: 9

  • .github/workflows/ci.yml
  • docs/development.md
  • scripts/ci-runner-route.sh
  • scripts/ci-runner-route.test.ts
  • scripts/pages-gate.test.ts
  • scripts/release-ci-reuse.test.ts
  • scripts/release-ci-reuse.ts
  • scripts/release-validate-workflow.test.ts
  • scripts/self-hosted-runner/README.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

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]>
@devswha
devswha merged commit e43bc7d into main Nov 16, 2026
26 of 28 checks passed
@devswha
devswha deleted the ci/browser-other-scripts-parts branch November 16, 2026 18:36
@devswha

devswha commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head a988512d2bdd as e43bc7df84dd on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
claude CLEAR
codex CLEAR

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).
CodeRabbit skipped this pull request, so the two reviewers' findings and what became of each are written here.
Checked by runs at 267d543 and again at this head: the old single job ran 214 scripts; the three parts run 72 + 71 + 71 = 214, none twice and none dropped, and the new test fails when a script is dropped or put in two parts. Integration and browser fails unless the matrix result is exactly success, so a part that is red, skipped or cancelled cannot leave it green; fail-fast: false is kept. Required check names, secrets, permissions, triggers, fork handling, time limits and the retry rule are unchanged. No check is removed or weakened.
The release guard: a Release checks out its own commit and runs that commit's scripts/release-ci-reuse.ts, so a release of a commit from before this merge runs the old guard and accepts that commit's one-job run, and a later one runs the new guard against a three-part run. The old and the new script were run side by side on the same job lists: neither accepts a run with a part failed, skipped, cancelled or missing, and each refuses the other's job list, which means a full validation and never a wrong acceptance.
Sent back once, for numbers: the first head ran 18 browser workers at once where 6 ran, on a machine that also does other work, and the README's memory figures were from an older host. Measured: one part peaks at 5.6 to 10.2 GiB, a run's three parts together 15.2 to 19.0 GiB, with 78 to 80 GiB still available on the hosts. The README paragraph was rewritten from those numbers in the last push, which changed nothing else.
Noted, not blocking: a second pull request starting at the same moment can now be routed to GitHub's runners where two used to fit (a repository variable, left as it is here); parts can wait for a slot on the second host; README lines 361 to 364 still describe the earlier slot and worker settings, and the new paragraph gives 79.9 GiB as the lowest available memory where the body's table also shows 72.6 GiB during main's own run. The conclusion holds with the lower number.
Follow-up for the lane: those README lines; the routing capacity, decided by measurement after the merge; and scripts/self-hosted-runner/vm-runner.sh stop, which signals a process id read from a file without checking what it is (on main before this change).

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