Skip to content

perf(gateway): throttle sidebar narration updates - #160002

Merged
steipete merged 9 commits into
mainfrom
perf/l124-narration-digests
Sep 28, 2026
Merged

steipete merged 9 commits into
mainfrom
perf/l124-narration-digests

Conversation

@steipete

@steipete steipete commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Control UI sidebar previews receive token-level streams for background chats even though they render only one short line every two seconds, multiplying WebSocket fanout.

User Impact

Sidebar narration receives bounded, server-paced snapshots, with final text flushed before completion. Foreground streams and lifecycle/status/error/approval delivery retain their existing contracts. Bundled Control UIs adopt narration intent on upgrade; older clients that omit it keep full streams. The updated SDK's observer-ID fields require an updated Gateway.

The isolated follow-up does not reproduce the main-thread CPU regression. Clean pairs show CPU/turn −0.12% / −5.78%, frames/turn −55.20% / −58.56%, and sampled socket writes −41.57% / −40.82%. The original colocated results and one qualified cleanup-error run remain visible below. Auto-merge is managed by the coordinator.

Why This Change Was Made

sessions.messages.subscribe accepts mode: "narration"; omission remains full. Stable optional subscriptionId values keep independent interests separate when implicit/explicit addresses or the existing raw-global/qualified-global keys share a server subscription key. Any full owner wins, including pending acquisitions; releasing another owner cannot remove that interest. The legacy untagged observer remains supported.

The sidebar consumes bounded session.narration tails, with sanitization before slicing, per-session pacing, and final corrections/retractions. Foreground history follows full-stream admission so its snapshot covers prior activity. Subscription runtime loads on demand, keeping startup below the unchanged budget. No protocol-version bump or capability negotiation is introduced.

Evidence

Isolated follow-up: CPU regression did not reproduce

Three interleaved A/B pairs on one direct AWS c7a.8xlarge (32 distinct physical cores, 61.43 GiB RAM), Linux x64, Node 26.9.0 / pnpm 12.5.0. A is pinned current main fa7c9bec6f74; B is PR head 2c79563759a1 merged with that same main, tree 1ed4835c841af2d667079f3e448176d11d572f4d (temporary measurement commit 87edb1ce7b53). Both full builds passed before measurement. No production change was made for this follow-up.

The Gateway process tree was launched with taskset on CPUs 0–3. Four l150 driver processes each owned 25 clients on CPUs 8/9/10/11; the controller, mock, proxy, and observers used separate cores. Every sampled descendant process/thread mask matched its role, with no shared physical cores. Order A1→B1→A2→B2→A3→B3; 100 clients / 50 active, seed 1, 120-second admission, 30-second drain, 500–3000 ms think time, no intentional overlap, 260 word chunks at 40 chunks/s. Each trial used fresh isolated state and source-owned UI/SDK consumers. No build, sync, or artifact download overlapped load.

There is measurable digest bookkeeping, but no reproduced net main-thread CPU regression. Clean pairs 1 and 3 show CPU/turn −0.12% / −5.78%, first-delta p50 +0.54% / −6.45%, and p95 +0.08% / −11.58%. Baseline CPU observations span 2.8%; pair 1 is effectively flat. Frames/turn fall 55.20% / 58.56% and sampled writev 41.57% / 40.82%. Serialization rises 4.41% / 5.99% rather than improving. These small repeated measurements support the wire benefit without a demonstrated CPU penalty; they do not prove a production latency guarantee or eliminate smaller effects. The earlier colocated regression is not a sound basis for a speculative timer/sanitizer rewrite. Auto-merge is managed by the coordinator.

Metric A1 B1 A2 B2* A3 B3
Completed / sent 274 / 274 271 / 271 268 / 268 280 / 280 267 / 267 277 / 277
Main CPU ms / turn 498.48 497.90 507.66 486.67 512.60 482.99
First delta p50 / p95 ms 13,687.14 / 19,304.23 13,760.69 / 19,320.56 14,456.28 / 19,113.15 13,356.77 / 17,596.09 14,146.30 / 20,811.83 13,234.24 / 18,402.37
Application frames / turn 3,817.62 1,710.46 3,888.89 1,715.75 4,098.58 1,698.43
writev sampled self ms 10,272.33 6,002.50 9,930.55 6,069.04 10,378.08 6,141.56
serializeFrameField sampled self ms 1,940.04 2,025.61 1,840.22 1,996.21 1,869.31 1,981.27
Gateway ELD p99 / max ms 60.85 / 178.13 61.37 / 377.75 57.80 / 416.55 56.39 / 411.04 60.69 / 323.75 57.48 / 205.26
Peak Gateway RSS MiB 3,209.75 3,157.56 3,158.46 3,164.34 3,081.29 2,749.55
MiB / turn 9.54 8.89 9.54 8.87 9.65 8.84
Mean MiB / client / window 26.15 24.09 25.58 24.84 25.77 24.47
Captured profile seconds 120.63 120.66 120.68 120.65 120.66 120.69

* B2 remains completed-with-errors, not a clean run. All 280 turns and 72,800 chunks completed. Its only error is client 24's sessions.list canceled by harness cleanup, 677.54 ms after Gateway drain-end and 655 ms after the final wire snapshot; the 2.83 ms RPC itself also began after the measured windows. B2's normalized entries are explicitly descriptive arithmetic, excluded from strict clean-pair headlines. Its descriptive pair changes are CPU/turn −4.13%, first-delta p50 −7.61%, p95 −7.94%, frames/turn −55.88%, and bytes/turn −7.05%. No run was discarded or replaced.

