Skip to content

ci: shard the webviews suite twelve wide - #22237

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
ci/webview-tests-wide
Oct 20, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
ci/webview-tests-wide

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

react-apps-check runs the webviews suite as 2 file shards on 8 vCPU Blacksmith runners. Over recent green runs, shard 1 took a p50 of 15.5 min (17.8 max) and shard 2 took 13.2 min. Nearly all of that time is one phase. run-webviews-tests.sh runs about 50 dev-server test files per shard, two at a time, at about 28 s each, which takes about 12 min. The other 120-odd files finish inside a minute.

This PR raises the matrix to 12 shards, so each shard holds 4-5 dev-server files. A concurrency probe ran 256 Blacksmith jobs at 32 vCPU at once with a p90 queue of 21 s, so 12 jobs here won't queue.

  • .github/workflows/ci-web.yml: 12 include entries with shard_count: 12. PR-scoped rules still run on shard 1 only.
  • tests/test_web_validation.py: requires at least 12 shards, numbered 1..N, all with the same shard_count.

Expected cost: the wall time on the critical path goes from about 16 to about 5 min. Runner minutes go from about 29 to about 60 per run, because each shard repeats about 1.5 min of setup (checkout, bun install, Playwright, bundle build). That is about $0.46 → $0.96 per run at $0.016/min for 8 vCPU. I'll post the measured numbers from this PR's own run.

Fork PRs run the same matrix on hosted ubuntu-24.04.

Testing

  • python3 -m unittest -k shard_wide test_web_validation (from tests/) failed on 1b116ff: 2 not greater than or equal to 12. It passes on the head.
  • test_web_validation, test_pr_red_checks_comment and test_webviews_tests_per_file pass.
  • test_ci_change_areas.py has the same 34 local failures with and without this change (local environment).
  • actionlint is clean.

Observed / Not run

  • Observed: the tests above, actionlint, and the baseline timings from recent cmux-next-web runs.
  • Not run yet: the 12-shard job itself. This PR's CI run is the measurement.

Changelog

none


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Shards the webviews test suite onto four 32 vCPU runners so react-apps-check finishes in about 5 minutes instead of 14–16.

The old two-shard, 8 vCPU setup spent about 12 of its minutes running dev-server test files two at a time. Twelve 8 vCPU shards barely helped (14.3 min) because each shard started with a cold Vite cache warm-up. Four 32 vCPU shards share one warm cache across about 33 dev-server files per shard and run eight files at once. The shard-independent steps (lint, type check, React Compiler check, eager JS budget, merge-driver test) now run only on shard 1, so a lint failure shows as one red check instead of four.

  • Updates the CI matrix to 4 shards on blacksmith-32vcpu-ubuntu-2404 and adds a validation test requiring 4 numbered, consistent shards with those shard-independent steps gated to shard 1.

Written for commit 6b797fe. Summary will update on new commits.

View guided diff Turn on auto-fix

Review: SHIP at dfcbc83 (cmux-review subagent; correctness first)
Not UI: CI matrix and step gating only; no app or webview code changes.

🤖 Generated with Claude Code

teamleaderleo and others added 2 commits October 19, 2026 17:18
Fails at the base: react-apps-check runs 2 shards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each of the two shards spent about 12 of its 14-16 minutes running ~50
dev-server test files two at a time. Twelve shards leave a few each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 6b797fe: 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=pr22237 -f ref=ci/webview-tests-wide -f platform=macos -f backend_mode=local

Probably yours: chat-find.test.ts, composer-chip-plain-rest.test.ts, composer-chip-plain-rest.test.ts and 4 more fails here but not on main's latest full suite. Seen on other PRs too (likely flaky): markdown-wide-table-scroll.test.ts, agent-pane-mode-keys.test.ts, composer-footer-plain.test.ts and 5 more. This PR merged before its CI finished: fix forward on main.

CI failed on 6b797fe63e (run 39351320650 attempt 1): 3 code, 2 unknown.

