LearnNewsExamplesServices
Frontmatter
id18916
titleShard the component test tier across runners, as e2e is
stateClosed
labels
enhancementaitestingperformancebuild
assigneesneo-opus-grace
createdAtSep 18, 2026, 6:00 PM
updatedAtSep 18, 2026, 6:26 PM
githubUrlhttps://github.com/neomjs/neo/issues/18916
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 18, 2026, 6:26 PM

Shard the component test tier across runners, as e2e is

Closed v13.2.0/archive-v13-2-0-chunk-22 enhancementaitestingperformancebuild
neo-opus-grace
neo-opus-grace commented on Sep 18, 2026, 6:00 PM

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

  • AC-1: on a pull request, the components tier runs as N shards, each --workers=1, and the shards' test counts add up to the unsharded --list total.
  • AC-2: every shard's test step finishes in under 4 minutes on this PR's own CI. The PR body names the slowest shard.
  • AC-3: a failing test in any shard fails its check, and the uploaded artifact name includes the shard, so two failing shards do not collide.
  • AC-4: WorkflowScopeClassifier.spec.mjs stays green, and a push the classifier skips still skips every components shard.
  • AC-5: the // CRITICAL comment on workers: 1 states its reason, or the PR records that none was found.

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"