CPU/turn uses exact main-thread user+system counter differences from load-start through drain-end. Frames and application-payload bytes use atomic cumulative receive snapshots across load plus drain; worker phase timestamps remain recorded. Profiles cover approximately 120.6 seconds around the load window, so sampled self-time is stack occupancy, not whole-turn CPU accounting. ELD uses load. Bytes/client is throughput-sensitive; bytes/turn is the normalized comparison. RSS changes are mixed (−1.63%, +0.19%, −10.77%); the original ~16% memory reduction is not a stable claim from this follow-up.

Delivery class A1 B1 A2 B2* A3 B3
Selected events 183.05 183.50 182.34 184.07 181.87 184.18
Narration events 2,508.77 403.91 2,588.75 424.15 2,807.45 392.91
Roster-only events 1,083.91 1,079.03 1,076.41 1,066.71 1,064.58 1,081.55
Unscoped events 4.39 3.69 3.73 3.93 3.75 3.62
RPC responses 37.50 40.34 37.66 36.89 40.93 36.17

Delivery classes describe each event's recipient interest, not fixed client populations; RPC responses are counted separately. Candidate narration recipients receive zero assistant/thinking token streams. All 100 clients in each candidate consume digests and publish narration lines. All 1,637/1,637 admitted turns have unique complete receipt/ACK/first/final joins; all 425,620 expected chunks settled, with no proxy errors/aborts, disconnects, correlation ambiguity, affinity violations, or child/state cleanup failures.

Each driver used 36.15–39.25% of one core on average, versus the saturated single driver in the earlier campaign. Driver ELD p99 is 20.82–28.57 ms, though occasional maxima reach 644.87 ms; this is not a zero-stall claim. The controller used about 1.4%. Gateway main-thread utilization remains about 99.5%, so substantial server work remains.

The retained server diagnostic measures Gateway receipt→first full-chat emission to any recipient (background recipients are eligible in A but suppressed in B); it is not a selected-view latency. Comparable foreground latency is the selected-client first-delta column above. Server p50/p95 ms: A1 13654.85/19289.65, B1 13725.76/19177.34; A2 14438.25/18950.33, B2 13327.15/17434.34; A3 14104.74/20652.37, B3 13175.54/18243.45.

Both per-ref preflights passed 22/22 harness tests, plus four drivers completing 4/4 turns and 1,040/1,040 chunks with verified affinity (0.37 s per test command). Full builds passed in 6m53s / 6m51s, with the same existing CSS advisory on both. Six tiny signed V8 intervals total −18 µs; none affects writev or serialization totals. All 97 downloaded manifest entries and the archive hash verified: 1b43ce2b5479b9622a55aa6dbb249911a93e6a57944774d17c2fe40fa326c8fe. The AWS lease is released, cleanup is complete, and no provisioned resource remains. Original product gates and compatibility evidence below still apply; no source changed in this follow-up.

Function-level attribution from the original A/B profiles

Self-time below assigns signed sample weights to leaf functions. Identities normalize compiled build suffixes; native/program aggregates and JIT attribution are not exact per-function CPU counters. Captured windows differ from whole-turn CPU windows. The full diff retains exact source locations and per-profile-second/per-turn normalization.

Function / owner A1 → B1 sampled self ms A2 → B2 sampled self ms
Narration consume 0 → 525.67 0 → 395.29
Native (program) 2228.15 → 2415.04 2319.04 → 2539.19
parseSqliteSessionEntryRecord 1144.77 → 1229.01 1171.27 → 1367.94
handleMessageUpdate 339.24 → 501.68 450.83 → 507.56
state.retirePending 0 → 86.28 0 → 70.49
hasEventScope 265.42 → 338.10 249.81 → 328.36
writev 5730.91 → 3567.14 6143.20 → 3731.58
canSendDelta 383.28 → 46.90 450.88 → 31.04
frameWithSequence 238.07 → 134.78 261.79 → 137.63
writevGeneric 255.06 → 173.65 281.72 → 183.20

The complete digest owner contributes 834.91 / 594.44 ms self (2.80 / 1.86 ms per completed turn). Its inclusive subtree is 1339.96 / 1129.93 ms, including actual outgoing socket writes; inclusive values overlap and are not net overhead. Direct timer-runtime self beneath digest frames is 104.61 / 101.10 ms; complete text projection is 52.21 / 76.88 ms inclusive, with named extraction/sanitization/slicing only 9.04 / 10.68 ms self. Server subscription-registry named self rises 77.69→109.64 / 69.53→108.49 ms. The main new sampled work is per-recipient consume and pending-state bookkeeping, not re-sanitization. The SDK coordinator runs in the driver, outside these Gateway profiles. Socket and full-stream framing savings exceed those named additions; distributed runtime/row-processing changes and mixed GC signs prevent attributing the old total-CPU regression to them.

On the new isolated profiles, the freshly identified digest-owner self-time is 710.43 / 435.26 / 464.36 ms for B1/B2*/B3 (2.62 / 1.55 / 1.68 ms per completed turn, B2 descriptive). Direct timer-runtime self is 100.79 / 69.06 / 85.96 ms; full text projection is 46.73 / 50.28 / 36.23 ms inclusive. These are small measurable costs, while writev falls by 4269.83 / 3861.51 / 4236.52 ms. The timing probe's own WebSocket-send observer also loses about 298 / 351 ms sampled self in clean pairs 1/3 because fewer frames traverse it; tiny CPU changes are at instrumentation/noise scale. No uninstrumented production-speedup claim is made.

Original colocated four-core evidence (retained)

Two sequential A/B pairs on one Blacksmith Testbox: four reported CPUs, Linux, Node 26.9.0, pnpm 12.5.0, 100 WebSocket clients / 50 active, 120-second admission windows, seed 1, 25 ms mock word pacing, fresh isolated state per trial. Baseline 6339798c5e90; candidate 2c79563759a1, tested tree 3ad6e2fb7aa908099dbcbe02b45a2e7bfb90ad47. Both revisions use their real sidebar controller and SDK coordinator in the receiver; there are zero real browsers or live-provider calls.

