Skip to content

perf(control-ui): add named cold-load delivery profiles - #182092

Merged
steipete merged 1 commit into
mainfrom
steipete/coldload-live-latency-profile
Oct 24, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/coldload-live-latency-profile

Conversation

@steipete

@steipete steipete commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

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-fast or reproduce the earlier scenario with legacy-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:

Route / metric Legacy handshake Live-fast
Chat hello marker 590.1 [589.8–594.7] 591.9 [587.4–595.3]
Chat row paint 980 [972–984] 1,048 [908–1,058]
Chat final rows 1,012.6 [1,010.1–1,017.0] 1,334.8 [1,273.5–1,386.3]
Dashboard hello marker 790.1 [781–805.4] 691.8 [681.6–704.9]
Dashboard row paint 656 [650–670] 664 [662–664]
Dashboard final rows 1,176.7 [1,163–1,186.8] 1,324.4 [1,297.1–1,365.8]

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_e2a2d793bb57 was released; independent inspection confirms released, 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 four sidebar-complete-roster.e2e.test.ts cases 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.

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.
@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M labels Oct 24, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds named benchmark latency profiles, preserves explicit timing overrides, and records challenge delivery separately.

Example: A developer selects --latency-profile live-fast.

  • Before: The fast-handshake scenario required individual timing flags.
  • After: The profile selects a 439 ms navigation-relative challenge floor and a 41 ms connect-response floor, with explicit overrides still taking precedence.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused implementation with useful unit contracts; experimental model fidelity remains unmeasured in the supplied evidence.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored tooling experiment is outside the contributor proof gate; the body reports resolver tests only and explicitly leaves paired browser measurements and diagnostic traces pending.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Developers investigating reload scheduling need a repeatable fast-handshake scenario alongside the earlier campaign timing.
Reason: The maintainer-directed tooling capability makes scenarios reproducible while preserving defaults and explicitly limiting claims about live fidelity.

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
Reviewed head: f9a472f686133e74fb767cac5ed1b472e13e3e00

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not yet show a benchmark CLI run exercising profile delivery and challenge recording in the browser.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ffcb0a8 adds scripts/lib/control-ui-warm-reload-probe.ts:63 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ffcb0a8cfa75; files: scripts/lib/control-ui-warm-reload-probe.ts)
  • Vincent Koc: Raw commit 095f94c adds scripts/lib/control-ui-warm-reload-probe.ts:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 095f94ce9886; files: scripts/lib/control-ui-warm-reload-probe.ts)

PR surface

Tests +36, Docs +43, Other +71. Total +150 across 5 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 36 0 +36
Docs 1 43 0 +43
Config 0 0 0 0
Generated 0 0 0 0
Other 3 98 27 +71
Total 5 177 27 +150

Review metrics

Metric Value Why it matters
Benchmark option 1 new CLI flag: --latency-profile Selects default, legacy-handshake, or live-fast without changing application configuration or existing benchmark defaults.

Labels

Label changes:

  • add P3: Opt-in developer measurement tooling changes no shipped application behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: Opt-in developer measurement tooling changes no shipped application behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Publish the declared paired benchmark results and diagnostic traces before treating the profile as validated.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 23, 2026, 10:15 PM ET / October 24, 2026, 02:15 UTC.

@steipete steipete changed the title experiment(control-ui): fast-handshake latency profile [do not merge] perf(control-ui): add named cold-load delivery profiles Oct 24, 2026
@steipete
steipete marked this pull request as ready for review October 24, 2026 02:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T02:23:51.366967Z f9a472f Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete merged commit a8eb8d7 into main Oct 24, 2026
193 of 197 checks passed
@steipete
steipete deleted the steipete/coldload-live-latency-profile branch October 24, 2026 02:52
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 24, 2026
…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant