Repository navigation
improve(ui): reduce real-Gateway test preparation - #155979
Conversation
Preserve all browser scenarios while sharing catalog Gateway preparation and replacing repeated scaffold CLI processes with authenticated RPC clients. Keep CLI handoffs, config writes, and device approvals. Await catalog publication after restart within the existing RPC deadline.
|
🦞👀 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, 6:27 PM ET / 22:27 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR shares Gateway setup across catalog tests and replaces repeated CLI readback processes with authenticated connections while retaining browser scenarios. Merge readiness✅ Ready for maintainer review Keep open as useful, bounded test optimization. No actionable patch defects remain, and the author's subsequent ready-for-review and squash-auto-merge actions resolve the prior workflow concern. Overall CI timing goals remain explicitly unmet. Priority: P3 Review scores
Verification
How this fits togetherControl UI integration tests connect browsers and test clients to isolated Gateways. They verify model catalogs, account selection, and provider sign-in through real application boundaries. flowchart LR
A[Test scenarios] --> B[Shared isolated Gateway]
A --> C[Fresh browser contexts]
A --> D[Authenticated readback client]
C --> B
D --> B
B --> E[Catalog and sign-in results]
E --> F[Assertions and timing evidence]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +98. Total +98 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the measured fixture savings and full scenario coverage, with broader CI preparation and tier-selection improvements owned separately. Do we have a high-confidence way to reproduce the issue? Not applicable to a product bug: this changes test preparation, and the body supplies before/after timings for the affected files. No tests were executed during this read-only review. Is this the best way to solve the issue? Yes. Reusing existing fixture and authenticated-client owners is a focused way to reduce preparation while preserving browser assertions and CLI-specific coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0d947f878155. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
* commit '7d7f977ccfc1ac177526232e4f4960febd010015': (91 commits) test: avoid unused target setup in package profile fixtures (#155972) fix(worktrees): batch snapshot metadata reads test(plugin-state): distinguish borrowed and foreign lifecycle owners refactor(agents): share external harness session and attempt machinery (#152181) chore(i18n): refresh native locales (#156006) chore(test): retain Doctor fixture settlement diagnostics (#155944) perf(codex): reuse unchanged inference request bytes (#155987) perf(test): prepare snapshot ownership subprocess imports (#155973) perf(test): consolidate channel registry coverage (#155014) fix(runtime): preserve Node worker dependencies and cleanup diagnostics (#155292) perf(test): prepare worktree GC child runtime (#155928) fix(ui): open browser cards after delayed panel renders (#153253) fix(update): retain the running updater by hard link instead of copying the package (#155977) feat(decisions): add explicit evaluation and Labs opt-in foundation (#155134) fix(state): preserve lifecycle custody across worker dispatch improve: reuse shared tooling fixtures and defer legacy updater proof (#155731) improve(ui): reduce real-Gateway test preparation (#155979) perf(state): move session RPC SQL off the Gateway main thread (#155740) docs(freebsd): explain native Codex runtime limits (#155980) fix(qa): count Code Mode nested tool activity as transcript tool evidence (#155976) ...
* test(ui): reuse Gateway fixtures and RPC readbacks Preserve all browser scenarios while sharing catalog Gateway preparation and replacing repeated scaffold CLI processes with authenticated RPC clients. Keep CLI handoffs, config writes, and device approvals. Await catalog publication after restart within the existing RPC deadline. * test(ui): retain CLI readbacks without measured savings
What Problem This Solves
Real-Gateway UI integration is a main-CI tail. This change removes repeated preparation and readback subprocesses where measurements support it. The ≤600 s UI test target remains open; this PR does not change release-tier membership or the isolated-Gateway owner.
User Impact
No product behavior change. All 33 real-Gateway UI files and their 63 cases remain selected; no assertions, timeouts, retries, workers, runner classes or budgets change.
Why This Change Was Made
The retained changes share catalog preparation and preserve real authenticated RPC boundaries for login and command-palette readbacks. CLI dashboard/config/device-approval operations stay where the CLI behavior matters. Two neutral RPC conversions and two slower QA launcher experiments were reverted.
Evidence
Main-CI inventory
Newest green main at discovery: run 35769918206 (
abf6c935f722b016f4f6e891effdd50ba42add5b). Itschecks-node-compact-large-2job is inside the Node matrix: 699 s job / 579 s test step, below the test target at discovery; the exact PR-head qualification subsequently passed at 600 s tests. The earlier 957 s figure belongs to R3 qualification run 35769239223 (774 s tests), not that green main run.The latest three green main runs skipped real-Gateway UI. Latest green run executing it: 35762056279, job
checks-ui-e2e-real-gateway, 975 s overall / 734.44 s Vitest / 87 s desktop proof. Top 15 below use resource-reporter module elapsed time, including collection. Overlapping file times are not additive job shares. Paths are underui/src/e2e/;qa-lab/meansextensions/qa-lab/src/.qa-lab/control-ui-openclaw-delegation.real-gateway.e2e.test.tscron-duration-save.real-gateway.e2e.test.tsqa-lab/control-ui-media-transcript.real-gateway.e2e.test.tschat-composer-websearch-kill-switch.real-gateway.e2e.test.tssession-pr-reader-lifetime.real-gateway.e2e.test.tsqa-lab/control-ui-automation-management.real-gateway.e2e.test.tsquota-reset-status.real-gateway.e2e.test.tsagent-file-lifecycle.real-gateway.e2e.test.tsqa-lab/session-host-command-state.real-gateway.e2e.test.tsprovider-browser-login.real-gateway.e2e.test.tsmcp-app-conformance.e2e.test.tsusage-sessions-owner-attribution.e2e.test.tschat-collaborator-scroll.real-gateway.e2e.test.tscommand-palette-catalog.real-gateway.e2e.test.tschat-flow.catalog-bootstrap.e2e.test.tsLinux file measurements and decisions
Node 24.19.0, Linux Blacksmith Testboxes via Crabbox,
vitest.ui-e2e-prebuilt.config.ts --maxWorkers 2; three independent single-file invocations per reported median. Command wall includes invocation preparation; module wall isolates file collection/setup/tests. Testboxes expose four CPUs / 16 GiB; the historical CI job exposed eight CPUs / 32 GiB. These are not hardware-normalized CI measurements. Baseline source:5ac833c17248e4b074e0f0aede9ec68724b001b4.qa-lab/control-ui-openclaw-delegation.real-gateway.e2e.test.tscron-duration-save.real-gateway.e2e.test.tsqa-lab/control-ui-media-transcript.real-gateway.e2e.test.tschat-composer-websearch-kill-switch.real-gateway.e2e.test.tssession-pr-reader-lifetime.real-gateway.e2e.test.tsqa-lab/control-ui-automation-management.real-gateway.e2e.test.tsquota-reset-status.real-gateway.e2e.test.tsagent-file-lifecycle.real-gateway.e2e.test.tsqa-lab/session-host-command-state.real-gateway.e2e.test.tsprovider-browser-login.real-gateway.e2e.test.tsmcp-app-conformance.e2e.test.tsusage-sessions-owner-attribution.e2e.test.tschat-collaborator-scroll.real-gateway.e2e.test.tscommand-palette-catalog.real-gateway.e2e.test.tschat-flow.catalog-bootstrap.e2e.test.tsThe six release-only candidates are not moved by this PR. TP-B2 #155606 and TP-D2 #155586 preserve complete canonical configs for full manual/release validation, but TP-D2 does not wire the separate real-Gateway job into its UI selection. That planner/tier owner is reserved to another lane; silently adding excludes here would lose proof. No RELEASE-ONLY savings are claimed.
Validation and remaining evidence
node scripts/check-changed.mjspassed on Linux (34m15s) before final auth/readiness refinements; focused final type-aware lint and formatting cover those refinements. The negative no-floating-promises canary was detected.No visual/product changes; screenshots are not needed for this test-fixture-only change. No auto-merge; do not land from this lane.
Gateway timing limitation and top-15 diagnostic
Run 35769918206, job 106891154685 contains 170 passing case-duration lines across 26 files, but no per-file wall summaries. These sums are not file-wall measurements, and no valid per-file job share can be inferred. The three recoverable singleton invocation walls (including preparation) are
agent-command-local45.38 s,server-methods/agent.visitor-access14.23 s, andnode-host/linux-node-plugin.integration9.63 s; they do not establish a uniform top-15 ranking.All listed Gateway files remain unchanged because the current test step is already 579 s. Thirteen belong to the separately owned isolated-Gateway lane; that family's two invocation walls are 213.20 + 209.63 s. The other two are identified below. No Gateway savings are claimed.
src/gateway/server.codex-failure-recovery.test.tssrc/gateway/github-publication-requester.test.tssrc/gateway/github-publication-requester-aliases.test.tssrc/gateway/server.chat-cli-auth.test.tssrc/agents/prepared-model-catalog-worker.integration.test.tssrc/gateway/server.xai-fallback.test.tssrc/gateway/gateway-route-model-reuse.test.tstest/plugins/codex-model-catalog.gateway.test.tssrc/gateway/gateway-auth-recovery.test.tssrc/agents/agent-command-local.test.tssrc/gateway/server.chat.canonical-publication.test.tssrc/gateway/server.cli-watchdog.test.tssrc/gateway/server-methods/models-list.freshness.integration.test.tssrc/gateway/gateway-ssh-upload-signal.test.tssrc/gateway/server.chat-recovered-output.test.tsCoverage behind the six release-tier candidates
These are recommendations for the release-tier owner, not membership changes. The real compositions remain in main until that owner preserves their full-release execution.
cron-duration-saveui/src/e2e/cron-descriptions.e2e.test.ts: “configured duration precision: preserves stagger milliseconds when changing the expression”;ui/src/lib/cron/index.test.ts: “keeps omitted policy fields inherited when editing metadata” and “clears mode, threshold, and cooldown overrides without disabling the policy”.session-pr-reader-lifetimesrc/gateway/control-ui-session-pr-access.test.ts: “rechecks the original reader after a pending snapshot (%s)” and “keeps pending details bound to the original reader (%s)”;ui/src/e2e/chat-pull-requests.e2e.test.ts: “pins detected PR chips above the composer with rate-limit staleness”.quota-reset-statussrc/agents/auth-profiles/usage.test.ts: “half-opens a stale long WHAM block and clears it when capacity returns” and “does not apply an available result over a newer WHAM block”;ui/src/e2e/model-providers.e2e.test.ts: “lists configured providers with auth state, quota, billing, and local spend”.control-ui-automation-managementsrc/agents/tools/cron-tool.management.test.ts: “forwards a normalized partial update without recapturing creator authority (%s, trigger=%s)”;src/gateway/server-methods/requester-cron-authority.integration.test.ts: “permits the stored mutation only for an admitted manager: %s”.mcp-app-conformancesrc/gateway/mcp-app-standalone-cancellation.test.ts: “owns the HTTP request lifetime (disconnect=%s)”;src/gateway/server-methods/mcp-app.test.ts: “rechecks current widget authority for every interactive capability”;ui/src/components/mcp-app-view.test.ts: “pushes live theme and container changes and cleans up their observers”.chat-collaborator-scrollui/src/e2e/chat-collaborator-scroll.e2e.test.ts: “keeps the viewport stable when a collaborator sends a follow-up while %s” and “holds the reader anchor across another identified client's send while %s”, covering following, reading, older history and near-bottom behavior.Three-run command-wall samples (seconds)
chat-flow.catalog-bootstrap.e2e.test.tscommand-palette-catalog.real-gateway.e2e.test.tsprovider-browser-login.real-gateway.e2e.test.tsBaseline file measurements used Testboxes
tbx_01m35bwerpn9qc6b40pdd4fd9d(run 35778595692) andtbx_01m35c3n8hqvbfnspe77ashfgm(run 35779027743). Final login/palette measurements usedtbx_01m35hn1hwrt4fwvvmtdjwthb4(run 35789131003); catalog used the original second lease. Each listed invocation exited 0. Testbox workflow cancellation at lease cleanup is separate from the remotely measured command result.One corrected-auth timing campaign lost its lease after five completed measurements (exit 255; workflow canceled). Those completed records were retained; only missing records were measured on the replacement. A later five-file whole-suite attempt also lost its older lease (exit 255) before producing a Vitest result; it is excluded. The successful exact-head native CI run supplies the final complete-suite proof. An earlier endurance campaign exposed the post-restart pending-catalog race; the event-driven publication wait fixes that readiness assumption without retrying errors or relaxing the model assertion. Earlier failed/superseded campaigns are excluded from final measurements.
Job projection and native CI
The retained files remove 64.959 s of standalone command wall and 42.596 aggregate module-seconds from the measured workload. Ordinary PR plans omit this proof-tier job, so ordinary PR-plan savings are 0 s. Emitted jobs, planner budgets and tier membership are unchanged.
A two-worker scheduling estimate assigns the serial login reduction in full and halves the two parallel-file reductions:
11.668 + (15.567 + 15.361) / 2 = 27.132 s. Applied to the historical UI Vitest body, that projects 734.44 → 707.31 s, before the desktop proof. Holding historical setup fixed projects 975 → 947.87 s for the job. This model assumes comparable throughput and scheduling; it does not prove the 600 s test target or the 15 min workflow goal. Native CI below is the primary job proof, and rebased main/host/cache differences limit attribution of whole-job changes.Exact-head main-shaped CI run 35789708692, head
99cd5e31b0564d2fcac3df7cbf6c0f5063ca8e94. The run succeeded in about 21m23s. No auto-merge.The native result is 975 → 1,173 s overall, 737 → 796 s test-step wall, and 734.44 → 793.14 s Vitest duration. The job has no demonstrated wall-time reduction, and the 600 s test / 15 min workflow targets remain unmet. Build and desktop preparation added 114 s; both CI runs reported eight CPUs, approximately 32 GiB and two Vitest workers. Several untouched modules also grew; the cause of that whole-job variation has not been isolated. Do not attribute the growth or the complete-run delta solely to this PR. The unchanged Gateway matrix job passed at 758 s overall / 600 s test step, versus 699 / 579 s in the green-main baseline. It ran two workers on two actual CPUs with 7.66 GiB memory. Its build was 79 → 111 s, checkout 10 → 18 s, and Node setup 23 → 18 s. It is at the 600 s test limit; 0 s Gateway savings are claimed from this PR.
Controlled Testbox sibling proof passed all 33 files. Its 1,046.941 s baseline and 890.040 s intermediate candidate are retained as diagnostic observations only: that candidate included subsequently reverted experiments, so it is not used as the final job saving.
Changed-file timings inside native CI
Both runs used Node 24.19.0 and two workers on eight actual CPUs / approximately 32 GiB. These are single main/PR observations, separate from the three-run Testbox medians.
provider-browser-login.real-gateway.e2e.test.tschat-flow.catalog-bootstrap.e2e.test.tscommand-palette-catalog.real-gateway.e2e.test.tsThe three changed files improved by 11.716 aggregate module-seconds in native CI. The largest untouched increases were MCP conformance (47.024 → 69.058 s), PR-reader lifetime (63.004 → 78.027 s), and delegation (109.521 → 121.008 s). They are retained, not retried or weakened. The release-tier owner needs to wire the six documented candidates before any deferral can be claimed; fixed preparation remains with its existing CI owner.