Job Verdict Why
web / react-apps-check (3) code a web test failed
web / react-apps-check (2) code a web test failed
web / react-apps-check (4) code a web test failed
web / react-apps-check (1) unknown no known signature; failed step: Check webviews (Oxlint, Oxfmt, type check)
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs markdown-wide-table-scroll.test.ts markdown wide tables (chromium) > the table and the code line overflow their own box, not the page: failed (job)
  • seen on other PRs agent-pane-mode-keys.test.ts the trigger and every menu row draw the mode's own shield: failed (job)
  • new in this PR chat-find.test.ts Find in Chat > keeps a Find match in view while what is above it keeps measuring: failed (job)
  • new in this PR composer-chip-plain-rest.test.ts agent-pane.composer new-chat-reasoning: .acpmux-model .acpmux-picker-button is plain at rest; hover ...: failed (job)
  • new in this PR composer-chip-plain-rest.test.ts agent-pane.composer new-chat-reasoning: .acpmux-effort .acpmux-picker-button is plain at rest; hover...: failed (job)
  • new in this PR composer-chip-plain-rest.test.ts agent-pane.new-tab reasoning-chip: .acpmux-model .acpmux-picker-button is plain at rest; hover and f...: failed (job)
  • new in this PR composer-chip-plain-rest.test.ts agent-pane.new-tab reasoning-chip: .acpmux-effort .acpmux-picker-button is plain at rest; hover and ...: failed (job)
  • seen on other PRs composer-footer-plain.test.ts at 760 px (light): off, the chips draw as today: failed (job)
  • seen on other PRs composer-footer-plain.test.ts at 760 px (light): on, plain text at rest, same labels, no overlap: failed (job)
  • seen on other PRs categories.test.ts every page row has exactly one home: failed (job)
  • ... 5 more in the job logs
Matched log lines
web / react-apps-check (3): (fail) markdown wide tables (chromium) > the table and the code line overflow their own box, not the page [60106.08ms]
web / react-apps-check (2): (fail) the trigger and every menu row draw the mode's own shield [1141.23ms]
web / react-apps-check (4): (fail) every page row has exactly one home [0.64ms]

Not re-run automatically: web / react-apps-check (3), web / react-apps-check (2), web / react-apps-check (4), web / react-apps-check (1), web / react-apps-check are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

red: web / Web status; base red: the same failure on the base f1566d5; does not block
red: web / react-apps-check; base red: the same failure on the base f1566d5; does not block
red: web / react-apps-check (1); base red: the same failure on the base f1566d5; does not block
red: web / react-apps-check (2); NEW: step Test webviews (+5 more) passes on the base f1566d5; do not merge until green; see lane-rules
red: web / react-apps-check (3); no finished base run on f1566d5 to compare; do not merge until green; see lane-rules
red: web / react-apps-check (4); no finished base run on f1566d5 to compare; do not merge until green; see lane-rules

