Repository navigation
Description
Client or integration
Other
GitHub Actions shard balancing (scripts/ci/run-bun-test-batches.sh reading scripts/ci/test-durations.tsv), not an installed client.
Area
Platform (Windows / macOS / Linux)
Summary
The per-file duration table that every sharded CI lane uses to balance its shards has not been refreshed since it was introduced. It was generated once from Linux run 35816902207 (#5653, 2026-09-23) and holds 1,558 rows, while the suite now selects 2,236 files. The 678 files without a row each weigh the table median, 157 ms.
On macOS those unrecorded files average roughly 0.7 s each, so the balancer under-weights them about fourfold. In the last full dev dispatches the two macOS shards were both predicted at 683 s yet differed by up to about 190 s within the same run (for example 1082 s vs 873 s in run 38104436843, 885 s vs 1063 s in run 38050525359). The unrecorded files alone cost 184-289 s per macOS shard on 2026-10-11/12 versus 115-220 s on 2026-10-04/05, and that share grows with every new test file.
This contributed to #6978, which is being addressed separately by adding a third macOS shard. The table refresh is the cheap remaining lever, but it changes Linux 4-shard and Windows 9-shard membership as well, so it should be its own change with its own full dispatch.
Expected: the table is refreshed from a recent green run with the documented command, and refreshed again when the share of unrecorded files grows large, so predicted and actual shard times stay close.
Reproduction
head -4 scripts/ci/test-durations.tsvshows# Source: run 35816902207, Linux test 1/4-4/4;git log -- scripts/ci/test-durations.tsvshows one commit (0144cba, 2026-09-23).- Any macOS shard log from a recent
lane=alldispatch on dev printsPredicted shard time from recorded durations: 683s; a file without a record weighs 157msfor both shards. - Parsing those logs with
parseJobLogfromscripts/ci/test-durations.tsshows the actual per-shard time and the time spent in files missing from the table, as quoted above.
Version
dev a0191a1
Operating system
GitHub-hosted macos-latest, ubuntu-latest, windows-latest
Provider and model
Not applicable.
Logs or error output
Shard 1/2: 1113 files in 116 primary Bun processes (scope all, batch size <= 12, timeout 300s).
Predicted shard time from recorded durations: 682s; a file without a record weighs 157ms and a batch closes before 150000ms.
(run 38104436843, macos 1/2; its measured test time was 1082 s, macos 2/2 873 s)
Screenshots and supporting files
No response
Redacted configuration
No response
Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
Ingwannu commentedon Oct 12, 2026
Confirmed the current dev table still identifies
run 35816902207, Linux test 1/4-4/4as its source. The existingscripts/ci/test-durations.ts refresh --source ... <job-log>...already owns regeneration: use that path rather than hand-edited weights or a second balancer.Keep the refresh separate from #6983 as proposed. The reviewable artifact should include the exact source SHA/run and all four completed green Linux shard logs, retained/dropped/new row counts and before/after membership estimates for Linux 4, macOS 3 and Windows 9. Estimates must be labelled as estimates; the resulting exact-head full-platform run is the acceptance evidence, not this issue's timing replay. A median fallback for still-unmeasured files should remain explicit.
I have reviewed #6983's three-shard file-ownership/failure contracts independently and closed my duplicate headroom-only #6985. I have not regenerated this table, dispatched CI, run a local scan, or declared this issue fixed. The table freshness problem remains open after the shard-count fix.
ci(macos): split the macOS suite into three shards under the same 20-…
ci(test): refresh shard durations from a full dispatch and give Windo…
lidge-jun commentedon Oct 12, 2026
Fixed on
devby #6994 (commitc220eec4b8), landed through #7009 (merge8f10f238e3). Ships in 2.84.0.