Repository navigation
test(control-ui): reproduce Team boot queries and warm snapshots - #175672
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: deaa345f8d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| value: { model?: { navigationView?: string; onlineUsers?: unknown[] } }, | ||
| key?: IDBValidKey, | ||
| ) { | ||
| const request = put.call(this, value, key); |
There was a problem hiding this comment.
Preserve the omitted-key
put overload
When the application calls store.put(record) on these inline-key (keyPath) stores, this wrapper forwards two arguments as put.call(this, value, undefined). IndexedDB treats the explicitly supplied key as invalid for an inline-key store, so Chromium throws DataError before the observer can resolve, breaking the Team-scale E2E on its first sidebar snapshot write; the composer-draft wrapper at line 346 repeats the same defect. Dispatch to put.call(this, value) when key is undefined, as the existing composer-store E2E interception does.
AGENTS.md reference: AGENTS.md:L86-L87
Useful? React with 👍 / 👎.
5aad82f to
0a56ef9
Compare
0a56ef9 to
9159fd1
Compare
|
Codex review: needs maintainer review before merge. What this changesThis PR adds query-aware Team-scale fixtures, paginated cron jobs, and repeatable warm snapshot restoration. Example: Reload the synthetic Team dashboard with 120 scheduled jobs.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR improves a useful performance fixture, and no concrete introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe benchmark feeds synthetic Gateway responses into the production Control UI and records reload profiles, RPC traffic, and rendering observations. flowchart LR
A[Benchmark runner] --> B[Synthetic inventory]
B --> C[Mock Gateway responses]
C --> D[Production Control UI]
E[Saved browser snapshots] --> D
D --> F[Profiles and captures]
Technical reviewBest possible solution: Retain the focused fixture improvements and leave landing with the campaign lead. Do we have a high-confidence way to reproduce the issue? The base fixture's catch-all session responses and absent cron inventory establish the tooling mismatch directly; no target code was executed during this read-only review. Is this the best way to solve the issue? The change appropriately extends the existing fixture owner and reuses production ordering and projection contracts without changing application behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8f255dc77141. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +811, Docs -1, Other +92. Total +902 across 13 files. Added test files: 2. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
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 Reviewed October 17, 2026, 1:03 PM ET / 17:03 UTC. |
|
Proof is now current for The earlier IndexedDB overload finding does not reproduce: the current Team-scale browser regression completes both the sidebar-snapshot and composer-draft @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…ot (openclaw#175672) Several reload experiments stopped because the Team-scale bench fixture didn't behave like live Team: sessions.list mocks returned 200 rows for 100- and 1-row queries, there was no cron inventory, and measured reloads started without the persisted sidebar and chat snapshots, so boot request fan-out and warm restore paths were not exercised. The fixture now honors the live sessions.list query shapes (limit/offset, spawnedBy, involvingMe, ownerFirst, exclusion flags, owner counts, row mode), provides a cron inventory loaded in three compact pages, activates seven plugins, seeds a persisted sidebar snapshot and a trimmed chat snapshot before the measured reload, and fixes the Online-view setup. Function-share comparison uses the existing --cpu-profile/--cpu-profile-compare mode. Seven board reloads on AWS c7a.4xlarge match the live boot census exactly (sessions.list 5, cron.list 3, plugin activation reports 7); every reload restores the persisted chat snapshot, and sidebar/chat restore functions appear in CPU profiles. Tooling only: +350 LOC across bench, fixture and e2e helpers with four regression tests; no application changes. 18 focused tests pass; exact-head CI green; the one full-UI failure reproduces on main.
What Problem This Solves
The Team-scale cold-load fixture answered different
sessions.listqueries with the same oversized rows, omitted the paginated cron workload, and did not reliably retain the Online view across reloads. These differences hid work observed during a signed-in reload of a dashboard deep link.Use one parameter-driven session inventory for all bench requests, with canonical ordering, requested filters/pagination, owner-first rows/counts, and bounded row projections. Add 120 valid cron jobs (three compact pages of 50/50/20) and seven activating plugins. Before every measured reload, restore the original persisted sidebar and trimmed v8 chat snapshot. Replay follows app unload and preserves the HTTP cache; the Online browser regression waits for its committed snapshot.
This supersedes #175190 with the retained fixture fixes. It drops the bespoke fidelity reporter and its tests; L119's existing
--cpu-profileand--cpu-profile-compareremain the sole profiler/comparison path. No application code, Gateway schema, configuration option, or durable server record changes.Evidence
The supplied r149 board reference has five distinct session-list queries, three compact cron pages, and seven plugin activations. The revised gate compares those known counts (±1) and verifies that actual sidebar/chat snapshot restoration appears in the existing CPU profile. No cross-revision function-share threshold or speedup claim.
Validation on AWS Crabbox
cbx_1a3227209604, fixedc7a.4xlarge, exact head below (run):pnpm test <file> --maxWorkers=1)src/gateway/session-list-retention-scale.test.tsui/src/test-helpers/control-ui-e2e.mock-gateway.test.tsui/src/test-helpers/control-ui-team-scale-fixture.test.tsui/src/lib/sessions/sidebar-list-churn.test.tsui/src/e2e/team-scale-cold-load.e2e.test.tsBoth targeted lint groups and all three targeted typechecks passed. Independent P0–P2 review is clean. Exact-head GitHub CI is green: run 39050827804. Focused regressions cover all five query shapes, independent pagination/filtering, bounded enrichment, canonical ordering, valid cron definitions and paging, seven activation reports, and Online/snapshot persistence through reload.
Fidelity gate
Seven profiled board reloads on the fixed AWS instance all match the complete r149 reference counts:
sessions.listcron.listplugins.controlUi.reportactivatedEvery measured reload starts from the same 80-message v8 chat snapshot (projection v3) and persisted 120-person sidebar. The probe records an IndexedDB snapshot hit and cached-transcript paint in all seven runs. Existing
--cpu-profileoutput samplesrestoreSnapshotSessionin 7/7 runs,restoreSidebarSnapshotin 1/7,applyChatCacheSnapshotin 4/7, andreadStoredChatSnapshotRecordin 2/7. These are actual restore/read paths; short sampled functions need not appear in every run. The Online reload also preserves the selected view and all 120 people (4 session lists, 3 cron pages, 7 activated plugins). No function-share threshold or timing/speedup claim.Complete board boot RPC census (identical in all seven runs)
agent.identity.getagents.listboard.getcanvas.document.viewchat.startupconfig.getconnectcron.listcron.statusexec.approval.listmodels.authStatusmodels.listopenclaw.approval.listplugin.approval.listplugins.controlUi.listplugins.controlUi.reportpresence.activityprogressCard.getquestion.listsession.members.listEvidencesession.reactions.listsessions.branches.listsessions.catalog.listsessions.companion.statesessions.describesessions.groups.defaultssessions.groups.listsessions.listsessions.messages.subscribesessions.observer.visibilitysessions.subscribesystem.infotalk.catalogtalk.configupdate.statususers.listOnly the three gate methods have complete comparable counts in the supplied r149 excerpt. The r147 message-cost capture is partial; absent methods are not treated as zero.
Full UI suite and broader checks
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.tscompleted once on this head: 820 files passed, 3 failed, 1 skipped; 3,571 cases passed, 1 failed, 5 skipped, wall time 5,456.47 s. Two suites could not start because the lease lacked WebKit. After installing the matching browser, focused replays passed:tooltip-first-activation.e2e.test.ts2/2 (23.86 s),workboard-native-bundle.e2e.test.ts2/2 (30.25 s). No full-suite replay was used to chase green.The remaining QA-lab case (
control-ui-automation-management.real-gateway.e2e.test.ts, configured owners/admin management) fails withPrivate mutation boundary is writable by another POSIX principal.The identical test file (same Git blob on both revisions) reproduces the same error on pinned mainbebee58450d179e806e4e1e85074444c391de2bf, using its own frozen dependency install and matching build. No filesystem protection was relaxed.node scripts/check-changed.mjscompleted in 2,059.43 s. Changed-file formatting/lint, UI types, scripts types, controller/API guards, and script unused-export scan passed. Four broader gates fail identically on that pinned main baseline:chat-message.test.tsx,config-page-state.ts,sessions-page-state.tssession-snapshot-store.test.tsThe snapshot-store unit file also reproduces its undefined-constant failure on pinned main (31 passed, 1 failed). These failures are outside this diff; exact-head GitHub CI is green. Local proof retains each failed command, exit code, baseline comparison, and the complete CPU/bench summaries.
Size and ownership
Head:
9159fd1e18512b4781d4abcc3c593375fb162f04. The campaign non-test diff filter reports 586 additions and 236 deletions: +350 tooling lines. Application runtime delta: 0. Growth belongs to the query/inventory and warm-state fixture owners; frozen query responses and the custom report are removed.The campaign lead owns landing. Do not merge automatically.
The following list records the initial full-suite result; the two WebKit setup failures were subsequently repaired and their focused files passed as noted above.
Full UI suite: file pass/fail list
Names below omit the shared
.e2e.test.tssuffix (except.tsxfiles, shown in full). PASS means the file completed without failures; SKIP means every case was skipped. Detailed per-case counts are retained in the local proof.ui-e2e-bundled / ui/src/e2e
ui-e2e-bundled / ui/src/pages/chat/components
ui-e2e-bundled / ui/src/pages/chat
ui-e2e-bundled / ui/src/pages/cron
ui-e2e-bundled / ui/src/pages/lobsterdex
ui-e2e-bundled / ui/src/pages/plugins
ui-e2e-bundled / ui/src/pages/secrets
ui-e2e-bundled / ui/src/pages/workboard
ui-e2e-bundled / ui/src/test-helpers
ui-e2e-serial / extensions/qa-lab/src
ui-e2e-serial / ui/src/e2e
ui-e2e-serial-standalone / ui/src/e2e
ui-e2e-serial-standalone / ui/src/pages/agents-home
ui-e2e-serial-standalone / ui/src/pages/workboard
ui-e2e-standalone / ui/src/e2e