Skip to content

[Bug][CI]: shard duration table is three weeks stale and under-weights 678 unrecorded test files #6982

Closed

Description

@lidge-jun

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

  1. head -4 scripts/ci/test-durations.tsv shows # Source: run 35816902207, Linux test 1/4-4/4; git log -- scripts/ci/test-durations.tsv shows one commit (0144cba, 2026-09-23).
  2. Any macOS shard log from a recent lane=all dispatch on dev prints Predicted shard time from recorded durations: 683s; a file without a record weighs 157ms for both shards.
  3. Parsing those logs with parseJobLog from scripts/ci/test-durations.ts shows 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

  1. added
    bug
    on Oct 12, 2026
  2. added
    platform
    on Oct 12, 2026
  3. Ingwannu commented on Oct 12, 2026

    @Ingwannu
    Owner

    Confirmed the current dev table still identifies run 35816902207, Linux test 1/4-4/4 as its source. The existing scripts/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.

  4. lidge-jun commented on Oct 12, 2026

    @lidge-jun
    OwnerAuthor

    Fixed on dev by #6994 (commit c220eec4b8), landed through #7009 (merge 8f10f238e3). Ships in 2.84.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplatform

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions