Skip to content

ci: shard examples/chat e2e into 4 parallel matrix jobs#521

Merged
blove merged 5 commits into
mainfrom
claude/chat-e2e-shard
May 21, 2026
Merged

ci: shard examples/chat e2e into 4 parallel matrix jobs#521
blove merged 5 commits into
mainfrom
claude/chat-e2e-shard

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 21, 2026

Summary

  • Convert the singular examples/chat — e2e CI job into a 4-way matrix using Playwright's built-in --shard=N/M flag.
  • Mirrors the cockpit fleet's matrix philosophy without touching the underlying e2e harness.
  • Expected wall-time: ~6 min → ~2-3 min.

⚠️ Post-merge action item

GitHub branch protection rules currently require the singular check examples/chat — e2e. After this lands, that name no longer exists; the rule must be updated to require all four templated names:

  • examples/chat — e2e (1/4)
  • examples/chat — e2e (2/4)
  • examples/chat — e2e (3/4)
  • examples/chat — e2e (4/4)

Until that update, future PR gates may fail to evaluate. Repo admin should update branch protection immediately after merge.

Test plan

  • All four examples/chat — e2e (N/4) matrix entries report success on this PR
  • Per-shard wall-time is ~2-3 min (vs. ~6 min single-job baseline)
  • Aggregate test count across shards equals the full suite (no test runs twice, no test is dropped)
  • No flake surfaced by the changed relative test order

Spec: docs/superpowers/specs/2026-05-21-examples-chat-e2e-shard-design.md
Plan: docs/superpowers/plans/2026-05-21-examples-chat-e2e-shard.md

🤖 Generated with Claude Code

blove and others added 4 commits May 21, 2026 13:13
Goal: cut wall-time of `examples/chat — e2e` by running it across a
4-way matrix using Playwright's built-in --shard=N/M flag. Mirrors the
cockpit fleet's matrix philosophy without restructuring the underlying
e2e harness.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Self-review fixes:
- Matrix uses numeric `shard: [1, 2, 3, 4]` rather than `'1/4'` strings,
  because GitHub Actions artifact names cannot contain `/`.
- Explicit `--skip-nx-cache` preservation + `--` separator placement.
- Trace artifact name templated to avoid same-name collision across
  matrix jobs (actions/upload-artifact@v4 errors on identical names).
- Required-checks list spelled out by full check name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two-task plan: (1) edit ci.yml's examples-chat-e2e job to use a 4-way
shard matrix + Playwright --shard flag + templated artifact name;
(2) push, open PR, verify per-shard wall-time on first CI run.

Spec: docs/superpowers/specs/2026-05-21-examples-chat-e2e-shard-design.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Playwright's --shard=N/M flag auto-distributes the 18 spec files
across 4 GitHub Actions matrix entries. Mirrors the cockpit fleet's
matrix philosophy. Expected wall-time: ~6 min → ~2-3 min.

- strategy.matrix.shard: [1, 2, 3, 4], fail-fast: false
- name templated: examples/chat — e2e (1/4), (2/4), ...
- --shard=N/4 passed through Nx executor's -- separator
- Trace artifact templated examples-chat-e2e-trace-shard-N to avoid
  same-name collision in actions/upload-artifact@v4

Downstream needs: references (release aggregator, demo-deploy gate)
unchanged — GitHub aggregates matrix results automatically.

POST-MERGE ACTION ITEM: update GitHub branch protection required-checks
list from 'examples/chat — e2e' to the 4 templated names.

Spec: docs/superpowers/specs/2026-05-21-examples-chat-e2e-shard-design.md
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment May 21, 2026 8:42pm

Request Review

@blove blove merged commit 5e3faa4 into main May 21, 2026
1 of 2 checks passed
blove added a commit that referenced this pull request May 21, 2026
PR #521 sharded the singular `examples/chat — e2e` job into a 4-way
matrix. The singular check name is no longer reported, which would
break any external reference (status badges, branch protection rules,
deploy gates that read by name).

This mirrors the existing `cockpit-e2e-summary` pattern (lines
334-345 — fan-in over the cockpit matrix): a no-op aggregator named
`examples/chat — e2e` that gates on the matrix's aggregated result.
Restores the singular check name without undoing the matrix.

needs: [ci-scope, examples-chat-e2e] — ci-scope must be in needs for
the if-guard to access its outputs (GitHub Actions only exposes
needs.<job>.outputs for jobs in the explicit needs list).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant