Repository navigation
improve(ci): speed up compatible Control UI tests with Bun - #154585
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 5:21 AM ET / 09:21 UTC (Revision 7). ClawSweeper reviewWhat this changesThe PR runs compatible Control UI tests on Bun, preserves Node fallbacks, warms both runtime caches, distributes sidebar tests, and avoids unnecessary layout work for hidden labels. Merge readiness✅ Ready for maintainer review The previous performance blocker is resolved by the updated controlled comparisons and preserved coverage. No actionable introduced defect remains; the measured improvement is test-command time, not a demonstrated end-to-end Actions speedup. Priority: P2 Review scores
Verification
How this fits togetherControl UI CI takes the UI test inventory and assigns it to native shards and runtime workers. A protected cache publisher supplies reusable transforms, while test results feed the existing CI gate. flowchart TD
A[UI test inventory] --> B[Native shard selection]
B --> C[Runtime partition]
C --> D[Node fallback tests]
C --> E[Compatible Bun tests]
F[Protected cache publisher] --> D
F --> E
D --> G[Existing CI gate]
E --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +22, Tests +713, Docs +36, Config -9, Other +136. Total +898 across 36 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep runtime selection and cache production under their existing shared owners, preserving complete Node release coverage and the narrowly scoped tokenizer workaround. Do we have a high-confidence way to reproduce the issue? Not applicable as an existing-product bug report: this is a CI optimization supported by controlled launcher comparisons and hosted execution; this read-only review did not rerun tests. Is this the best way to solve the issue? Yes. Extending the existing runtime selector and cache publisher preserves their ownership, while native-shard-first partitioning retains coverage and Node fallbacks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4cbde45ab1c3. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
Keep all JIT tiers enabled while preventing the ordered CSS-tokenizer runaway at its end-of-file predicate. Avoid redundant style resolution for zero-width marquee labels while preserving resize recovery and reveal cleanup. Keep PR runtime partitions, native shards, worker budgets, assertions, and release Node/Bun coverage intact. Repair the fixture dependency URL and make the marquee regression establish keyboard focus modality explicitly.
Integrate current main while retaining its read-before-write marquee scheduler, observers, and three existing regression cases. Keep the zero-width fast path and verify pending and active reveal cleanup. Drain jsdom's focus selectionchange event before measuring animation timers.
Keep the existing 484 sidebar cases in four topic entrypoints so native UI sharding and worker scheduling can share their cost. Move mock and global cleanup into the common sidebar fixture, scope footer cleanup to its cases, and preserve the complete cache-warmer collection.
|
@clawsweeper re-review The PR body now contains the completed three-shard comparison, balanced shard-1 results, the final-source Node 24.20 control matching hosted CI, measured cache archive/restore costs, and the green exact-head CI receipt. It explicitly records the shard-1 slowdown, cache-hit dependency, and the difference between measured test-command performance and estimated transfer overhead. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* commit '80b9608a25e191a17e1466d750c2f76a38a38507': fix(tooling): declare tsx CLI shim exports test(gateway): reuse session PR access state fixtures (#155626) test(heartbeat): await wake registration before advancing coalescing time refactor(status): share plugin health section assembly (#155390) fix: CLI and MCP tool completions skip plugin hooks (#155206) fix(update): preserve failures and retain running worker code (#153764) fix(sqlite): drain idle coordinators at lifecycle teardown fix(test): prepare SQLite compile-cache probes before launch fix(test): preserve owned compiler caches in Vitest workers fix(ios): assistant files are not downloadable in chat (#155195) fix(heartbeat): avoid timeouts for busy scheduled polls (#148333) test(gateway): hold SSH approval until pending assertions finish test(update): cover launcher permission rollback on Linux (#155615) fix(edit): avoid duplicate replacements from legacy arguments (#155513) feat(browser): support Lightpanda connection-scoped CDP replies (#154342) improve(ci): speed up compatible Control UI tests with Bun (#154585) test(gateway): prepare remaining approval fixtures before requests (#155589) fix(doctor): exclude retained agents from automatic session import
|
Post-merge rollout is complete. The protected hosted and full Linux publishers both ran the new collector with the approved Bun checksum, collected the same seven UI files on both runtimes, pruned once, and saved their transform and compile caches. Hosted publication: 35710617040, 09:36 UTC. Full Linux publication: 35711935283, 10:15 UTC, on a verified descendant of the merge. The PR's exact-head CI passed all 123 jobs. Subsequent main observation found separate fixture/type failures: the SSH-pairing race is fixed by f87f23c; the later TS7016 import is fixed by 80b9608 (full core/UI/plugin production type checks independently passed on descendant f28edb1); and the later heartbeat fake-timer registration race has fixture repair 175c0b7. Their runtime behavior and deadlines were not relaxed. One later Node/Chromium lightbox failure remains unexplained: job 106701463512, |
…154585) * ci: run compatible UI tests on Bun with isolated transform caches * perf(ui): narrow Bun tokenizer workaround and skip zero-width styles Keep all JIT tiers enabled while preventing the ordered CSS-tokenizer runaway at its end-of-file predicate. Avoid redundant style resolution for zero-width marquee labels while preserving resize recovery and reveal cleanup. Keep PR runtime partitions, native shards, worker budgets, assertions, and release Node/Bun coverage intact. Repair the fixture dependency URL and make the marquee regression establish keyboard focus modality explicitly. * perf(test): split sidebar cases across UI workers Keep the existing 484 sidebar cases in four topic entrypoints so native UI sharding and worker scheduling can share their cost. Move mock and global cleanup into the common sidebar fixture, scope footer cleanup to its cases, and preserve the complete cache-warmer collection. * perf(ci): warm Bun UI caches and defer costly FTL compilation
What Problem This Solves
Control UI tests could run away in Bun's CSS tokenizer and were slower than Node, preventing their migration to Bun in PR CI.
User Impact
Compatible UI files run on the existing checksum-pinned Bun fork in PRs. Two complete GC-sensitive files retain Node coverage. Full Release Validation runs the complete Node selection followed by compatible Bun. All assertions, existing skips, three shards, and three workers per row remain covered.
The controlled comparison is faster overall: 3.2% less summed test-command time and 4.8% less time on the longest shard with Node 24.21. The first shard is 2.0% slower; the other two improve. A separate comparison against CI's actual Node 24.20 confirms a 4.6% improvement on the longest shard.
The gain depends on the protected Bun cache seed. The main-only publisher now collects the same seven UI files on both runtimes in both Linux cache backends. PRs remain consumers. Cold or missing seeds can reduce the benefit; the first protected publication follows merging this change.
Why This Change Was Made
Preventing inlining only the native CSS tokenizer's
endOfFilepredicate avoids the pinned fork's ordered loop. Baseline, DFG, and FTL JIT remain enabled. The UI runtime owner delays FTL compilation to reduce optimization work in short-lived workers, and the cache publisher uses the same policy. This uses the already-publishedsteipete/bunbuild at3ff0efc82217775e04094a1d4402d7c6932ecb24; no new binary or dependency patch is needed.Native sharding precedes runtime partitioning. Only
chat-pane-retained-presentation.test.tsandusage-page-details.test.tsrequire Node. Transform-cache identity includes the optimizer directory to prevent mixed Lit instances. The sidebar's original 484 cases use four topic entrypoints with shared per-file cleanup. Zero-width marquee labels avoid unnecessary style reads while preserving the existing batched layout owner.Evidence
Matched four-CPU Linux comparisons, Node 24.21, approved Bun executable SHA-256
205362edf578a6335e7f4ed43803ce680825421520e2bbd329a975d9ce06d4bc, default Node heap, and the actual CI launcher:All 1,429 candidate files, 24,373 passed cases, and four existing skips match between policies. Each cell restores an immutable policy-specific seed and discards optimizer/results state. Audits verify all seven transform hits and accepted Bun bytecode. Timing includes launcher, fallback, startup, and joined cleanup.
The final committed candidate
f67101c6d9178c9cd216771b0aa9f706b23dc276also passed a fresh shard-2 comparison against official Node 24.20, the version observed in hosted CI: 229.679s Node → 219.061s Bun, 4.62% faster, with identical 476 files, 8,205 passes and three skips. Both seeds were regenerated with that Node version; the committed runtime owner supplies Bun's settings.Rollout cost: Bun collection takes 14.63s once in the protected publisher. The UI-only seed grows by 118.27 MB uncompressed and 37.16 MB compressed across separate transform/compile archives. Verified fresh-directory restores take 0.148s for Node-only versus 0.291s combined (+0.143s, a local warm-filesystem proxy). Hosted Bun installation took 1s per row. The Node 24.20 shard-2 saving remains about 9.48s after installation and this restore delta, before additional network/Actions overhead. Current hosted cache downloads observed 52–221 MB/s, suggesting roughly 0.2–0.7s extra transfer for the added archive bytes; that is an estimate, not a measured complete-job speedup.
Exact-head CI passed: 123/123 jobs, all three UI rows, all 13 UI E2E rows, and
openclaw/ci-gate. Its merge ref adds two main-branch files and passed 1,431 files, 24,447 cases, four skips. All three transform restores missed, so these hosted timings prove correctness and installation cost rather than the warm-seed comparison.Current changed-file type, lint, format, dependency, ratchet, dead-export and workflow checks pass. The joined runtime/producer/configuration proof passed 137 tests. Final bounded producer tests take 3.57s command wall (46ms case time); the workflow guard passed in 4.24s. Fresh P0–P2 autoreview found no actionable issue in the seed/FTL change. All 484 split sidebar cases pass with one worker; the custom runner resets modules and the evaluated graph after every file.
Source controls and retained limitations
Shard 1, shard 3, and the Node 24.20 control use exact final commit
f67101c6d9178c9cd216771b0aa9f706b23dc276. The Node 24.21 shard-2 ABBA uses integrated treedbb5aa86d9d125e6ef2cdc19a9cfcbe749df700b, whose UI source/configuration is unchanged in the final commit; its harness applies the same final seed and JIT policy. Comparisons are within each host. Summed per-shard samples are not one end-to-end Actions run. Dependency setup, network transfer, queueing, and Actions bookkeeping are outside the test-command measurements.The original ordered memory reproduction passes all 95 cases with the EOF guard; unguarded and
nextToken-only controls run away after case 82. Runtime partition, full-release routing, and marquee regression/Chromium proof remain covered. An initial third-shard comparison completed successfully but lost its detailed archive when the lease expired; the retained final-source pair above replaces it.An earlier
8b8232a10336CI run timed out in the Node E2E system-notice margin case at 120 seconds. An exact-tree, same Node/Chromium, original-order 28-case replay passed but did not recreate the complete shard/load. Its cause remains unresolved; no assertion or deadline was relaxed, and neither that replay nor the subsequent green CI runs is claimed as a flake fix.Post-merge cache publication and main-CI follow-up.