Skip to content

fix(control-ui): align reload fixtures with subscribed history - #183832

Merged
steipete merged 5 commits into
mainfrom
steipete/coldload-warm-history-payload
Oct 26, 2026
Merged

steipete merged 5 commits into
mainfrom
steipete/coldload-warm-history-payload

Conversation

@steipete

@steipete steipete commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI browser fixture omits requested initial history from sessions.messages.subscribe, forcing reload tests and the cold-load benchmark through a standalone chat.startup request that the current Gateway no longer needs.

The campaign baseline records 14 visible states during a signed-in dashboard deep-link reload. A faithful history transport is a prerequisite for measuring improvements to that sequence.

User Impact

Test and benchmark fidelity only. No deployed runtime, Gateway protocol, or cache-shape change; no warm-reload performance improvement is claimed in this prerequisite PR.

Why This Change Was Made

Subscription history now uses the existing startup-response owner, including configured transcripts, cursor-selected responses, durable input receipts, and nested history failures. subscriptionInitialHistory: false explicitly selects the standalone fallback in tests that control its delay, error, or request count. Normal readiness and history-count assertions follow initial history delivered through subscribe or standalone startup during same-connection navigation; approval upgrades remain excluded from history counts.

The recovered-search test enters chat through the sidebar after the existing roster-ready boundary, retaining its single full-message read and search assertions. This isolates search from a separately observed boot-time scope transition (details below).

The old key-only default is removed. Static transcript overrides and subscription response packaging live in their existing fixture owners, keeping the large fixture module below its line-cap ratchet. The warm-reload probe now recognizes catch-up delivered inside subscribe while ignoring observer-only replies.

Evidence

Rebased onto main 8ebe2147e41f at head 259dd129e79629f21963e8f90d8842a81ddf8151. The copy-test conflict retains main’s scroll setup and uses subscribe readiness. Main’s auto-merged dictation, reverse-tab, message-action, and video-gallery setup stays intact. The newly added ordinary action-foreground startup wait now waits for the foreground subscription; explicit fallback scenarios retain subscriptionInitialHistory: false. No runtime code changed.

Check Result
Rebased-head fixture helpers 28/28 pass across four files on AWS cbx_129652986dc4 (requested c7a.4xlarge; quota fallback t3.small), exact head 259dd129e79629f21963e8f90d8842a81ddf8151
Rebased-head paint probe 4/4 pass on the same head and AWS lease
Rebased-head native e2e All six files passed, 36/36 tests, with --maxWorkers=1 on Hetzner cbx_fdda12bf1694 (ccx33, Node 26.12.1, Chromium 1248), exact head 259dd129e79629f21963e8f90d8842a81ddf8151; native runner duration 151.55 s
Rebased-head PR CI Green on 259dd129e79629f21963e8f90d8842a81ddf8151: run 40247731398. No red checks to classify
Fixture regression against original code Fails because requested initialHistory is absent
Historical fixture wire contracts 10/10 pass on pre-rebase head 403a89aa29b381a6e391fd6ae44702d57b1fa580; pnpm test ui/src/test-helpers/control-ui-e2e.sessions.test.ts --maxWorkers=1 wall time 5.64 s
Warm-reload probe regression against original probe Initial-history subscribe case fails; standalone startup and observer-only controls pass
Historical probe browser tests 4/4 pass on pre-rebase head 403a89aa29b381a6e391fd6ae44702d57b1fa580; pnpm test ui/src/test-helpers/control-ui-transcript-paint.browser.test.ts --maxWorkers=1 wall time 2.67 s
Historical repaired consumer e2e 8/8 pass across five files on pre-rebase head 403a89aa29b381a6e391fd6ae44702d57b1fa580 (39.52 s)
Native pagination e2e 2/2 pass; confirms no standalone startup request on the default path
Line-cap ratchet Pass, including the fixture extraction and migrated consumers (pre-rebase proof)
Independent review Fixture, consumer migration, probe, and search setup clean through P2; the rebase and new foreground wait were reviewed through P2. ClawSweeper’s pre-rebase re-review had no findings
Historical full UI e2e 3,275 passed, 2 inherited failures, 4 gated skips across 844 files; 83m08s on AWS cbx_b9fab6b0ee67 (c7a.4xlarge, Node 26.12.1), exact head 403a89aa29b381a6e391fd6ae44702d57b1fa580
Historical changed-file checks Formatting, lint, typechecks, and other guards pass. The dead-export scan fails on inherited findings: 21 matched the historical pinned-main control; three older-base findings were already fixed on main by #183933
Historical main control AWS cbx_298c9d997b94, c7a.4xlarge, Node 26.12.1, same Chromium revision 1248; pinned main bb6a983a9d85f80e11b79e8a06644bd7f3409c6a reproduces both UI failures and the dead-export scan failure
Historical PR CI Green on 403a89aa29b381a6e391fd6ae44702d57b1fa580: run 40236659402
Deployed production LOC delta 0; requested non-test filename filter reports +65/-35 (+30), entirely serialized test fixtures and benchmark instrumentation

The rebased-head browser files are action-foreground, browser-dictation-status, chat-composer-reverse-tab, chat-content-copy, chat-message-actions, and chat-video-gallery. Fixture helper files are control-ui-e2e.sessions, control-ui-e2e.deferral, control-ui-e2e.chat-inputs, and control-ui-e2e.mock-gateway, plus the control-ui-transcript-paint browser probe. All ran through scripts/run-vitest.mjs with their native configs. The full UI suite was not repeated after this test-only rebase; its earlier result is labeled historical above.

The AWS quota fallback to t3.small was killed with exit 137 during the UI build after the helper/probe passes. Hetzner setup initially stopped for missing Corepack; installing Corepack into the scratch toolchain on the same lease allowed the native browser run to pass. These were setup failures, not test failures. Both rebased-head leases are released with cleanup complete.

Full-suite failures: ui/src/e2e/team-scale-cold-load.e2e.test.ts (the sidebar resize handle intercepts the transcript’s x: 4 hover point) and extensions/qa-lab/src/control-ui-automation-management.real-gateway.e2e.test.ts (Crabline provider readiness rejects a writable private mutation boundary). Both files are unchanged, and both exact failures reproduce on the historical pinned-main control above. The control’s preceding automation case passes, matching the full-run setup order.

The historical pre-rebase dead-export scan reports 24 findings; the historical pinned main control reports 23, with 21 identical entries. The three PR-head-only entries are the internal fixture exports removed by commit 9076855 in #183933. This diff changes none of those declarations or references. The remaining two main-only findings are outside this diff as well.

Historical commands on pre-rebase head 403a89aa29b381a6e391fd6ae44702d57b1fa580:

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts
node scripts/check-changed.mjs

Historical control commands on pinned main:

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts ui/src/e2e/team-scale-cold-load.e2e.test.ts extensions/qa-lab/src/control-ui-automation-management.real-gateway.e2e.test.ts
node --import tsx scripts/check-deadcode-exports.mts

Both leases are released with provider cleanup complete.

The four existing gated skips are desktop-resize.real-gateway.e2e.test.ts, peer-followup-restart.real-gateway.e2e.test.ts, chat-steer-deferred-custody.real-gateway.e2e.test.ts, and deepseek-search.real-gateway.e2e.test.ts.

The +30 tooling lines model the nested initial-history success/failure contract, retain explicit fallback coverage, and record the new response milestone. No deployed code grows.

The fixture audit found a standalone startup fallback that current live reloads with embedded subscription history do not need. This PR fixes that measurement boundary for the campaign’s signed-in dashboard deep-link reload. Cursor presence at dispatch, full/delta/not-modified bytes, the real long-transcript Gateway run, and the 11-pair performance gates remain follow-up work; there are no before/after latency claims or per-pair results for this test-only stage. No private captures or content are included.

Follow-up uncovered by the faithful fixture

On direct entry with a truncated assistant message, a held chat.message.get reply can outlive the transition from displayed session identity to the authoritative roster row. The full-message loader rejects that earlier scope, and subsequent unconfigured fixture replies show the recovery error. This reproduced with both an explicit canonical row and the original scenario; canonical row data alone does not remove it. The search test now starts after actual roster admission, so it continues proving expansion retention across filtering without claiming to cover boot ordering. Production recovery and a real Gateway reproduction remain follow-up work; this PR does not change the freshness guard or claim a production fix.

@clawsweeper

clawsweeper Bot commented Oct 25, 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 app: web-ui App: web-ui scripts Repository scripts size: L labels Oct 25, 2026
@steipete steipete changed the title experiment(control-ui): subscription fixture fidelity [do not merge] fix(control-ui): align reload fixtures with subscribed history Oct 25, 2026
@steipete
steipete marked this pull request as ready for review October 25, 2026 20:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 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-26T00:08:37.518235Z 259dd12 New commits
ℹ️ 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 25, 2026
@clawsweeper

clawsweeper Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR serves initial history through mock subscriptions and updates browser tests and reload instrumentation to recognize that transport.

Example: Open agent:ops:notes with the transcript “Cached conversation.”

  • Before: The mock subscription returns only the session key, forcing a standalone chat.startup request.
  • After: The subscription includes the requested transcript in initialHistory.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused fixture repair with resolved prior findings and green exact-head validation; evidence remains primarily automated harness coverage.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored fixture and benchmark change is outside the ordinary contributor proof gate; focused contracts and successful exact-head browser CI support its scope, while inspected linked images show an earlier Activity change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Browser tests and reload measurements exercise an unnecessary standalone history request instead of the current Gateway path.