Frames per completed turn fell 51.9% / 55.0%, sampled writev time 37.8% / 39.3%, and bytes per turn 3.2% / 6.8%. Serialization was approximately flat. Roster traffic remains the dominant byte cost; no total-CPU or responsiveness speedup is claimed.

Metric A1 baseline B1 digest A2 baseline B2 digest
Completed / sent 332 / 332 298 / 298 312 / 312 319 / 319
Application frames / turn 3553.17 1708.86 3758.07 1691.52
Main CPU ms / turn 372.20 432.97 400.51 404.79
writev sampled self ms 5730.91 3567.14 6143.20 3731.58
serializeFrameField sampled self ms 1418.70 1418.08 1393.78 1454.52
First delta p50 / p95 ms 7991.13 / 12292.22 10757.72 / 15204.16 8793.99 / 15549.69 9415.24 / 12628.89
ELD p99 / max ms 49.81 / 264.50 58.06 / 219.15 53.05 / 396.89 49.41 / 201.72
MiB / turn 8.75 8.47 8.90 8.29
Mean MiB / client 29.06 25.24 27.77 26.46
Mean MiB / active client 29.33 25.51 27.96 26.82
Mean MiB / passive client 28.78 24.97 27.58 26.09
Peak Gateway RSS MiB 3040.39 2492.52 3224.81 2766.73
Captured profile seconds 125.07 129.17 128.23 131.15

Frames and application-payload bytes cover load plus drain, excluding setup/cleanup; CPU per turn uses main-thread user+system time over the same phases. ELD uses load. Profile samples include the captured control boundary (about 0.4 s before and 4.5–8.2 s after load), so sampled milliseconds are not whole-turn CPU counters. Bytes/client is a window total and is throughput-sensitive; bytes/turn supplies its normalized comparison. Receiver contention and profiling overhead apply to both revisions; two pairs are not a production latency forecast.

Frames per turn by recipient class

Delivery class A1 B1 A2 B2
Selected 188.72 187.70 187.60 189.34
Narration 2255.94 406.85 2461.56 393.65
Roster only 1064.70 1070.54 1064.93 1064.46
Unscoped events 3.01 3.36 3.23 3.14
RPC responses 40.80 40.40 40.76 40.93

These are per-event recipient classes, not fixed client populations: one connection can select one session and narrate others. RPC responses are separate. Candidate narration recipients received zero chat:delta or agent:assistant token frames; all 100 clients received digests and published narration lines. All 1,261 admitted turns completed, with no disconnects, stream-integrity failures, pending/unattributed executions, or process/state cleanup failures. B1 retains one exact post-drain sessions.list cancellation (harness cleanup); it is recorded as completed-with-errors, not silently discarded.

The independent raw audit reconciled workload/source identity, turns, frame/byte totals, and cleanup. Its only findings were six tiny negative V8 sample deltas totaling 24 µs across four profiles (1 / 1 / 2 / 20 µs). None belongs to writev or serializeFrameField; their reported totals are identical with signed or zero-clamped deltas. Those profiler artifacts remain recorded.

Per-client compatibility

  • Web: ui/src/components/app-sidebar-session-narration.ts declares narration; ui/src/pages/chat/chat-history-subscription.ts acquires full streams. Shared full owners take precedence, and a sidebar sharing one accepts full events. src/gateway/server/ws-connection/control-ui-build-admission.ts forces bundled same-origin UI matching. Older custom-root, development, and cross-origin UIs exempt from that admission retain full delivery until updated.
  • iOS/macOS: apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatGatewayTransport.swift uses setActiveSessionKey for the foreground subscription and omits mode. ChatGatewayPayloadCodec.swift explicitly ignores narration tails; external-run adoption remains intact.
  • Android: apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt uses broad sessions.subscribe delivery without session-scoped-events. ChatController.kt keeps foreground handling and explicitly ignores narration events.
  • TUI: src/tui/gateway-chat.ts uses broad subscription delivery without session-scoped-events; its foreground streams remain full.
  • SDK/protocol: packages/gateway-client/src/session-subscriptions.ts owns local leases, stable IDs, timeout compensation, and acknowledged release; src/gateway/server-chat-state.ts combines independent interests. Subscribe ACKs include resolved agent ownership for later global requests. packages/gateway-protocol/src/schema/sessions.ts defines optional intent/ID and the bounded digest; generated Swift/Android artifacts were regenerated.

Validation

  • Full pnpm check:changed: passed, 31m 27s, including core/UI type checks, broad lint, guards, Android ktlint, and selected CI-contract tests. No touched-file TypeScript lint/type warnings. SwiftLint is unavailable on Linux and remains covered by macOS CI.
  • Focused passes: 60 SDK/protocol tests, 141 Gateway tests, 158 UI tests. Cases cover ownership collisions, rollback/release/reconnect, hidden text, two-second delivery, final corrections/retractions, foreground admission before history, disposal, and crypto fallback. Final individual-file runs below also passed.
  • Both pnpm build runs passed: baseline 7m 05s, candidate 7m 08s. Harness protocol tests passed 19/19 on each revision.
  • Final pnpm ui:check-performance: passed, startup JS 370,078 B gzip against unchanged 371,581 B enforcement limit; seven initial requests. Existing CSS advisory is unchanged and below its hard ceiling. No budgets/baselines were relaxed.
  • Required branch-mode Codex autoreview against origin/main: clean through P2. git diff --check passed.

Native compatibility is source analysis and protocol generation, not a native app execution claim. This changes transport/ownership, with no visual design change; controller and pane-boundary assertions cover the displayed line and admission behavior. Testbox hosting run was stopped after proof. Its hosting Actions run reports failure with no failed step after external lease teardown; the separate validation/benchmark command and selected gates exited 0. This is not the PR CI run. GitHub CI timings will be available after publication.

