Context
The components job is now the slowest check on every pull request. On #18890's run the test step took 7.0m for 367 tests, and the whole job 7m39s. By comparison unit takes about 2.4m and each e2e-engine shard about 3m (#18896). @tobiu asked for this ticket: split the tier or run it in parallel.
The Problem
On dev pushes, the step time has followed the test count. The per-test cost has stayed at 1.1 to 1.3 s throughout:
| dev push |
tests |
test step |
| 08-29 |
95 |
1.3m |
| 09-01 |
173 |
3.0m |
| 09-02 |
229 |
4.5m |
| 09-10 |
269 |
5.0m |
| 09-15 |
281 |
5.5m |
| 09-16 |
325 |
6.9m |
| 09-17 |
330 |
7.1m |
| 09-18 (#18890) |
367 |
7.0m |
In #18890's run, the per-test durations add up to 410 s of the 412 s step, so there is no hidden overhead. Each test boots its own harness page, which costs at least 0.36 s (median 0.88 s). The 33 tests that take 2 s or more account for 123 s of the total. Most of the time comes from the number of tests, so trimming fixed waits saves only seconds. The tier also grows with every new component witness.
The Architectural Reality
test/playwright/playwright.config.component.mjs:17-18 sets fullyParallel: false and workers: 1, both marked // CRITICAL. Both have been there since the config's first commit (1cee840d06, 2025-10-11), and no reason is recorded.
.github/workflows/test.yml has one test job over a matrix of {suite: unit} and {suite: components}.
- The job's display name is
${{ matrix.suite }}, and it runs npm run test-${{ matrix.suite }}.
- Every step is gated on
matrix.run.
- The failure artifact is named
test-results-${{ matrix.suite }}-${{ github.run_id }}.
dev has no required status checks, so renaming the check blocks nothing. #18896 relied on the same fact.
test/playwright/unit/buildScripts/util/WorkflowScopeClassifier.spec.mjs reads test.yml's changes job and its matrix.run gating.
--shard already splits this suite evenly. The table covers dev at 370 tests in 70 files; the times are estimates from #18890's per-file durations:
| split |
tests per shard |
test time per shard |
| 2 shards |
186 · 184 |
~210 s · ~200 s |
| 3 shards |
126 · 134 · 110 |
~122 s · ~153 s · ~134 s |
Each runner also spends about 40 s on setup outside the test step. So two shards finish in about 4.2m and three in about 3.3m.
The Fix
Recommended: shard the components suite across runners, each still running one worker. This is the shape #18896 gave e2e.
- Add matrix entries
{suite: components, shard: '1/N'} and so on, with N = 2 or 3 chosen from the table above.
- The run step passes
--shard=${{ matrix.shard }} for components only.
- The job name and the artifact name carry the shard.
workers: 1 stays, and its // CRITICAL comment gets its reason. If none can be found, the PR says so.
Alternative: parallel workers on one runner (workers: 2 in CI). This uses fewer runners, but it changes every test's timing. The component reds that recurred this past week were all timing-sensitive arms: the button menu race, the menu hover-rest arms, and a native drag into an iframe. This path therefore needs a flake measurement before anyone takes it, for example several CI runs at workers: 2 with no new failure. It is not the default.
Acceptance Criteria
Out of Scope
- Trimming individual slow arms, such as WorkstationBoot's two ~11 s reload arms.
- Parallel workers within one runner (the alternative above).
- The
DockRailRevealIframe.spec.mjs:221 control-arm flake, which is filed separately.
Avoided Traps
- ⛔ Treating a higher ceiling as the fix. The ceiling is the time every PR waits.
- ⛔ Sharding by hand-picked spec folders. A hand-made split drifts as new specs land, while
--shard stays balanced on its own.
- ⛔ Changing the job key or the
matrix.run gate that the classifier spec reads.
Related
- #18895 / #18896: the same change for the e2e tier.
- #15783: the unit tier's move to
workers: 4, the precedent for parallel workers in a browserless tier.
- Live latest-open sweep: checked the 20 latest open issues at 2026-09-18T15:58Z; nothing equivalent.
- A2A claim sweep (30 messages): no claim on this scope.
- Memory sweep: a 09-02 analysis traced a 13-minute components job to an uncached Chromium download, not to the test count. Nothing has been decided against sharding.
Origin Session ID: 0a997d38-ccdb-4352-ac21-566606a6ab2d
Retrieval Hint: "component tier serial workers shard CI wall time"
Context
The
componentsjob is now the slowest check on every pull request. On #18890's run the test step took 7.0m for 367 tests, and the whole job 7m39s. By comparisonunittakes about 2.4m and eache2e-engineshard about 3m (#18896). @tobiu asked for this ticket: split the tier or run it in parallel.The Problem
On
devpushes, the step time has followed the test count. The per-test cost has stayed at 1.1 to 1.3 s throughout:In #18890's run, the per-test durations add up to 410 s of the 412 s step, so there is no hidden overhead. Each test boots its own harness page, which costs at least 0.36 s (median 0.88 s). The 33 tests that take 2 s or more account for 123 s of the total. Most of the time comes from the number of tests, so trimming fixed waits saves only seconds. The tier also grows with every new component witness.
The Architectural Reality
test/playwright/playwright.config.component.mjs:17-18setsfullyParallel: falseandworkers: 1, both marked// CRITICAL. Both have been there since the config's first commit (1cee840d06, 2025-10-11), and no reason is recorded..github/workflows/test.ymlhas onetestjob over a matrix of{suite: unit}and{suite: components}.${{ matrix.suite }}, and it runsnpm run test-${{ matrix.suite }}.matrix.run.test-results-${{ matrix.suite }}-${{ github.run_id }}.devhas no required status checks, so renaming the check blocks nothing. #18896 relied on the same fact.test/playwright/unit/buildScripts/util/WorkflowScopeClassifier.spec.mjsreadstest.yml'schangesjob and itsmatrix.rungating.--shardalready splits this suite evenly. The table coversdevat 370 tests in 70 files; the times are estimates from #18890's per-file durations:Each runner also spends about 40 s on setup outside the test step. So two shards finish in about 4.2m and three in about 3.3m.
The Fix
Recommended: shard the
componentssuite across runners, each still running one worker. This is the shape #18896 gave e2e.{suite: components, shard: '1/N'}and so on, with N = 2 or 3 chosen from the table above.--shard=${{ matrix.shard }}for components only.workers: 1stays, and its// CRITICALcomment gets its reason. If none can be found, the PR says so.Alternative: parallel workers on one runner (
workers: 2in CI). This uses fewer runners, but it changes every test's timing. The component reds that recurred this past week were all timing-sensitive arms: the button menu race, the menu hover-rest arms, and a native drag into an iframe. This path therefore needs a flake measurement before anyone takes it, for example several CI runs atworkers: 2with no new failure. It is not the default.Acceptance Criteria
--workers=1, and the shards' test counts add up to the unsharded--listtotal.WorkflowScopeClassifier.spec.mjsstays green, and a push the classifier skips still skips every components shard.// CRITICALcomment onworkers: 1states its reason, or the PR records that none was found.Out of Scope
DockRailRevealIframe.spec.mjs:221control-arm flake, which is filed separately.Avoided Traps
--shardstays balanced on its own.matrix.rungate that the classifier spec reads.Related
workers: 4, the precedent for parallel workers in a browserless tier.Origin Session ID: 0a997d38-ccdb-4352-ac21-566606a6ab2d Retrieval Hint: "component tier serial workers shard CI wall time"