CI fast guards failed on dfcbc83125 (https://github.com/manaflow-ai/cmux/actions/runs/39348753461). It does not block the merge; a red guard merged into main breaks it for every open PR.
The log named no failed step; see the run.

Agents: python3 scripts/ci/guard_attribution.py fix applies the mechanical fixes locally.

Lint, type check, the React Compiler check, the eager JS budget and the
merge-driver test do not depend on the shard; twelve copies cost runner
minutes and turn one lint red into twelve red checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Subagent review (correctness first): merge.

  • Shard split. The script's own split gives 443 test files, 130 of which use a dev server. At 12 shards that is 36-37 files per shard, 8-15 of them dev-server. No shard can come up empty (run-webviews-tests.sh:159-161), and 12/12 passes the shard validation.
  • Check names. Nothing assumes 2 shards. The aggregate react-apps-check reads needs["react-apps-check-shard"].result across the whole matrix. ci-status and next_batch.py use the stable web / react-apps-check name, and react-apps-check (1) in test_pr_red_checks_comment.py still exists.
  • Repeated work. Lint and type check, the React Compiler check, the eager JS budget and the merge-driver test were repeated in every shard. Fixed in dfcbc83: they now run once, on shard 1, and the test pins this. The bundle build and Playwright install stay per shard because the tests read them.
  • Forks. A fork running CI in its own repo would use 12 of its 20 hosted job slots for this matrix. That's tolerable.

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect one webviews CI lane and a small set of app defaults.

Fix the defaults snapshot mismatch before merging.

Findings

  1. P1 Defaults check fails ▶

Summary

Moves the webviews suite to four 32-vCPU shards and runs shard-independent checks only on shard 1.

  • Webviews CI runs four wide test jobs and checks common code once.
  • Markdown code defaults use a scale instead of a fixed 14-pixel size.
  • The defaults snapshot sets chief pet off and chooses the orb mascot.

Reviews (3) · Last reviewed commit: "chore(next): PR autofix at 7ccb608f72aa" · Reviewed by Greptile

@blacksmith-sh

blacksmith-sh Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Found 20 test failures on Blacksmith runners:

Failures

Test View Logs
src/pages/settings/categories.test.ts/categories.test View Logs
src/pages/settings/categories.test.ts/categories.test View Logs
test/agent-pane-mode-keys.test.ts/agent-pane-mode-keys.test View Logs
test/agent-pane-mode-keys.test.ts/agent-pane-mode-keys.test View Logs
test/agent-pane-no-capsules.test.ts/agent-pane-no-capsules.test View Logs
test/agent-pane-no-capsules.test.ts/agent-pane-no-capsules.test View Logs
test/chat-find.test.ts/chat-find.test View Logs
test/chat-find.test.ts/chat-find.test View Logs
test/composer-chip-plain-rest.test.ts/composer-chip-plain-rest.test View Logs
test/composer-chip-plain-rest.test.ts/composer-chip-plain-rest.test View Logs

...and 10 more test failures. View all on Blacksmith

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Re-review (subagent, correctness first) of the commits since the last review: no defects. SHIP at .

@teamleaderleo teamleaderleo added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 20, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-ndnmk created for this PR by the cmux coordinator.

@teamleaderleo teamleaderleo removed the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 20, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Holding this PR. The 12-shard run was not faster enough to justify 3x the runner time.

Measured on run 39347314726 (8 vCPU per shard):

2 shards (last green, run 39020382204, 10-17) 12 shards (this PR)
slowest shard 15.5 min p50 14.3 min (shard 7)
runner minutes about 29 91
cost per run about $0.46 about $1.46

Why the gain is small. Each shard warms its own cold Vite cache for every dev-server config. When a shard's warming file fails, the script runs that config's other files one at a time on cold caches. That happened in shards 10 and 12: warmDevServer … still cold after 100000 ms. Shard 12 then took 8.6 min for 10 dev-server files, about 50 s each, against about 13.5 s of wall per file in the 2-shard run.

Hidden base reds. At the feat-cmux-next tip, both shards stop at "Check webviews (Oxlint, Oxfmt, type check)", so no webview test has run since about 10-17. This PR runs lint on shard 1 only, so the tests ran and 14 files failed. I ran those 14 alone at feat-cmux-next 01806155 on the Linux tests lane (run 39349480533):

  • 12 fail at the base on their own: composer-chip-plain-rest, agent-pane-mode-keys, tooltip-surface, settings/categories, agent-pane-no-capsules, popup-escape, static-status-loops, ui-a11y, chat-find, check-type-scale, composer-footer-plain (12 tests) and settings/editors (editor.rulers).
  • 2 pass alone: agent-pane-chat-width and changes-review-threads. They failed here only because of the cold warm-up.

Next steps for this lane.

  1. Fix the base lint red and the 12 test reds.
  2. Persist each config's warm Vite cache across runs (actions/cache keyed on bun.lock and the Vite configs), so a shard starts warm.
  3. Then reshard, probably to 4-6 shards, and measure again.

Twelve 8 vCPU shards took 14.3 min (run 39347314726): each warmed its
Vite caches cold and ran dev-server files two at a time, and a warm-up
that timed out sent a shard's dev-server files one at a time. Four 32 vCPU
shards share each warm cache across about 33 dev-server files and run
eight at once. Blacksmith runners are free for this repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 11 of 16 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo
teamleaderleo merged commit 00e93bf into feat-cmux-next Oct 20, 2026
@teamleaderleo
teamleaderleo deleted the ci/webview-tests-wide branch October 20, 2026 01:05
Comment on lines +468 to +469
"setting.markdown.code.blockSize": null,
"setting.markdown.code.scale": 0.875,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Defaults check fails

cmux-next.json no longer matches the committed settings schema. That schema still gives markdown.code.blockSize a default of 14 and has no markdown.code.scale or home.chiefPet* rows. defaults_guard.py builds the snapshot from that schema and rejects any mismatch, so the defaults guard check fails on this head. Regenerate and commit the matching settings exports and snapshot together, or remove these unrelated snapshot changes.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Post-merge measurement and attribution for the 4 × 32 vCPU layout (run 39350455357):

2 × 8 vCPU (last green, 10-17) 12 × 8 vCPU 4 × 32 vCPU (merged)
slowest shard 15.5 min p50 14.3 min 7.2 min (shard 2; shard 1 stops at the base lint red after 50 s)

Blacksmith runners are free here, so runner minutes don't matter.

I ran the four files that failed in that run alone at feat-cmux-next 66406c77 (Linux tests lane, run 39351416825):

  • Base reds: markdown-wide-table-scroll hangs (timed out at 600 s); composer-type-scale, subtle-elevation and agent-pane-mode-keys fail.
  • Load flake: composer-turn-cycle passes alone (6/6). It failed only with 32 files at once, so it is the one to keep an eye on.

The gallery dev-server warm-up still times out cold at 100 s even on 32 vCPU (shard 2). That is a base problem: it took about 22 s on 10-17.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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