Skip to content

ci: split Control UI E2E into 13 shards so it stops setting the wall - #131257

Merged
steipete merged 2 commits into
mainfrom
steipete/admiring-bun-2def43
Aug 28, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/admiring-bun-2def43

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

checks-ui-e2e is the tallest job in OpenClaw's CI graph on main, at 357-387s across the three runs measured below, and it sets the wall in two of the three. Its shards are visibly uneven, so the whole lane waits on whichever row drew the heaviest work.

Why This Change Was Made

The imbalance is not a packing problem, and the existing duration-weighted sequencer is not what needs fixing.

Per-file medians were re-derived from the checks-ui-e2e job logs of runs 33116963478, 33117411412, and 33117811987 (2026-08-27): 286 control-UI files, ~2114s of body. Control-UI shard bodies span 1.25-1.27x within a run, not the 2.6x visible in job wall — that figure compares wall and includes the browser-extension row, which is a different workload at 133s.

Expanding UI_E2E_FILE_SECONDS_HINTS to cover the ~200 unhinted files does not pay. Under leave-one-run-out cross-validation (weights fit on two runs, shards scored on the held-out third), the tallest shard body is 222s with the shipped estimator, 209s with a full 286-file table, and 196s with an oracle that knows the run's exact times — and at 13-14 shards the full table gains 0-7s. Per-file run-to-run noise is p50 16% / p90 40%, which swamps the residual prediction error. Scoring a table against the medians it was fit on shows a perfect 1.00x spread, but that is overfitting, not a result. The slow-tail hints do still earn their keep: bytes-only lands at 259s, so they stay.

What actually dominates is a fixed per-shard floor of 116s median, 143s p90, 159s max — checkout 16-59s, Node setup 34-83s (dominated by pnpm install, which runs on every row because the hosted/hybrid profile sets dependency-cache: false), and ~27s of Vitest transform/import/fork. That floor varies randomly per job rather than per shard, so the packer must not model it: a constant added to every bucket never changes which bucket greedy LPT picks. It only sets the shard count.

So the shard count is the lever. The hosted/hybrid matrix goes from 12 to 14 rows — 13 control-UI shards plus the browser-extension row — with max-parallel raised to match, without which the extra rows would queue behind the first twelve and make the lane slower.

User Impact

Maintainer- and contributor-facing CI latency only; no product or runtime behavior changes. checks-ui-e2e drops off the critical path.

This does not reach a 5:00 wall on its own, and the PR should not be read as claiming that. Excluding the aggregate gate, if checks-ui-e2e vanished entirely the wall on those three runs would land at 5:42 / 6:32 / 6:12 on checks-node-compact-small-11 (297-367s) and checks-ui (276-331s). In run 33116963478 checks-ui-e2e was not even the tallest job. Those two lanes are the next work.

Evidence

Replaying each run's real per-file times through the packer at both shard counts:

run 11 control-UI shards (today) 13 control-UI shards (this PR)
33116963478 max 229s / min 181s max 179s / min 151s
33117411412 max 218s / min 172s max 183s / min 147s
33117811987 max 219s / min 175s max 179s / min 145s

With the measured overhead distribution that models the tallest row at 4:52 p50 / 5:20 p90, against 5:28 / 5:56 today.

Capacity, checked against the runner-registration budget in docs/ci.md: the live actions_runner_registration bucket reports 10,000 per 5 minutes against a 6,000 operating target, so two extra rows per run is negligible. Concurrency is proven ground — run 33116963478 peaked at 105 concurrent jobs, and its twelve checks-ui-e2e rows all started within 1s of each other, so nothing was queueing at 12.

Local validation:

  • node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts — 137 passed, 2 skipped
  • node scripts/run-vitest.mjs test/vitest-ui-e2e-config.test.ts — 4 passed
  • node --import tsx scripts/check-workflows.mts — passed (zizmor clean)
  • node scripts/check-changed.mjs — exit 0
  • node scripts/docs-list.js, oxfmt --check, git diff --check — clean
  • Verified the 13-way partition covers all 286 files with even 173s estimate weights

This PR edits .github/workflows/ci.yml, which is in the UI scope regex at scripts/ci-changed-scope.mjs:104, so its own CI run exercises the new 14-row matrix directly.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 23:11
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 27, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 8:01 PM ET / August 28, 2026, 00:01 UTC.

ClawSweeper review

What this changes

The PR raises hosted and hybrid Control UI E2E CI from 12 to 14 matrix rows (13 Control UI shards plus one browser-extension row), matching parallelism, tests, and CI documentation.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No introduced correctness defect was found: the planner, workflow cap, guard, and documentation now agree on 14 total rows. Keep this maintainer-owned PR open until its exact-head CI run completes.

Priority: P3
Reviewed head: a15ea707fedb0452d19c9d04ffd4d008354a3980

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused patch has coherent matrix-level coverage and resolves the prior documentation finding; exact-head CI remains the final gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned CI-only change is appropriately evidenced by the exact-head GitHub Actions run rather than contributor real-product proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned CI-only change is appropriately evidenced by the exact-head GitHub Actions run rather than contributor real-product proof.
Evidence reviewed 5 items Planner and workflow agree: The introduced planner creates 14 rows, reserves the final row for the browser-extension test, and gives the other 13 rows a 13-way Vitest shard count; the consuming workflow permits all 14 rows in hosted and hybrid profiles.
Boundary coverage: The guard constructs and checks the entire generated matrix for Blacksmith, GitHub-hosted, and hybrid profiles, including that evaluated max-parallel equals the corresponding matrix width.
Prior finding addressed: The follow-up commit changes the last stale eleven-shard documentation reference to thirteen Control UI shards plus the browser-extension row; the author’s comment explicitly identifies the correction.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts

Result: FAIL (failed) — step 1 expect_output 137 passed: expected terminal output was not visible within 30 seconds: "137 passed"

[failure]
expected terminal output was not visible within 30 seconds: "137 passed"

[command 1 combined output]
[test] starting test/vitest/vitest.tooling.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-131257-E2FlGF/target

hint: Using 'master' as the name for the initial branch. This default branch name
hint: will change to "main" in Git 3.0. To configure the initial branch name
hint: to use in all of your new repositories, which will suppress this warning,
hint: call:
hint:
hint: 	git config --global init.defaultBranch ‹name›
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m ‹name›
hint:
hint: Disable this message with "git config set advice.defaultBranchName false"

Assertions:

  • FAIL expect_output: 137 passed

How this fits together

CI preflight converts the selected runner profile into a browser-test matrix. The Control UI E2E job consumes that matrix, while workflow guards and CI documentation preserve its scheduling contract.

flowchart LR
A[Runner profile] --> B[Preflight planner]
B --> C[14-row E2E matrix]
C --> D[Parallel Chromium jobs]
B --> E[Workflow guard tests]
B --> F[CI operations docs]
Loading

Before merge

  • Resolve merge risk (P1) - The exact-head workflow is still in progress, so the 14-row fanout has not yet completed its authoritative CI validation.
  • Complete next step (P2) - No repair is needed; wait for normal exact-head CI validation.
Agent review details

Security

None.

PR surface

Tests +7, Docs +2, Config +5. Total +14 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 18 11 +7
Docs 1 5 3 +2
Config 1 7 2 +5
Generated 0 0 0 0
Other 0 0 0 0
Total 4 30 16 +14

Review metrics

Metric Value Why it matters
Production versus test-support delta workflow/docs +12/-5; test/test-support +18/-11 The small production delta changes the CI scheduling contract and is paired with matrix-level guard coverage.

Merge-risk options

Maintainer options:

  1. Complete exact-head fanout validation (recommended)
    Wait for the current head’s workflow to finish successfully, including the generated 14-row Control UI E2E matrix, before merging.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Wait for exact-head CI to complete successfully and verify all 14 Control UI E2E matrix rows.

Technical review

Best possible solution:

Retain the aligned 14-row planner, concurrency cap, guard, and documentation contract once exact-head CI completes successfully.

Do we have a high-confidence way to reproduce the issue?

Not applicable: the relevant behavior is a generated CI matrix and its GitHub Actions execution, not an end-user defect reproduction.

Is this the best way to solve the issue?

Yes. Increasing the hosted/hybrid planner count while matching max-parallel directly reduces the tall serial Chromium shard; the existing weighted sequencer remains the canonical packing mechanism.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e946d226f73c.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned CI-only change is appropriately evidenced by the exact-head GitHub Actions run rather than contributor real-product proof.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is CI latency and capacity tuning with no product-runtime behavior change.
  • merge-risk: 🚨 automation: The PR changes GitHub Actions matrix width and parallelism, which can affect workflow execution if the generated contract diverges.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned CI-only change is appropriately evidenced by the exact-head GitHub Actions run rather than contributor real-product proof.

