Repository navigation
improve(ui): cut E2E shard runtime by reusing the bundle - #118697
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 10:48 AM ET / 14:48 UTC. ClawSweeper reviewWhat this changesThe branch builds and previews the Control UI production bundle once per serial Vitest E2E shard, then reuses its address for ordinary E2E files while keeping private source servers where tests require them. Merge readinessThis PR remains necessary and is a focused, correct test-infrastructure optimization: it builds one Control UI bundle per serial E2E shard while preserving private Vite servers for source-sensitive and custom-build-info tests. No blocking patch defect was found; merge should wait for the exact-head checks already in progress. Likely related people: Priority: P3 Review scores
Verification
How this fits togetherControl UI E2E files normally start a Vite server before opening fresh Playwright browser contexts and mock Gateway connections. This change moves the expensive production build and preview-server startup to Vitest shard setup, while each test file still owns its browser, page, mock Gateway, and assertions. flowchart LR
Config[Vitest E2E shard config] --> Global[Shard global setup]
Global --> Bundle[Build Control UI bundle]
Bundle --> Preview[Preview server]
Preview --> Address[Shared server address]
Address --> Files[Per-file E2E setup]
Files --> Browser[Fresh browser and mock Gateway]
Browser --> Results[E2E assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +97, Tests +89, Other +2. Total +188 across 18 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the one-build-per-shard design, with the existing explicit source/custom-build-info escape hatches, and merge only after the exact-head E2E shards and required checks confirm the lifecycle remains stable. Do we have a high-confidence way to reproduce the issue? Not applicable: this is an E2E runner performance improvement, not a user-reported runtime failure. The provided same-host before/after shard run and focused post-rebase E2E run directly exercise the changed behavior. Is this the best way to solve the issue? Yes. Sharing the built preview server at the serial shard boundary removes repeated build and server work while retaining per-file browser/Gateway isolation and explicit private-server exceptions for source-dependent tests. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against eb76bf499b39. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* origin/main: fix(onboard): keep referenced provider secrets out of plaintext (#118702) docs: show canonical agent roster configuration (#118722) fix(channels): generate catalog from package manifests (#118097) fix(zalouser): distinguish probe timeout from auth failure (#111336) improve(ui): cut E2E shard runtime by reusing the bundle (#118697) fix(cli): publish completion caches atomically (#118715) fix(whatsapp): honor disabled self-chat without widening group access (#118711) fix(voice-call): terminate carrier calls after realtime startup failures (#118699) fix(slack): isolate GovSlack media trust and delivery (#118695) fix(browser): wrap page-controlled action results (#118691) fix(security): sanitize JSON-escaped forged content boundaries (#118698) test(qa): prove real yielded-child completion and channel delivery (#118707) fix(doctor): honor explicit plugin-only migration authority (#118700) fix(security): detect child_process calls through aliases and computed members (#116304) test(gateway): avoid async facade mock race (#118708) fix(gateway): preserve final speech during transcription shutdown (#118693) fix(gateway): resume durable outbound delivery retries (#118694) fix(plugins): reject external public-artifact hardlinks (#118689)
* origin/main: (78 commits) fix(parallels): recover Windows poll transport failures (#118479) fix(channels): deny unauthorized Discord and Telegram binding access (#118704) fix(test): bound shared git inventory lookup (#111171) fix(onboard): keep referenced provider secrets out of plaintext (#118702) docs: show canonical agent roster configuration (#118722) fix(channels): generate catalog from package manifests (#118097) fix(zalouser): distinguish probe timeout from auth failure (#111336) improve(ui): cut E2E shard runtime by reusing the bundle (#118697) fix(cli): publish completion caches atomically (#118715) fix(whatsapp): honor disabled self-chat without widening group access (#118711) fix(voice-call): terminate carrier calls after realtime startup failures (#118699) fix(slack): isolate GovSlack media trust and delivery (#118695) fix(browser): wrap page-controlled action results (#118691) fix(security): sanitize JSON-escaped forged content boundaries (#118698) test(qa): prove real yielded-child completion and channel delivery (#118707) fix(doctor): honor explicit plugin-only migration authority (#118700) fix(security): detect child_process calls through aliases and computed members (#116304) test(gateway): avoid async facade mock race (#118708) fix(gateway): preserve final speech during transcription shutdown (#118693) fix(gateway): resume durable outbound delivery retries (#118694) ...
…8697) * test(ui): reuse bundled runtime across e2e files * test(ui): isolate bundled E2E build output * test(ui): align bundled E2E output paths * test(ui): register E2E setup entrypoints * test(ui): preserve bundled E2E gateway semantics --------- Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: fix(onboard): keep referenced provider secrets out of plaintext (openclaw#118702) docs: show canonical agent roster configuration (openclaw#118722) fix(channels): generate catalog from package manifests (openclaw#118097) fix(zalouser): distinguish probe timeout from auth failure (openclaw#111336) improve(ui): cut E2E shard runtime by reusing the bundle (openclaw#118697) fix(cli): publish completion caches atomically (openclaw#118715) fix(whatsapp): honor disabled self-chat without widening group access (openclaw#118711) fix(voice-call): terminate carrier calls after realtime startup failures (openclaw#118699) fix(slack): isolate GovSlack media trust and delivery (openclaw#118695) fix(browser): wrap page-controlled action results (openclaw#118691) fix(security): sanitize JSON-escaped forged content boundaries (openclaw#118698) test(qa): prove real yielded-child completion and channel delivery (openclaw#118707) fix(doctor): honor explicit plugin-only migration authority (openclaw#118700) fix(security): detect child_process calls through aliases and computed members (openclaw#116304) test(gateway): avoid async facade mock race (openclaw#118708) fix(gateway): preserve final speech during transcription shutdown (openclaw#118693) fix(gateway): resume durable outbound delivery retries (openclaw#118694) fix(plugins): reject external public-artifact hardlinks (openclaw#118689)
What Problem This Solves
Control UI E2E shards repeatedly started and transformed the same Vite development app for every test file. On the measured shard, that duplicated setup dominated the run: 35 files and 139 tests took 358.21 seconds even though each file still needed only fresh browser and Gateway state.
Why This Change Was Made
Build and serve the production Control UI bundle once per serial Vitest shard, while preserving fresh browsers, contexts, pages, mock Gateways, file isolation, sharding, workers, concurrency, and timeouts. The three suites that inspect or intercept source modules keep private Vite development servers, and custom build-info tests automatically bypass the shared bundle.
User Impact
No product behavior changes. Maintainers get materially faster Control UI E2E feedback without removing tests or weakening assertions.
Evidence
c7a.8xlarge, exact same lease and shard 1: 358.21s baseline -> 189.59s candidate, saving 168.62s (47.1%). All 35 files and 139 tests passed.oxfmt --check, direct Oxlint, andgit diff --checkpassed.