Measured test cost (single worker, wall time)

Gateway files use pnpm test <file> --maxWorkers=1; UI files use the unit project. SDK/protocol files use the repository Vitest wrapper with its gateway-client config. These are command wall times, including transform/startup, not just assertion durations. Shared test-support cost is included in its consuming SDK suites.

Suite / file Candidate wall seconds
src/gateway/server-broadcast.narration.test.ts 2.89
src/gateway/server-methods/sessions.messages-subscribe-approvals.test.ts 22.57
packages/gateway-protocol/src/session-narration.test.ts 1.80
src/gateway/server-methods/sessions.abort-agent-scope.test.ts 28.43
src/gateway/server-methods.canonical-validation.test.ts 25.75
src/gateway/server-methods.session-scoped-reads.test.ts 30.17
packages/gateway-client/src/session-subscriptions.narration.test.ts 1.57
packages/gateway-client/src/session-subscriptions.test.ts 2.24
src/gateway/server-chat-state.test.ts 3.91
src/gateway/server-chat-state.subscriptions.test.ts 2.57
ui/src/pages/activity/activity-page.test.ts 1.88
ui/src/pages/chat/chat-history-subscription-admission.test.ts 1.79
ui/src/pages/chat/chat-pane-history-issuance.test.ts 4.77
ui/src/pages/chat/chat-history.test.ts 1.33
ui/src/components/app-sidebar-session-narration-retry.test.ts 1.11
ui/src/components/app-sidebar-session-narration.test.ts 1.81
ui/src/lib/sessions/index-subscriptions.test.ts 1.26

Baseline comparison: server-chat-state.test.ts 3.66 s versus candidate 3.91 s; sessions.messages-subscribe-approvals.test.ts 20.68 s versus 22.57 s. CI-specific seconds are pending the first PR run.

Three pinned-base fixture failures were repaired with the exact already-landed changes from #159836 (0b6f02faae37), kept in a separate prerequisite commit with human contributor credit. They remove an unreachable ACP branch, preserve the read-owner argument, and await completion before its committed callback.

LOC delta

Category Added Removed Net
Production, 23 files 894 265 +629
Build configuration, 3 files 7 0 +7
Generated protocol, 2 files 40 1 +39
Documentation, 1 file 60 0 +60
Tests and shared test support, 17 files 1561 116 +1445
Prerequisite test repairs, 3 files 4 7 −3

The production growth covers server pacing/ownership, SDK lease precedence, and the foreground admission boundary. UUID generation remains one shared implementation.

CI follow-up after the main merge

Commit 2cd170c68a28f fixes a stale lookup-count assertion in server-broadcast.board.test.ts; production behavior is unchanged. The visible chat path now performs one shared subscription-admission lookup plus narration intent reads for the two eligible recipients. The exact one-lookup assertion now runs after draft/incognito visibility is revoked, where the sharing guard prevents narration from running. The test still checks shared lookup reuse across 33 scoped clients, delivery only to the intended recipients, live visibility revocation, and event sequencing. Test delta: +3/−1 lines; no new test cases.

On one Blacksmith Testbox, the original file reproduced the two CI failures (20 passed / 2 failed, 45.25 s command wall). The repaired file passed 22/22 (31.99 s), and seven sibling broadcast/narration suites passed 120/120 (27.75 s). The board file retains real SQLite/session-sharing revocation fixtures; transforms account for 68% of its Vitest wall time, and this change adds no cases. These before/after wall times are validation costs, not a performance improvement claim.

The scoped changed gate against merged head a8801989fca9 passed in 4m48s, including Gateway-server test types, formatting, guards, and changed-file lint with 0 warnings / 0 errors. Fresh Codex review is clean through P2. The Testbox hosting run was stopped after the proof command exited 0; this is separate from PR CI. Auto-merge settings were left unchanged.

Main merge and conflict validation

Merge commit 3ac8cbcc5b99 preserves the PR history and merges main c3dc06d3738f. The sole text conflict was ui/src/pages/chat/chat-pane-context.ts: keep main's removal of the duplicate same-client reconnect history refresh, while retaining this PR's early route resolution and full-stream subscription admission before pending history resumes. The normal startup path remains the single history-refresh owner. Main's detached-subscription cleanup retries and this PR's admission/generation fences both remain intact.

Main's updated reconnect regression assumed synchronous chat.startup issuance. It reproduced with zero requests before subscription admission; the test now awaits the real admission promise, then retains the exact one-startup and deferred post-commit hydration assertions. No sleep or polling was added. Protocol schemas and generated Swift/Kotlin artifacts were untouched by the merge, so no regeneration was needed.

The initial changed gate found the existing ui-other type graph above its local 720-root limit. While validation ran, main landed the canonical UI-component split 52ae7e314dc; commit 166e3f010165 applies that exact upstream patch. All four files match upstream byte-for-byte. The final counts are 431 ui-other / 438 ui-chat / 290 ui-components, with complete, exactly-once root ownership and unchanged limits. No narration-specific exclusion or budget exception remains.

Focused proof on the merged source passed 60 SDK/protocol tests, 201 Gateway broadcast/board/narration/ownership/presence/ancestor tests, and 196 UI narration/history/admission/disposal/reconnect tests. The canonical type-shard suite passed 35/35 after the upstream split. Fresh Codex reviews of the merge tree and final upstream patch are clean through P2.

The full changed gate is not wholly green: core lint reports the inherited max-lines failure in ui/src/lib/sessions/session-roster-observations.ts (713 counted lines; limit 700). The file and lint rules are unchanged from pinned main; the file SHA-256 is cd7452d6c0f412e61e1122fc67dcf94335ed3bbaa60ed0952c0923c5355e38b1 on both. No suppression or limit change was introduced. All core, UI, and root-test typechecks passed, as did i18n, dead-export checks, formatting, and the other core lint stripes. After the upstream split, the affected UI type graphs, script/root types, and every remaining canonical gate phase were completed separately: UI styles, script/root lint, Android ktlint, macOS tooling tests, native-state, database, media, sidecar, import-cycle, webhook, and pairing guards all passed. SwiftLint remains unavailable on the Linux host and was explicitly skipped by the gate. This is not a claim that the inherited lint error passed.

