Skip to content

perf(ci): shard the playwright tier three ways behind a same-name gate - #389

Merged
athvin merged 1 commit into
mainfrom
bm/ci-shard-playwright
Nov 2, 2026
Merged

athvin merged 1 commit into
mainfrom
bm/ci-shard-playwright

Conversation

@athvin

@athvin athvin commented Nov 2, 2026

Copy link
Copy Markdown
Owner

What

  • e2e becomes a 3-leg matrix running pnpm test:e2e --shard=${{ matrix.shard }}/3 — Playwright splits at test granularity across all three device projects (fullyParallel: true), ~193 of 579 tests per leg, auto-balanced as tests are added.
  • e2e-gate (non-matrix) carries the old job's exact name:, so the required context "playwright functional tier" keeps reporting with zero branch-protection edits (matrix per-leg names can never be required — the infra.yml plan-gate lesson).
  • Failure report artifacts suffixed playwright-report-shard-N (upload-artifact v4 hard-fails on duplicate names when two shards fail in one run).

Why

Run 41461727537: 579 tests on 1 worker, 15.9m — Playwright's CI default, never overridden. Sharding keeps one worker per runner, so it changes nothing about test semantics; raising workers instead would be cheaper but both webServers (mock erserver, next start + in-memory PGlite) are shared mutable state across workers and the suite has only ever run at workers=1 in CI. A nightly workers=2 validation experiment is a planned follow-up; the flip stays out of scope until it holds.

Expected: tier wall ~17m → ~7–9m for ~+8 runner-minutes. retries: 2 applies per-leg, unchanged.

Verification

  • This PR's own run exercises the shards; the gate reports under the old context name.
  • Shard test counts must sum to 579 (each leg prints "Running N tests").

🤖 Generated with Claude Code

579 tests ran on ONE worker — Playwright's CI default, and nothing overrode
it — for 15.9m of strictly serial execution (run 41461727537). Three
`--shard=N/3` legs keep one worker per runner (both webServers are shared
mutable state across workers, so raising workers is unvalidated; sharding
changes no test semantics) and cut the tier's wall to ~6-8m. `e2e-gate`
carries the old job's exact name, so the required context "playwright
functional tier" kept reporting and branch protection never changed — the
same plan-gate pattern rust.yml's e2e split uses.

Failure artifacts are suffixed per shard (upload-artifact v4 hard-fails on
duplicate names). required-checks.md regenerated.

Co-Authored-By: Claude Fable 5 <[email protected]>
@athvin
athvin merged commit a382496 into main Nov 2, 2026
27 checks passed
athvin added a commit that referenced this pull request Nov 2, 2026
…ngs (#395)

The after-numbers for #388/#389/#391/#393/#394: PR wall ~32-35m -> ~13.5m,
per-leg breakdowns, the completeness checks that were run rather than
assumed, the remaining floors (er-server's pg suite at 423.8s, hash
lumpiness, playwright shard 2) and the deliberate minutes cost. Plus two
findings: a lock-touching PR runs cold until merge by design (read-only
sccache role), and the disk-reclaim step stays on every leg by measurement
(15G free at boot, ~7G/~2G margins without it).

Co-authored-by: bmoore813 <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
@athvin
athvin deleted the bm/ci-shard-playwright branch November 2, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants