Repository navigation
perf(control-ui): add named cold-load delivery profiles - #182092
Conversation
Keep the default bench timing unchanged and retain the legacy handshake as a named scenario. Add an observed fast-handshake envelope with per-method boot delivery floors and challenge timing diagnostics. This is tooling only; no user-visible behavior changes.
|
🦞👀 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 changesAdds named benchmark latency profiles, preserves explicit timing overrides, and records challenge delivery separately. Example: A developer selects --latency-profile live-fast.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open as an explicitly paused benchmark experiment; review found no concrete introduced correctness or security defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe developer benchmark feeds synthetic Gateway timing settings into a production Control UI browser workload and emits timing summaries, traces, and diagnostic milestones. flowchart LR
A[Benchmark CLI flags] --> B[Latency resolver]
B --> C[Synthetic delivery probe]
C --> D[Production Control UI bundle]
D --> E[Warm reload observations]
E --> F[Summary and trace artifacts]
Technical reviewBest possible solution: Retain the single resolver and existing delivery owner, and let the author conclude the experiment before lifting the merge hold. Do we have a high-confidence way to reproduce the issue? This is a benchmark capability experiment rather than a demonstrated product bug; source inspection confirms the timing controls, but no benchmark execution was performed during this read-only review. Is this the best way to solve the issue? The implementation is focused: one resolver owns presets and override parsing, the existing probe owns delivery, and the added tests protect precedence and invalid-input rejection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 067c35613d40. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +36, Docs +43, Other +71. Total +150 across 5 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel 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 Reviewed October 23, 2026, 10:15 PM ET / October 24, 2026, 02:15 UTC. |
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. |
…w#182092) The cold-load bench's only handshake profile predated the Cloudflare Access identity cache (openclaw#179571): it simulated a 220 ms connect reply and 195 ms resolve/describe, while live Team now answers connect in about 25-90 ms at night. Lever rankings derived from it over-weighted the hello window. Add named latency profiles in one resolver (scripts/lib/control-ui-bench-latency.ts): `default` (unchanged), `legacy-handshake` (the previous L179 scenario, kept for comparisons) and `live-fast` (per-method first-reply floors derived from timing-only medians of six night-time Team reloads: connect 41, chat.startup 220, sessions.messages.subscribe 183, sessions.resolve 216, board.get 189, ...). Explicit --method-latency-ms overrides still apply on top. The warm-reload probe now records challenge delivery so open -> challenge -> connect can be separated. These are browser delivery floors including queueing, not isolated server timings; defaults are unchanged. Tooling and docs only (+114), product runtime 0. Resolver tests pass. The red checks-ui-e2e shard is the four sidebar-complete-roster.e2e.test.ts cases, which fail the same way on pinned main d88fc94 (fix in progress separately).
What Problem This Solves
The earlier cold-load scenario holds the connect reply for 220 ms, hiding scheduling collisions when a signed-in reload of a dashboard deep link receives hello sooner.
User Impact
No product behavior changes. Developers can select
--latency-profile live-fastor reproduce the earlier scenario withlegacy-handshake. Existing defaults remain unchanged; explicit timing flags retain precedence.Why This Change Was Made
The new profile uses timing-only observations from six signed-in reloads: a 439 ms navigation-relative challenge floor, 41 ms connect floor, and rounded first-reply medians for critical boot methods. The guide documents the values and limits. Observed RTT includes browser queueing and server work; replaying it as a floor is a conservative scheduling envelope, not an isolated network model. Socket-open timestamps were absent, so no socket-open delay was invented. It remains opt-in because it is not strictly more faithful across all milestones.
One resolver owns presets and overrides, replacing the inline override-parser loop. Summaries record the selected profile and effective values. The warm-reload probe now records challenge delivery separately from socket open and connect send.
Evidence
Same production bundle, AWS
c7a.4xlarge, 11 interleaved legacy/live pairs per route, plus three separate CPU+timeline traces per route. Warm HTTP cache and scoped persisted snapshots; fixed fixture clock; repo headless Chromium. The dashboard uses the existing MCP-app fixture. Median [Q1–Q3], ms from navigation:These are delivery-workload effects, not product before/after wins. Dashboard hello is earlier in 11/11 pairs (paired median −101.1 ms); final rows are later in 11/11 on both routes (+317.0/+150.3 ms). Chat LoAF overlaps with mixed pair signs (221 → 236 ms; paired median −1); dashboard LoAF rises with separated IQRs (243 [236.5–252.5] → 262 [255–270.5]).
A configured 41 ms connect floor still yields 114.7 ms observed chat RTT: all three diagnostic chat mounts overlap the nominal fast reply. Two dashboard traces put connect plus mount/rows in 277–279 ms tasks. The hello microtask marker precedes the end of those tasks, so future scheduling experiments should gate task end as well as hello, row paint and final readiness. No new product scheduling change is proposed here.
Lease
cbx_e2a2d793bb57was released; independent inspection confirmsreleased, no host. Admission/check run: https://crabbox.openclaw.ai/portal/runs/run_c4e2b4cc2da42ed6b14c6b5cbf113724 (initial broad gate failed; collection continued on the same lease through its generated SSH route).Validation: focused resolver tests 2 passed,
pnpm test test/scripts/control-ui-bench-latency.test.ts --maxWorkers=1(AWS runner wall 4.35 s, Vitest 190 ms; local 1.77 s). Remote script/test typechecks, lint, formatting and erasability pass. Autoreview is clean through P2.Inherited failures remain; CI is not green. Exact-head CI run 40053865860, head
f9a472f68613, fails foursidebar-complete-roster.e2e.test.tscases at line 105 waiting for the child-session toggle. The same file against the verified pinned-main tree (7b71c2379764) fails the same four cases at the same line/selector (runner wall 85.29 s). All other jobs in that CI run pass or skip. The remote changed-file gate separately reports the same 31 dead-export findings on head and pinned main, with no head-only finding. No CI rerun or unrelated repair was used to chase green.Product/runtime LOC delta 0. The requested exclusion-command delta is +141/−27 = +114 tooling/docs (+71 TypeScript, +43 guide); tests +36. Growth implements the requested named-profile contract and timing observations; the superseded inline parser is removed. No product config, schema, storage or cache changes. No visual UI change; no screenshots required. Release-note context: add opt-in cold-load delivery scenarios and challenge diagnostics for performance investigations.
Ready for maintainer review; leave unmerged.