Measured single-worker command cost: the changed reconnect suite passed 20 tests in 8.59 s; the existing type-shard suite passed 35 tests in 82.55 s, with 70% of Vitest wall time spent transforming its compiler/process fixtures. No additional test case or process launch was added to that suite. SDK/protocol took 7.26 s; the Gateway group 71.58 s; the other UI group 12.49 s.

The Blacksmith Testbox hosting run is completed and the lease is stopped. The final tested tree is 66e6b967eb0bf14ff3d36e8d1ca63c3080ad1d46, matching the pushed commit. Auto-merge settings were left unchanged. Earlier performance measurements remain bound to their explicitly recorded revisions.

Complete UI CI follow-up

Commit 73dfd6d9877 repairs stale fixtures exposed by the narration/full-stream admission contract. No product change was required. The existing behavioral assertions remain intact; no sleeps, retries, timeout increases, isolation changes, or relaxed call-count assertions were added.

Reported case Classification and repair
Sidebar running-row narration Stale subscription arguments: expect mode: "narration"; exercise session.narration through the mounted sidebar while retaining prose, accessibility, and end-of-run cleanup assertions.
Sidebar reconnect leases Stale subscription arguments: require narration intent for both open and background rows, including reacquisition after reconnect.
Transcript loading after subscription timeout Stale wire shape: expect the SDK-generated subscriptionId on both exact requests. Restored observation, transcript contents, approval intent, and cleared error assertions remain.
Successor history after branch-switch Stale synchronous RPC assumption: await a request-issued signal after admission, retaining the exact one-read, predecessor custody, draft preservation, and final successor transcript assertions.
Successor history after rewind Same stale timing assumption and deterministic request signal; all history assertions remain.
Successor-admitting frame with reentrant newer incarnation Stale synchronous RPC assumption: await the newer history request while retaining rejection of the stale frame and final newer-transcript assertions.
Client startup when a route alias is already canonical Stale fixture: it previously left every RPC unresolved, including required subscription admission. Hold the subscribe ACK, prove startup has not issued, acknowledge it, then assert startup on the canonical session. Navigation and connected-client assertions remain.

Validation used one Blacksmith Testbox, Node 24.19.0, pnpm 12.5.1, and the checksum-pinned Bun from .github/actions/setup-test-bun/action.yml (revision 6b9148b17). The materialized source tree was d614c3b92b4c67b1a2e89504a86f5d28ed6dc12d, matching the pushed commit.

The complete CI owner was node --import tsx scripts/ci-run-node-test-shard.mts, with OPENCLAW_NODE_TEST_CONFIGS_JSON='["ui/vitest.config.ts"]', three workers, and no file/shard filter. Full Node coverage passed 1,554 files / 24,505 tests, with 4 existing skips, in 537.14 s. The canonical bun-compatible partition with CI-supported verbose reporting passed 1,551 Bun files / 24,232 tests, with the same 4 skips, in 502.91 s; its Node-only complement passed 3 files / 273 tests in 7.68 s. Output confirmed shard:bun:ui/vitest.config.ts. The three retention files remain assigned to Node by the existing runtime owner; no coverage exclusions were added.

Focused proof also passed 192 tests in the four reported UI files, 39 UI narration/admission tests, 60 SDK/protocol tests, and 126 Gateway broadcast/board/narration tests. The scoped changed gate for the four repair files passed, including both affected test type graphs, the full UI typecheck, i18n, dead-export checks, formatting, guards, and changed-file lint with 0 warnings / 0 errors. The previously documented inherited whole-branch lint failure remains separate from this passing scoped gate. Fresh Codex review of this repair is clean through P2.

The pre-fix full Node run reproduced six reported failures across four files (24,499 passed / 6 failed / 4 skipped); the branch-switch timing case passed in that packing, while its rewind counterpart failed. The first repaired full Node run passed every reported narration case but encountered one additional intermittent failure in unchanged modal-dialog.test.ts: nested modal occlusion observed only its initial false notification. Source inspection found a synchronous notification path and a possible shared-worker module/element identity issue, but did not establish a safe fix. A complete Node reproduction attempt passed all tests, and the complete Bun run also passed that modal case. This is not a claim that the intermittent modal issue was fixed; no modal assertion, timeout, or runner configuration was changed.

Test-only delta: +50 / −25 lines, 0 new test cases, 0 production lines changed. Measured single-worker pnpm test <file> --maxWorkers=1 wall times: sidebar sessions 37.68 s, transcript loading 6.18 s, successor events 4.95 s, and chat pane 9.15 s. These are validation costs, not a speedup claim; hosted CI timing for the new commit is pending.

The Blacksmith Testbox hosting run is completed and lease tbx_01m3kygr0yzbzw23px8we9jemk is stopped. The hosting run is separate from PR CI. Auto-merge settings were left unchanged.

Packed AI and progress-widget CI comparison

Compared PR head 73dfd6d9877427ee61be664ba936f3dc0556024d with merge base c3dc06d3738fd88d432d074333f41e19baed64e9 on one Blacksmith Testbox, using separate source/dependency checkouts. No source changes were made, and the PR head and auto-merge settings remain unchanged.

Probe PR head Merge base Result
Packed AI consumer after canonical typed E2E preparation Pass Pass Runtime exports and strict external consumer types remain compatible.
Packed AI consumer after cold CI qaRuntime preparation Same TS7016 failure, 3/3 runs Same TS7016 failure, 3/3 runs Inherited CI prerequisite defect, not an export/schema regression.
Isolated progress-widget scope-change case 3/3 passed 3/3 passed CI failure not reproduced.
Complete 11-case progress-widget E2E file, preserving case order 3/3 passed (33 cases) 3/3 passed (33 cases) No demonstrated PR-caused liveness regression.

AI package: the failed CI job successfully imports the package's runtime exports, then reports TS7016 for missing compatibility declaration files. Its preparation runs pnpm build qaRuntime, which disables declarations, then sets OPENCLAW_E2E_USE_PREBUILT_DIST=1, bypassing the normal typed E2E preparation. Fresh checkouts reproduced 0 of 17 manifest-declared type-entry files present on both revisions, followed by the same missing-declaration failures in all six consumer runs. Ordinary canonical E2E preparation passes on both revisions. packages/ai, its export map and compatibility inventory, tsdown.ai.config.ts, the build/prerequisite owners, CI workflow, root dependencies, and lockfile are identical between base and head. AI does not import Gateway protocol/client code; no published compatibility export moved or disappeared. The CI preparation owner needs to supply declarations before treating this package-consumer test's output as prebuilt.

Cold reproduction used OPENCLAW_BUILD_PRIVATE_QA=1 VITEST=1 pnpm build qaRuntime, then OPENCLAW_E2E_USE_PREBUILT_DIST=1 node scripts/run-vitest.mjs packages/ai/src/package.e2e.test.ts --maxWorkers=1. Separate clean checkouts were necessary: runtime builds preserve existing declarations, so a prior typed build would mask the cold-CI failure.

Progress widget: the CI failure occurs at line 364, the first spinner assertion, before the selected-agent scope change. Its artifact shows a connected dashboard and a settled one-row roster. The widget reads liveness through its captured target's sessions.list roster and durable progressCard state, not token-level narration subscriptions. The widget, roster owner, E2E, and mock are unchanged from the base. The complete file passed three times on each revision using node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/session-progress-widget.e2e.test.ts, with no name filter. Vitest durations were 33.96 / 34.09 / 32.80 s on head and 34.73 / 30.95 / 26.48 s on base.

There is a concrete fixture inconsistency worth preserving as a follow-up: the canonical sessions seed contains only the key, while the separate main-agent roster reply says the session is running. The mock can therefore publish startup metadata without run facts; the real Gateway explicitly supplies hasActiveRun. This could make read ordering significant, but the repetitions did not establish the CI failure's exact cause. No renderer, subscription, fixture, assertion, timeout, or runner setting was changed, and passing replays are not claimed as a fix or proof that the intermittent CI failure is impossible.

Node 24.19.0 and pnpm 12.5.1 were used. The Testbox hosting run is completed; lease tbx_01m3m35fkrf0ejpps5g095nrbn is stopped. This is comparison evidence, not a claim that the PR's failed CI jobs passed.

steipete and others added 3 commits September 27, 2026 15:00
Apply the prerequisite fixture repairs already landed in 0b6f02f (#159836) so the narration comparison base can complete validation.

Co-authored-by: IWhatsskill <[email protected]>
Declare narration intent on targeted session subscriptions and pace bounded text snapshots on the server. Preserve full streams whenever any SDK owner renders a foreground transcript, and flush corrected final text before terminal events. Update bundled clients, protocol artifacts, and the event contract.
Track independent SDK observer IDs at the server so every full-stream interest survives alias collisions, rollback, and unrelated releases. Keep global requests bound to their acknowledged owner and pace distinct logical sessions separately.

Wait for foreground admission before history reads, retire stale admissions, and load subscription runtime on demand. Share the existing browser-safe UUID implementation and extend protocol and lifecycle regressions.
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL labels Sep 28, 2026
@steipete
steipete marked this pull request as ready for review September 28, 2026 01:13
@clawsweeper

clawsweeper Bot commented Sep 28, 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.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 28, 2026, 9:14 AM ET / 13:14 UTC (Revision 7).

ClawSweeper review

What this changes

The branch adds paced Gateway snapshots for background Control UI previews, with SDK subscription identities, native protocol models, documentation, and tests.

Merge readiness

⛔ Blocked before merge - 4 items remain

Current main still lacks paced sidebar narration. The merged #160186 reduces a different duplicate text stream, so this PR remains useful; its public SDK compatibility break still blocks merge.

Priority: P2
Reviewed head: 73dfd6d9877427ee61be664ba936f3dc0556024d
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong production-boundary measurements support the benefit, but the public SDK upgrade break prevents merge readiness.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The changed Gateway broadcaster and source-owned SDK/sidebar consumers ran through real WebSocket clients on Linux with a mock provider; pinned A/B traces show fewer frames and complete final receipts. This proves the new-Gateway transport path, while mixed-version upgrades remain unproven. No stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The changed Gateway broadcaster and source-owned SDK/sidebar consumers ran through real WebSocket clients on Linux with a mock provider; pinned A/B traces show fewer frames and complete final receipts. This proves the new-Gateway transport path, while mixed-version upgrades remain unproven. No stored-data contract changes.
Evidence reviewed 11 items SDK sends the new field on ordinary requests: Every SDK subscribe and unsubscribe request includes subscriptionId, including requests for the default full stream.
Current main lacks observer-ID support: The current-main subscribe and unsubscribe schemas omit subscriptionId.
Released Gateway lacks observer-ID support: The v2026.9.6 tag resolves to eb377ac; its subscription schemas also omit subscriptionId.
Findings 1 actionable finding [P1] Preserve SDK subscriptions to released Gateways
Security None None.

How this fits together

The Gateway receives chat and agent events and sends scoped WebSocket updates to subscribed clients. The Control UI uses those updates for short background previews and full selected-chat transcripts.

flowchart LR
A[Chat and agent events] --> B[Gateway subscriptions]
B --> C{Client interest}
C --> D[Paced narration]
C --> E[Full stream]
D --> F[Sidebar preview]
E --> G[Selected chat]
Loading

Decision needed

Question Recommendation
Must the updated gateway-client SDK continue subscribing to v2026.9.6 Gateways, or may SDK consumers be required to upgrade their Gateway at the same time? Preserve mixed-version subscriptions: Negotiate observer-ID support, send legacy requests to older Gateways, and prove both upgrade directions.

Why: The public SDK and released Gateway currently share protocol v4, so choosing a coupled rollout changes an existing upgrade expectation.

Before merge

  • Preserve SDK subscriptions to released Gateways (P1) - Every SDK acquire sends subscriptionId, including default full-stream subscriptions. The v2026.9.6 Gateway rejects that field under its closed schema while the protocol-v4 handshake still succeeds, so SDK-only upgrades lose live subscriptions. Negotiate support and retain legacy requests, or obtain explicit acceptance and upgrade proof for a coupled rollout.
  • Resolve merge risk (P1) - An SDK-only upgrade can stop live session subscriptions against released Gateways. The PR documents a coupled upgrade, but no explicit maintainer acceptance or mixed-version execution proof establishes that public compatibility choice.
  • Complete next step (P2) - Resolve public SDK compatibility: negotiate and retain legacy requests for released Gateways, or explicitly accept and prove a coupled upgrade.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P1] Preserve SDK subscriptions to released Gateways — packages/gateway-client/src/session-subscriptions.ts:398
Agent review details

Security

None.

PR surface

Source +620, Tests +1488, Docs +60, Config +6, Other +54. Total +2228 across 57 files.

View PR surface stats
Area Files Added Removed Net
Source 22 885 265 +620
Tests 27 1630 142 +1488
Docs 1 60 0 +60
Config 2 6 0 +6
Generated 0 0 0 0
Other 5 55 1 +54
Total 57 2636 408 +2228

Review metrics

Metric Value Why it matters
Production and test growth production net +629; test code and support net +1,476 The PR attributes production growth to pacing and subscription ownership and adds substantial behavior coverage.
Protocol additions 1 stream mode, 1 observer identity, 1 event The observer identity affects SDK upgrades even for callers that do not request narration.

Merge-risk options

Maintainer options:

  1. Negotiate observer support (recommended)
    Preserve legacy SDK requests for released Gateways and prove both mixed-version directions before merge.
  2. Own a coupled-upgrade contract
    A maintainer may explicitly accept the interruption after documenting and verifying the required upgrade.

Technical review

Best possible solution:

Negotiate observer-ID support before the SDK sends it, retain legacy requests for older Gateways, and verify both mixed-version directions while keeping paced narration for supported clients.

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

Not applicable: this is a performance enhancement. Pinned Gateway WebSocket A/B runs measure existing background fanout and the proposed reduction.

Is this the best way to solve the issue?

No. Server pacing fits the delivery owner, but the public SDK needs negotiated support for older Gateways or an explicitly accepted coupled-upgrade contract.

Full review comments:

  • [P1] Preserve SDK subscriptions to released Gateways — packages/gateway-client/src/session-subscriptions.ts:398
    Every SDK acquire sends subscriptionId, including default full-stream subscriptions. The v2026.9.6 Gateway rejects that field under its closed schema while the protocol-v4 handshake still succeeds, so SDK-only upgrades lose live subscriptions. Negotiate support and retain legacy requests, or obtain explicit acceptance and upgrade proof for a coupled rollout.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against fd8281e23e55.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded performance improvement with a material but resolvable SDK upgrade blocker.
  • merge-risk: 🚨 compatibility: The updated SDK sends an observer field rejected by the latest released Gateway on ordinary subscription requests.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The changed Gateway broadcaster and source-owned SDK/sidebar consumers ran through real WebSocket clients on Linux with a mock provider; pinned A/B traces show fewer frames and complete final receipts. This proves the new-Gateway transport path, while mixed-version upgrades remain unproven. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Gateway broadcaster and source-owned SDK/sidebar consumers ran through real WebSocket clients on Linux with a mock provider; pinned A/B traces show fewer frames and complete final receipts. This proves the new-Gateway transport path, while mixed-version upgrades remain unproven. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Resolve the SDK compatibility policy and prove both mixed-version upgrade directions.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-09-28T01:21:15.893Z sha 2c79563 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-28T05:38:19.128Z sha 2c79563 :: blocked before merge. :: none
  • reviewed 2026-09-28T05:46:38.272Z sha 94afa8d :: blocked before merge. :: [P1] Preserve subscriptions against older Gateways
  • reviewed 2026-09-28T07:22:12.931Z sha a880198 :: blocked before merge. :: [P1] Preserve subscriptions against older Gateways
  • reviewed 2026-09-28T08:03:49.558Z sha 2cd170c :: blocked before merge. :: [P1] Preserve subscriptions against older Gateways
  • reviewed 2026-09-28T12:05:22.473Z sha 166e3f0 :: blocked before merge. :: [P1] Preserve SDK subscriptions against released Gateways

@steipete
steipete enabled auto-merge (squash) September 28, 2026 05:33
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
steipete added a commit that referenced this pull request Sep 28, 2026
Pass the workflow's existing Node row budget to the changed-owner planner.
If the 150-second splitting pass exceeds it, retain the selected compact
owner rows, including plugin work, without expanding or dropping coverage.
Keep the final workflow guard and all existing row limits.

PR #160002 reproduction: 170 -> 106 non-dist rows; all 5,355 Node test
files retain their configs, environments, runner and worker policies,
concurrency, and prerequisites. A small PR including its six smoke tests
keeps its exact three-row plan. The actual workflow manifest succeeds.

Validation: regression fails on the original code; four focused regression
and workflow-handoff cases pass. Owner run: 1,362 passed, 12 skipped; three
cap-option expectations were then corrected and passed. Three unrelated
ownership assertions remain: hosted Git-tooling groups are compared with
a default-runner reference, and the hourly fixture double-counts the
device-pair doctor contract. Base and candidate Git-tooling plans match;
the hourly fixture's producers are unchanged. New regression: 88 ms in
the shared owner run; focused final invocation: 6.20 seconds wall.

Script/test typechecks, focused lint, workflow validation, docs sanity,
and independent review passed.
@openclaw-barnacle openclaw-barnacle Bot removed the agents Agent runtime and tooling label Sep 28, 2026
Narration also reads subscription intent for eligible recipients, so the
visible chat path legitimately performs three registry lookups. Check the
single admission lookup after visibility is revoked, when narration is
not entered. Preserve delivery, unrelated-recipient, visibility-revocation,
and event-sequencing assertions.
Preserve main's single reconnect history refresh and the narration branch's
early full-stream subscription admission. Await admission in the reconnect
regression before checking startup issuance, retaining the single-request
and post-commit hydration assertions.
Apply the upstream partition fix so the narration merge retains complete
root coverage within the unchanged local shard-size budget.

(cherry picked from commit 52ae7e3)
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Admin-merging: every red check on head 73dfd6d was checked against the merge base or appears on unrelated PRs.

  • checks-node-changed-1, packages/ai/src/package.e2e.test.ts (packed consumer): an inherited CI prerequisite defect. Cold CI-style builds fail 3/3 on both this head and its merge base c3dc06d with TS7016. qaRuntime leaves 0/17 declaration entries, and the prebuilt flag then skips typed preparation. Canonical typed builds pass the external consumer test on both revisions, and published compatibility exports are unchanged. It is being fixed on main separately.
  • checks-ui-e2e (4/9), session-progress-widget.e2e.test.ts (target liveness): the complete 11-case file passes 3/3 on both revisions (33/33 each). The same test also failed on perf(sessions): reduce preparation waits across sessions #160183, which does not contain this change.
  • checks-ui-e2e (1/9) Browser Talk Gemini Live, checks-node-changed-compact-small-41 help-exit.process piped-JSON drain, checks-node-changed-extensions-config-63 qa-lab scenario catalog, and checks-node-changed-2 gateway skill refresh: none of these touch narration, subscriptions or broadcast.
  • openclaw/ci-gate aggregates the above.

This head's own UI changes pass 24,505 Node and 24,232 Bun UI tests, plus focused Gateway/SDK/protocol tests, the changed gate and autoreview. The pinned isolated A/B is in the PR body: frames −55–59%, writev −41%, CPU/turn flat to −5.8%, first-delta p95 improved in all three pairs.

@VACInc

VACInc commented Sep 28, 2026

Copy link
Copy Markdown
Member

Follow-up: #160570 fixes the sidebar-overflow E2E timing race exposed by the startup/admission ordering change here. The test now waits for canonical roster hydration before measuring overflow, rather than treating the active row’s visibility as proof that the roster has arrived. This is a test-only change; it does not alter narration throttling or production startup behavior.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
Pass the workflow's existing Node row budget to the changed-owner planner.
If the 150-second splitting pass exceeds it, retain the selected compact
owner rows, including plugin work, without expanding or dropping coverage.
Keep the final workflow guard and all existing row limits.

PR openclaw#160002 reproduction: 170 -> 106 non-dist rows; all 5,355 Node test
files retain their configs, environments, runner and worker policies,
concurrency, and prerequisites. A small PR including its six smoke tests
keeps its exact three-row plan. The actual workflow manifest succeeds.

Validation: regression fails on the original code; four focused regression
and workflow-handoff cases pass. Owner run: 1,362 passed, 12 skipped; three
cap-option expectations were then corrected and passed. Three unrelated
ownership assertions remain: hosted Git-tooling groups are compared with
a default-runner reference, and the hourly fixture double-counts the
device-pair doctor contract. Base and candidate Git-tooling plans match;
the hourly fixture's producers are unchanged. New regression: 88 ms in
the shared owner run; focused final invocation: 6.20 seconds wall.

Script/test typechecks, focused lint, workflow validation, docs sanity,
and independent review passed.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
* test: align frozen-base fixtures with current lifecycle contracts

Apply the prerequisite fixture repairs already landed in 00b1e27 (openclaw#159836) so the narration comparison base can complete validation.

Co-authored-by: IWhatsskill <[email protected]>

* perf(gateway): throttle background sidebar narration with digests

Declare narration intent on targeted session subscriptions and pace bounded text snapshots on the server. Preserve full streams whenever any SDK owner renders a foreground transcript, and flush corrected final text before terminal events. Update bundled clients, protocol artifacts, and the event contract.

* fix(gateway): preserve foreground ownership across narration addresses

Track independent SDK observer IDs at the server so every full-stream interest survives alias collisions, rollback, and unrelated releases. Keep global requests bound to their acknowledged owner and pace distinct logical sessions separately.

Wait for foreground admission before history reads, retire stale admissions, and load subscription runtime on demand. Share the existing browser-safe UUID implementation and extend protocol and lifecycle regressions.

* test(gateway): expect resolved agent ownership in shared approval replay ACKs

* test(gateway): isolate the shared subscription lookup assertion

Narration also reads subscription intent for eligible recipients, so the
visible chat path legitimately performs three registry lookups. Check the
single admission lookup after visibility is revoked, when narration is
not entered. Preserve delivery, unrelated-recipient, visibility-revocation,
and event-sequencing assertions.

* ci: split UI component tests into their own core type shard

Apply the upstream partition fix so the narration merge retains complete
root coverage within the unchanged local shard-size budget.

(cherry picked from commit e7f5a85)

* test(ui): align narration fixtures with stream admission

---------

Co-authored-by: IWhatsskill <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants