Skip to content

ci(web): webview tests run in 8 shards (about -10 min on every webview PR's gate) - #29666

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
ci/webview-shards-8
Oct 31, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
ci/webview-shards-8

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Leo (2026-10-31): "IF YOU DONT MERGE STUFF LIKE THAT WITHIN THE DAY THERE'D BETTER BE AN EXTREMELY GOOD REASON ... WITHIN 3 HOURS IF NEEDS CHANGES / WITHIN THE HOUR IF STRAIGHTFORWARD".

Why

Today's webview PRs spent most of their ask-to-merge time waiting on web / react-apps-check (N). The webview verdict gate (react-apps-base-check) can't run until every head shard finishes. On 16 vCPU (#29033), each shard's "Test webviews" step runs its ~100 Vite dev-server files 4 at a time. That took 18-26 min per shard. For #29614 (removing the PR chip row), it was 29 of the 51 minutes from Leo's ask to the merge.

What

  • react-apps-check-shard runs as 8 shards instead of 4, still on Blacksmith 16 vCPU, with the same 32 vCPU overflow.
  • react-apps-base-check uses the same 8 shards, one per head shard's results artifact.
  • Nothing else changes:
    • merge-guard reads the declared base-check matrix from this file.
    • webviews-test-durations and the react-apps-check verdict glob or aggregate whatever shards exist.
    • The LPT split in webviews_test_shards.py takes any count.
  • The gate itself is unchanged: the same per-test verdict, now split across 8 shards.

Performance

metric before after delta harness or run link
slowest react-apps-check shard p50 24.4 min (11 PR heads since #29033, max 33.1) 15.6 min (8 shards, 5.5 to 15.6) -8.8 min GraphQL check-run timings; after: run 41240581813
web-subarea-scope start to last react-apps-base-check about 27 min (#29614: 19:54:50 to 20:21:54) 18.4 min (20:53:39 to 21:12:01) about -8.6 min runs 41236343549 / 41240581813
web-subarea-scope start to web / react-apps-check verdict p50 26.4 min 22.4 min (includes a 4 min queue for the 4 vCPU aggregator job, 1 s on #29614) -4 min measured, about -8 min without that queue same
Blacksmith 16 vCPU head-shard minutes per webview run about 4 x 23 = 92 92.5 (8 shards summed) about 0 run 41240581813

The head shards cost about the same in total, because dev-server files dominate and the per-shard setup is small. The base replay adds 4 short jobs (about 1.5 to 2 min each).

Warm sources: unchanged. Each shard restores the bun and Playwright caches, and the shard split reads the shared durations manifest.

Changelog

none

Observed / Not run

  • Ran: actionlint on ci-web.yml (clean).
  • Ran: checked that every consumer of the shard set globs or reads the matrix (merge-guard webview_expected_shards, the durations merge, the verdict aggregator).
  • Not run locally: the CI Python tests (heavy work isn't allowed on this host). This PR's CI runs them.

risk: CI-only (workflow matrix).

Agent session: agent session

🤖 Generated with Claude Code

…er files

On 16 vCPU each react-apps-check shard ran its ~100 dev-server files 4 at a
time, 18-26 min of Test webviews per shard, the long pole for a webview fix
from ask to merge. The base replay matches the head's 8 shards; merge-guard
reads the declared matrix, and the durations and verdict jobs glob shards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-d750cf10922c785efa64
@teamleaderleo teamleaderleo added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 2a6d342: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr29666 -f ref=ci/webview-shards-8 -f platform=macos -f backend_mode=local

Shipped in:

@github-actions github-actions Bot added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:low Risk tier (docs/ci/risk-tiers.md) labels Oct 31, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, router-review): BLOCK at 99498da

BLOCK at 99498da

Visual verdict: no images; Leo tries the build

  1. [P1][blocking] The workflow now declares eight shards at .github/workflows/ci-web.yml:320, but tests/test_web_validation.py:233 still asserts there are exactly four. Running python3 tests/test_web_validation.py fails with AssertionError: 8 != 4; cmux-next-guards runs this test on every PR, so the required guard is red until the test is updated.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 2a6d342

Reviewer: codex gpt-6-astra high, fast tier.

SHIP at 2a6d342

Visual verdict: no images; Leo tries the build

No correctness findings. Head/base matrices match, and artifact aggregation supports eight shards. All 53 focused Python tests passed. CI performance remains unverified locally.

Follow-ups: none

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@teamleaderleo
teamleaderleo merged commit e7a61ac into feat-cmux-next Oct 31, 2026
241 of 244 checks passed
@teamleaderleo
teamleaderleo deleted the ci/webview-shards-8 branch October 31, 2026 21:58

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 2a6d342b Deployed Oct 31, 2026 by teamleaderleo via wait for same-key tree publisher #91410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant