Repository navigation
ci(browser): split journeys across nine shards per engine - #989
Merged
Merged
Conversation
4 tasks
jameskraus
changed the base branch from
main
to
jameskraus/inbox-edit-direct-route
October 13, 2026 20:05
2 of 3 tasks
jameskraus
added this pull request to stack #1028
October 14, 2026 00:22
jameskraus
marked this pull request as ready for review
October 14, 2026 00:23
loganj
force-pushed
the
jameskraus/webkit-shard-headroom
branch
from
October 14, 2026 14:14
a94b909 to
643078b
Compare
loganj
approved these changes
Oct 14, 2026
Playwright sizes file-level shards by test count, but journey files differ widely in cost per test. With six shards, WebKit 4/6 carried about 24 min of summed test time on two workers and took 12.3-14.8 min on main. On the slower runner class it hit the 15 min timeout (main runs 38317924175 and 38355319857; PR run 38425952803 attempt 1, whose same-commit retry passed in 11.9 min). Nine shards per engine bring the predicted slowest WebKit shard to about 9.9 min on a median runner and 11.3 min on the slowest observed one, without changing tests, retries, workers or the timeout. Chromium shares the matrix and its predicted slowest shard drops from 12.4 to 9.2 min. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: James Kraus <jamespkraus@gmail.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
loganj
force-pushed
the
jameskraus/webkit-shard-headroom
branch
from
October 14, 2026 14:32
643078b to
cafadd1
Compare
johnmatthewtennant
added a commit
that referenced
this pull request
Oct 14, 2026
* commit '506ac5d4d': Fix JPEG uploads and attachment control overlap (#1068) feat(channels): read, write and look up channel labels (#964) refactor(agents): separate the agent runner and its reads from the desktop app (#961) fix(media): show desktop animated avatars and match dev broker media rules to native (#990) ci(browser): split journeys across nine shards per engine (#989) test(inbox): open the edit journey's conversation by name (#997) test(voice-notes): keep each attachment's own type in the upload fixture (#999) Stabilize main: consolidate WebKit flake and bottom-follow fixes (#1039) Push main-pane threads in and hold threads behind a loading mark (#1018) [buzz-app] Show full sent images and GIFs (#886) feat(agents): say the agents this copy runs are online (#862) [buzz-app] Keep the sidebar in place when switching to Personal space (#945) fix(builderlab): link the Buzz key before attesting remote agents (#978) feat(agents): show agents typing to everyone while they work on a mention (#998) Signed-off-by: John Tennant <jtennant@block.xyz>
johnmatthewtennant
pushed a commit
that referenced
this pull request
Oct 14, 2026
* origin/main: fix(linux): use slight GTK hinting for clearer font spacing (#1047) Make Me conversations feel like project chats (#1005) fix(codex): deliver custom instructions without codex truncation (#1059) test(browser): fix the notification-reveal and nested-replies WebKit flakes (#1087) fix(messages): keep following after a notification reveals the latest row (#1085) Add native nsec backup HTTP client (#995) feat(buzz-mcp): add channel and member management tools (#1055) fix: show agent avatars in channel template editor (#1013) Fix JPEG uploads and attachment control overlap (#1068) feat(channels): read, write and look up channel labels (#964) refactor(agents): separate the agent runner and its reads from the desktop app (#961) fix(media): show desktop animated avatars and match dev broker media rules to native (#990) ci(browser): split journeys across nine shards per engine (#989) test(inbox): open the edit journey's conversation by name (#997) test(voice-notes): keep each attachment's own type in the upload fixture (#999) Stabilize main: consolidate WebKit flake and bottom-follow fixes (#1039) Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>
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.
Summary
Playwright splits browser-journey shards by test count, not cost, so WebKit's heaviest shard runs close to the 15-minute job timeout.
mainruns 8 shards per engine (#801). Since then, its slowest WebKit job takes 9.9–13.5 min per run, withwebkit 5/8at 12–13.5 min.This PR uses 9 shards. Its slowest WebKit job takes 9.5–11.9 min per run. Tests, assertions, retries (0), workers (2) and the timeout are unchanged. The existing coverage guard still requires the 18 Linux selections plus macOS recording to cover every functional test exactly once.
Stack: #999 → #997 → this PR. With nine shards,
inbox-editruns first on a cold worker, which exposes the preview-text selector that #997 replaces.Hosted timings at 8 and 9 shards
Slowest WebKit job per CI run, including ~66 s of setup:
main, 8 shardsOn the slowest runners measured (1.32–1.44×), the two layouts diverge:
webkit 4/8hits the 15-minute timeout with 81 of 87 tests done (test(voice-notes): keep each attachment's own type in the upload fixture #999, run 38492346858, 1.38× runner).Shard cost on
mainat 6 shardsEnvironment: GitHub-hosted
ubuntu-24.04(public repo, 4 vCPU),mcr.microsoft.com/playwright:v1.63.0-noblecontainer, 2 workers:Sources: the
browser-journeys-*artifacts (ci-report.json,ci-timing.json) of 9mainruns (38350111813 … 38445985225), plus job metadata and logs of 40mainruns.WebKit per shard across the 9 runs. Wall time is the elapsed
ci-test-reporttime; job setup adds ~66 s:layout110 s,history-loading75 s,channel-lifecycle73 snavigation-sidebar215 s,navigation-scroll-intent141 s,sidebar-unread98 snested-replies286 s,message-navigation271 s,buzz-links115 snavigation-groups276 s,agent-activity153 s,unread127 schannel-members-focus95 s,typeahead84 s,profiles58 sworkflows.journey.mjs141 s,messages113 s,layout68 sThe slowest WebKit tests by median duration:
nested-replies"crowded capped branches expand once with readable actions" at 1492/1280/1024/700 px: 61/50/49/44 s, 2.0–2.4× Chromium.unread"a viewport receipt survives other-channel pressure and app reload": 52 s.image-scrollpartial gestures: 46 s.navigation-groupsrow-menu/Star/Create cases: 33–39 s, the same in Chromium.Timed-out
webkit 4/6jobs. These have no JSON report, so the numbers come from the job logs' list reporter. All three run at 1.15–1.16× the per-test medians:Runner variance. For identical tests, a WebKit job's summed time relative to the cross-run median clusters at 0.69–0.80× (20 jobs) and 0.94–1.16× (33 jobs), with 5 jobs at 0.84–0.89× (n = 58). Chromium has the same pattern at a smaller scale:
chromium 4/6has a median of 11.9 min and runs ≥12 min in 14 of 40.Choosing the shard count
The numbers below come from a model of Playwright 1.63's shard selection:
Validation:
--list --shard=k/Ncounts exactly.Inputs:
"Growth p95" adds 1–60 random tests to existing files over 300 trials:
mainCount-based shards stay lumpy: 9 is the smallest count that leaves margin, and 10–12 are no better.
Not chosen:
reporter.preprocessandtestRun.skipSharding(). It needs a committed per-file cost table that drifts over time. The fixed in-shard dispatch order still leaves a 10.5–10.9 min slowest WebKit shard at 6 shards.fullyParallel. Six journey files sharebeforeAll/afterAllstate and five keep module-level state; these would be duplicated per worker and lose in-file ordering. The partition also stays count-based.nested-repliescrowded-branch matrix andnavigation-groupsare deliberate real-pointer and persistence journeys, so trimming them drops coverage.Expected timings
Modeled on the 696-test WebKit corpus above. All 18 selections are non-empty.
Cost: 2 more runners per CI run than 8 shards, about +2 runner-minutes of setup.
Hosted timings with 9 shards
Run 38451842483, with the same environment and
--shard=N/9. The runner factor is summed time relative to the cross-run median for the same tests.history-loading68 s,channel-lifecycle67 slayout118 s,navigation-scroll-intent92 snavigation-sidebar209 s,sidebar-unread93 smessage-navigation221 s,buzz-links103 snested-replies355 s,startup128 snavigation-groups230 s,agent-activity136 stypeahead65 s,profiles56 schannel-members-focus112 s,messages104 sworkflows.journey.mjs153 s,layout91 sinbox-editis fixed by test(inbox): open the edit journey's conversation by name #997.me-workspace"Me sidebar shares working activity…" is a clock-pause flake, fixed onmainby test: fix six cross-branch CI flakes #1002.Local measurement
Environment: macOS on Apple M4 Max (16 cores), native Playwright WebKit 26.6 (v2359), fixture prebuilt with
cargo build --locked -p buzzodz-plugins --example fixture-bridge, shared machine (load average 25–35). Command, 2 workers:navigation-groups85 s,unread79 s,startup72 spresence58 s,navigation-sidebar54 s,navigation-scroll-intent37 sLocal macOS WebKit runs these shards 1.8–2.7× faster than hosted Linux WebKit, with a different per-file profile. These numbers show the direction of the change, not CI headroom.
Tests
tests/integration/browser-ci.test.mjsexpands the workflow's literalengine×shardmatrix through the real command. With this change, 18 selections (Chromium 65–87 tests each, WebKit 60–94) plus 4 macOS recording tests cover full local functional discovery exactly once.[1, …, 8]and/9, and passes with[1, …, 9].Readiness
Known gaps
mainpasses ~12 min../bin/node --versionsetup stall.