Evidence

What I checked:

  • Planner and workflow agree: The introduced planner creates 14 rows, reserves the final row for the browser-extension test, and gives the other 13 rows a 13-way Vitest shard count; the consuming workflow permits all 14 rows in hosted and hybrid profiles. (.github/workflows/ci.yml:755, a15ea707fedb)
  • Boundary coverage: The guard constructs and checks the entire generated matrix for Blacksmith, GitHub-hosted, and hybrid profiles, including that evaluated max-parallel equals the corresponding matrix width. (test/scripts/ci-workflow-guards.test.ts:7811, a15ea707fedb)
  • Prior finding addressed: The follow-up commit changes the last stale eleven-shard documentation reference to thirteen Control UI shards plus the browser-extension row; the author’s comment explicitly identifies the correction. Public docs: docs/ci.md. (docs/ci.md:248, a15ea707fedb)
  • Feature history: The adjacent duration-weighted Control UI E2E sequencer refit appears in the local history immediately before this PR and is attributed to Peter Steinberger, establishing the same-area ownership trail. (test/vitest/vitest.ui-e2e.sequencer.ts:23, 1b26747cfd83)
  • Current-main comparison gap: The local partial clone could not materialize fetched main SHA e946d22 because its promisor remote was unavailable; this review therefore does not claim a current-main equivalence result. (e946d226f73c)

Likely related people:

  • steipete: Peter Steinberger authored the preceding Control UI E2E duration-hint refit and the present CI fanout work. (role: recent area contributor; confidence: high; commits: 1b26747cfd83, b6c358ee0c20; files: .github/workflows/ci.yml, test/vitest/vitest.ui-e2e.sequencer.ts, docs/ci.md)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let the exact-head CI workflow finish successfully.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-27T23:17:46.380Z sha 1659645c5bd6900def49d6bed1516e5e7233a8e4 :: found issues before merge. :: [P2] Update the remaining shard-count documentation

checks-ui-e2e is the tallest CI job on main (387s worst observed). Its
shard imbalance is not a packing problem: measured across runs
33116963478, 33117411412, and 33117811987, control-UI shard bodies span
1.25-1.27x, and leave-one-run-out cross-validation shows hinting all 286
files gains ~13s at 11 shards and ~0-7s at 13-14, because per-file
run-to-run noise (p50 16%, p90 40%) swamps the residual prediction error.

What dominates is a fixed per-shard floor of 116s median / 143s p90
(checkout, pnpm install, Vitest transform) that no packing change can
touch. That floor varies randomly per job rather than per shard, so the
packer must not model it -- a constant added to every bucket never
changes greedy LPT's choice -- but it does set the shard count.

Raise the hosted/hybrid matrix from 12 to 14 rows (13 control-UI shards
plus the browser-extension row) and match max-parallel so the extra rows
do not queue. Replaying each run's real per-file times through the
packer moves the tallest shard body from 229/218/219s to 179/183/179s,
modelling the tallest row at 4:52 p50 and 5:20 p90 against 5:28/5:56.
Two extra registrations per run against a 6000/5min operating target.

Also correct the sequencer comment, which pointed the next maintainer at
the hint refresh that measurably does not pay, and record the
floor-based sizing rationale in docs/ci.md.

Note: this takes checks-ui-e2e off the critical path but does not reach
a 5:00 wall on its own -- checks-node-compact-small-11 (297-367s) and
checks-ui (276-331s) set a 5:42-6:32 floor behind it.
The planner-descriptor paragraph still described the hosted and hybrid
profiles as eleven Vitest shards plus one browser-extension shard, which
was accurate for the previous 12-row matrix and contradicts the 14-row
plan in the same document.

Found by ClawSweeper review of #131257.
@steipete
steipete force-pushed the steipete/admiring-bun-2def43 branch from 1659645 to a15ea70 Compare August 27, 2026 23:55
@steipete

Copy link
Copy Markdown
Contributor Author

Thanks — the P2 was a real miss on my part, now fixed in a15ea707fedb.

[P2] Stale eleven-shard reference (docs/ci.md:248) — correct and addressed. I updated the "twelve-row" and registration-count references in the same document but missed the planner-descriptor paragraph, which still read "eleven Vitest shards plus one browser-extension shard". It now reads thirteen. I also swept the repo for any other stale ordinal shard counts in docs/, .github/, and test/ and found none.

[P1] Exact-head CI — the previous head 1659645c5bd6 completed green on run 33125397961, which is where the observed matrix numbers below come from. CI is now re-running on the new head.

That run also confirms the change does what the PR body predicts, measured from its own job logs rather than modelled:

metric before (11 shards) run 33125397961 (13 shards) predicted
tallest shard body 229 / 218 / 219s 187s 179-183s
ideal body 192s 158s 163s
per-shard overhead p50 116s 115s 116s

Matrix topology is as intended: 14 rows, 14/14 correctly the browser-extension lane at 197s, all 13 control-UI rows started concurrently with no queueing behind the cap.

Two honest notes on that run. The tallest row's wall was 345s rather than the modelled 292s, but that is not the sharding — checkout ran 54-56s on every row, at the top of the observed 16-59s range, the same run-wide slow-fetch condition seen in run 33117811987. Body is the apples-to-apples measure and it landed where predicted. And because this PR edits ci.yml it triggers a full-graph run (123 jobs, Windows and docker lanes included), so its 9:36 wall is not comparable to scoped main runs; within it, checks-ui-e2e finished at 6:31 against a 9:31 pole, three minutes clear of the critical path.

On the live-verification FAIL: that step timed out waiting 30s for Test Files in the sandbox rather than observing a test failure. Locally node scripts/run-vitest.mjs test/scripts/ci-workflow-guards.test.ts takes ~143s and reports 137 passed / 2 skipped, and the same guard is green in exact-head CI.

Owner decision on the fanout — accepted. Two extra rows against a live actions_runner_registration bucket of 10,000 per 5 minutes and a 6,000 operating target. Concurrency at 14 is proven rather than assumed: run 33116963478 peaked at 105 concurrent jobs and its twelve ui-e2e rows all started within 1s of each other, so nothing was queueing at 12.

One scope caveat worth repeating, since the PR should not be read as claiming a 5:00 wall: excluding the aggregate gate, if checks-ui-e2e vanished entirely the wall on the three measured runs would land at 5:42 / 6:32 / 6:12 on checks-node-compact-small-11 (297-367s) and checks-ui (276-331s). Those are the next lanes, not this PR.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 28, 2026
@steipete
steipete merged commit a6cc62f into main Aug 28, 2026
302 of 305 checks passed
@steipete
steipete deleted the steipete/admiring-bun-2def43 branch August 28, 2026 00:45
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
…penclaw#131257)

* ci: split Control UI E2E into 13 shards so it stops setting the wall

checks-ui-e2e is the tallest CI job on main (387s worst observed). Its
shard imbalance is not a packing problem: measured across runs
33116963478, 33117411412, and 33117811987, control-UI shard bodies span
1.25-1.27x, and leave-one-run-out cross-validation shows hinting all 286
files gains ~13s at 11 shards and ~0-7s at 13-14, because per-file
run-to-run noise (p50 16%, p90 40%) swamps the residual prediction error.

What dominates is a fixed per-shard floor of 116s median / 143s p90
(checkout, pnpm install, Vitest transform) that no packing change can
touch. That floor varies randomly per job rather than per shard, so the
packer must not model it -- a constant added to every bucket never
changes greedy LPT's choice -- but it does set the shard count.

Raise the hosted/hybrid matrix from 12 to 14 rows (13 control-UI shards
plus the browser-extension row) and match max-parallel so the extra rows
do not queue. Replaying each run's real per-file times through the
packer moves the tallest shard body from 229/218/219s to 179/183/179s,
modelling the tallest row at 4:52 p50 and 5:20 p90 against 5:28/5:56.
Two extra registrations per run against a 6000/5min operating target.

Also correct the sequencer comment, which pointed the next maintainer at
the hint refresh that measurably does not pay, and record the
floor-based sizing rationale in docs/ci.md.

Note: this takes checks-ui-e2e off the critical path but does not reach
a 5:00 wall on its own -- checks-node-compact-small-11 (297-367s) and
checks-ui (276-331s) set a 5:42-6:32 floor behind it.

* docs(ci): correct the remaining eleven-shard Control UI E2E reference

The planner-descriptor paragraph still described the hosted and hybrid
profiles as eleven Vitest shards plus one browser-extension shard, which
was accurate for the previous 12-row matrix and contradicts the 14-row
plan in the same document.

Found by ClawSweeper review of openclaw#131257.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant