Repository navigation
test(control-ui): guard chat streaming runtime budgets - #128154
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 12:41 PM ET / 16:41 UTC. ClawSweeper reviewWhat this changesThe branch adds mocked-Gateway Control UI E2E budgets for streamed rendering, deferred and bounded tool cards, long-transcript cost, idle work, and the UI E2E duration scheduler. Merge readinessNo blocking correctness finding. The PR adds focused browser coverage for existing Control UI stream invariants; it should remain open until its exact-head UI E2E shards finish and the clean merge result is rechecked. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherGateway chat and agent events enter the Control UI, where chat state batches streamed rendering and projects live tool cards. The new E2E suite drives that boundary in Chromium and feeds its expected duration to the CI shard sequencer. flowchart LR
A[Mock Gateway events] --> B[Control UI chat state]
B --> C[Frame-scheduled rendering]
B --> D[Live tool-card projection]
C --> E[Browser runtime-budget suite]
D --> E
E --> F[UI E2E shard scheduler]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +670. Total +670 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the browser-level regression gate and land it once the exact-head sharded UI E2E run confirms the added 34-second workload is stable. Do we have a high-confidence way to reproduce the issue? Not applicable: this is preventative test coverage, and the PR body supplies a focused mocked-Gateway E2E run for the protected path. Is this the best way to solve the issue? Yes. Browser E2E is the appropriate owner-boundary layer for frame scheduling and rendered tool-card retention, while existing unit tests retain deterministic coverage of the underlying state logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 17ecb9db67a0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
2b706a5 to
fed9537
Compare
|
Land-ready verification on head
Production LOC: +0/-0. Tests and test support: +670/-0. |
|
Merged via squash.
|
* test(control-ui): gate chat stream runtime budgets in e2e * test(control-ui): strengthen stream runtime budget gates * test(control-ui): close stream budget review gaps * test(control-ui): prove deferred tool projection
What Problem This Solves
The Control UI has bundle-size budgets and process-level performance scenarios, but no in-browser runtime guards for chat stream render coalescing, bounded live tool state, long-transcript cost, or idle main-thread work. A regression could render on every streamed delta, retain an unbounded tool stream, or leak long sessions while CI remained green.
Why This Change Was Made
This adds browser-level budgets to the existing mocked-Gateway Control UI E2E lane:
result: absent before the 80ms throttle, partially projected after it, and completed immediately byresult. The flood then continues through 60 calls and retains exactly the newest 50 cards.No production code, config, dependency, or public contract changes.
User Impact
Operators see no behavior change. Developers get a focused CI failure when chat streaming coalescing, tool-stream throttling or retention, long-session cost, or idle work regresses.
Evidence
Environment: Linux, Playwright Chromium 1.62.1,
OPENCLAW_VITEST_MAX_WORKERS=2.Focused E2E command:
Three consecutive green runs on
2b706a53aad, 4/4 tests each:Negative proof:
flushToolStreamSync(host)from the 80ms timer left zero cards after the throttle instead of the required partial card.requestChatPageUpdatemade the burst fail at241 > 180updates while240/241still ran inside rAF.Production was restored after each mutation; the committed diff remains E2E/test support only.
Additional validation:
OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs test/vitest-ui-e2e-config.test.ts(4/4)node scripts/check-changed.mjs -- ui/src/e2e/chat-stream-runtime-budgets.e2e.test.ts test/vitest/vitest.ui-e2e.sequencer.ts.agents/skills/autoreview/scripts/autoreview --mode local --max-priority P2(clean; no actionable findings)