Repository navigation
test(ui): decouple chat runtime budgets from Lit - #168348
Conversation
Report accepted invalidations and DOM commits through the renderer-neutral lifecycle test hook. Keep every numeric budget unchanged and retain counters in the E2E probe. Release-note context: internal test instrumentation.
Keep the observer signature tied to the production notifier without exporting a test-only type, document the optional-global assertion, and use the browser hook naming convention.
|
🦞👀 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. What this changesThis PR replaces Lit prototype instrumentation with optional chat lifecycle notifications for performance tests. Example: The browser performance test streams 240 chat deltas.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR: it provides useful renderer-independent performance instrumentation, and source review found no concrete introduced defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe chat controller connects state invalidation to rendering and post-commit effects; an optional browser test observer receives lifecycle notifications and records performance counters. flowchart LR
A[Gateway events and composer edits] --> B[Chat state]
B --> C[Render lifecycle]
C --> D[Chat renderer]
D --> E[DOM commit]
C --> F[Optional performance probe]
E --> F
Technical reviewBest possible solution: Keep performance observation at the existing lifecycle boundary while preserving independent checks of rendering and composer behavior. Do we have a high-confidence way to reproduce the issue? The original probe directly traverses Lit prototypes and replaces requestUpdate, establishing the stated renderer coupling in source. Is this the best way to solve the issue? The existing lifecycle owner is a reasonable observation boundary, and both streaming updates and composer invalidations reach it without introducing another rendering owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cdeb1e37adc6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +18, Tests -11. Total +7 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 10, 2026, 4:51 AM ET / 08:51 UTC (Revision 2). |
|
Merged via squash.
|
* test(ui): decouple chat runtime budgets from Lit Report accepted invalidations and DOM commits through the renderer-neutral lifecycle test hook. Keep every numeric budget unchanged and retain counters in the E2E probe. Release-note context: internal test instrumentation. * Merge remote-tracking branch 'origin/main' into solid2/p1-07 * test(ui): satisfy lifecycle probe type and lint checks Keep the observer signature tied to the production notifier without exporting a test-only type, document the optional-global assertion, and use the browser hook naming convention. Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Chat runtime budgets patch Lit's
requestUpdate, preventing the same performance tests from validating a different renderer.User Impact
Internal test instrumentation only; no user-visible behavior change. Release-note context: preserve chat streaming and composer performance coverage through the Control UI renderer migration.
Why This Change Was Made
An opt-in
RenderLifecyclehook reports accepted invalidations and completed DOM commits. The E2E probe owns the counters and frame attribution, replacing Lit prototype traversal and property-name diagnostics. Every existing numeric budget and workload size is unchanged.Evidence
pnpm test ui/src/e2e/chat-stream-runtime-budgets.e2e.test.ts --maxWorkers=1took 44.5 s wall time on AWS Crabbox. Authoritative PR CI run 38038348799 passed onc62b2e07d67ca059bac84cbe684ededab4f6e42a. The budget file passed all six cases in 18.618 CI test-seconds; the selected E2E lane passed 18 cases across six files in 44.07 s (94 s whole-job wall time).check:changedremains red only for the baseline Gateway export described below.cbx_3814c481387b. Full chat run:run_ee52102e2396087eab9a557d968c8c99. Latest budget/check run:run_c984063c0734e55ab651b9576d8e0b5b.The baseline ran on Testbox and the final candidate on AWS; these timings are diagnostic only. The latest composer cases report zero invalidations and zero commits.
Inherited failures
The following failures occurred in remote pre-PR proof. They remain documented as inherited history; the authoritative PR CI run is green.
run_ee52102e2396087eab9a557d968c8c99failed the reconnect and ordinary-reconnect cases inui/src/e2e/chat-flow.catalog-bootstrap.e2e.test.ts(catalogRequests.size: expected 3, received 4). All eight cases pass in isolation on untouched baseline7985ac28aaf5einrun_5aa9f32e1a3abf7bdd88f083a640ee51, and all eight pass on the candidate inrun_414e47e1ebf58c6f15646629d51dc5b8. These are inherited order-dependent/flaky failures; the passing replays are evidence of isolation behavior, not a claimed fix.src/gateway/control-ui-public-session-render.ts: PUBLIC_SESSION_ENTRY_SCRIPT.run_0d9dc0c4bf9556e27f7ae8a12423871ereproduces the same finding on untouched baseline7985ac28aaf5e. Latest candidate runrun_c984063c0734e55ab651b9576d8e0b5breports only this inherited export; the instrumentation type/export and lint findings were fixed. This PR does not change the Gateway file.No checks were disabled, budgets raised, or assertions weakened. The former active-turn recovery blocker passes after incorporating main's fix from #168195.