Reason: The maintainer-authored direction restores fixture fidelity without changing runtime behavior or claiming a latency improvement.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs a current fixture mismatch, resolves all three prior findings, and introduces no new actionable defect.

Priority: P2
Reviewed head: 403a89aa29b381a6e391fd6ae44702d57b1fa580

Before merge

None.

Findings

None.

Agent review details

How this fits together

The browser fixture supplies simulated Gateway responses to the real Control UI, while the reload probe observes responses and records transcript catch-up milestones.

flowchart LR
Browser[Control UI browser] --> Subscription[Message subscription]
Subscription --> Fixture[Subscription fixture]
Fixture --> Startup[Existing startup response owner]
Startup --> History[Initial history receipt]
History --> Browser
History --> Probe[Reload milestone probe]
Loading

Technical review

Best possible solution:

Use the existing startup-response owner for subscription history while preserving explicit standalone-fallback tests and transport-aware assertions.

Do we have a high-confidence way to reproduce the issue?

Source establishes that main omits requested subscription history despite the Gateway contract; the PR reports red-on-base regressions, and exact-head CI passes without running target code during this review.

Is this the best way to solve the issue?

The change reuses existing response and subscription owners, preserves fallback controls, and adds focused contracts for nested success, failure, cursor selection, and observer-only responses.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 201127429a03.

Provenance checked

  • Subscription fixture response keeps the original intent (8279835: Model actual scoped subscriptions and event delivery, as recorded in perf(ui): scope live streams and collect Activity only while open #158574; adding the current history contract preserves that purpose.)
  • Static transcript projection keeps the original intent (da4ae86: Supplied provenance and the base implementation establish that configured transcript fields serve startup as well as history; relocation preserves the same fields and exclusions.)
  • Reload catch-up milestone keeps the original intent (ffcb0a8: The probe measures cached-conversation reload handoff; recognizing subscription-carried history preserves its original measurement purpose.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ffcb0a8 adds scripts/lib/control-ui-warm-reload-probe.ts:65 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:42 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

PR surface statistics unavailable: the file list is incomplete.

Labels

Label changes:

  • 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.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The fixture and measurement mismatch merits normal-priority repair without affecting deployed user 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.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-25T21:01:37.743Z sha 75f797e :: needs changes before merge. :: [P2] Migrate the reconnect test to subscribed history | [P2] Preserve standalone history coverage for canonical replacement | [P2] Wait for readiness the auth-error fixture can actually reach

Reviewed October 25, 2026, 6:22 PM ET / 22:22 UTC (Revision 2).

@steipete
steipete force-pushed the steipete/coldload-warm-history-payload branch 2 times, most recently from 684a659 to 403a89a Compare October 25, 2026 21:41
@steipete

Copy link
Copy Markdown
Contributor Author

Addressed all three P2 findings on 403a89aa29b381a6e391fd6ae44702d57b1fa580: reconnect counts initial history while preserving its navigate-away negative control; canonical replacement counts both valid history transports; and the auth-error fixture declares a consistent active run.

Exact-head CI is green. AWS cbx_b9fab6b0ee67 (c7a.4xlarge) passed the 10 fixture contracts, four probe browser tests, and all eight targeted consumer cases. The separate full UI suite is still running; the PR body records that gap and the uncovered boot-time full-message scope transition.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 25, 2026
@clawsweeper clawsweeper Bot added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Oct 25, 2026
@steipete
steipete force-pushed the steipete/coldload-warm-history-payload branch from 403a89a to 259dd12 Compare October 26, 2026 00:06
@steipete
steipete merged commit b4bd4b6 into main Oct 26, 2026
116 checks passed
@steipete
steipete deleted the steipete/coldload-warm-history-payload branch October 26, 2026 00:27
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
…claw#183832)

The Control UI mock Gateway answered sessions.messages.subscribe with only the canonical key, even when the request asked for initialHistory. Since openclaw#182846 the real Gateway returns the initial transcript inside the subscription reply, so the fixture forced a fallback chat.startup round trip that production no longer makes. Every reload benchmark and browser test therefore measured an outdated request chain.

The mock subscription now builds initialHistory from the existing startup-response owner when requested, matching the Gateway contract. Scenarios that exercise the separate chat.startup fallback opt in with subscriptionInitialHistory: false. Browser tests wait on subscription readiness instead of the removed standalone history request, and the warm-reload probe recognizes the subscribed-history transport.

Test and tooling only; no runtime code changes. Exact-head CI green; focused fixture and probe tests plus native e2e of the rebased files pass; full AWS UI suite earlier: 3,275 passed, 2 failures reproduced on main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L 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