Repository navigation
perf(gateway): throttle sidebar narration updates - #160002
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 28, 2026, 9:14 AM ET / 13:14 UTC (Revision 7). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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]
Decision needed
Why: The public SDK and released Gateway currently share protocol v4, so choosing a coupled rollout changes an existing upgrade expectation. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +620, Tests +1488, Docs +60, Config +6, Other +54. Total +2228 across 57 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest 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:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fd8281e23e55. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
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.
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)
|
Admin-merging: every red check on head 73dfd6d was checked against the merge base or appears on unrelated PRs.
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. |
|
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. |
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.
* 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]>
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.subscribeacceptsmode: "narration"; omission remains full. Stable optionalsubscriptionIdvalues 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.narrationtails, 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 mainfa7c9bec6f74; B is PR head2c79563759a1merged with that same main, tree1ed4835c841af2d667079f3e448176d11d572f4d(temporary measurement commit87edb1ce7b53). Both full builds passed before measurement. No production change was made for this follow-up.The Gateway process tree was launched with
taskseton 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
writev41.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.* B2 remains
completed-with-errors, not a clean run. All 280 turns and 72,800 chunks completed. Its only error is client 24'ssessions.listcanceled byharness 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 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
writevor 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.
consume(program)parseSqliteSessionEntryRecordhandleMessageUpdatestate.retirePendinghasEventScopewritevcanSendDeltaframeWithSequencewritevGenericThe 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
consumeand 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
writevfalls 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; candidate2c79563759a1, tested tree3ad6e2fb7aa908099dbcbe02b45a2e7bfb90ad47. 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
writevtime 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.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
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:deltaoragent:assistanttoken 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-drainsessions.listcancellation (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
writevorserializeFrameField; their reported totals are identical with signed or zero-clamped deltas. Those profiler artifacts remain recorded.Per-client compatibility
ui/src/components/app-sidebar-session-narration.tsdeclares narration;ui/src/pages/chat/chat-history-subscription.tsacquires full streams. Shared full owners take precedence, and a sidebar sharing one accepts full events.src/gateway/server/ws-connection/control-ui-build-admission.tsforces bundled same-origin UI matching. Older custom-root, development, and cross-origin UIs exempt from that admission retain full delivery until updated.apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatGatewayTransport.swiftusessetActiveSessionKeyfor the foreground subscription and omits mode.ChatGatewayPayloadCodec.swiftexplicitly ignores narration tails; external-run adoption remains intact.apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.ktuses broadsessions.subscribedelivery withoutsession-scoped-events.ChatController.ktkeeps foreground handling and explicitly ignores narration events.src/tui/gateway-chat.tsuses broad subscription delivery withoutsession-scoped-events; its foreground streams remain full.packages/gateway-client/src/session-subscriptions.tsowns local leases, stable IDs, timeout compensation, and acknowledged release;src/gateway/server-chat-state.tscombines independent interests. Subscribe ACKs include resolved agent ownership for later global requests.packages/gateway-protocol/src/schema/sessions.tsdefines optional intent/ID and the bounded digest; generated Swift/Android artifacts were regenerated.Validation
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.pnpm buildruns passed: baseline 7m 05s, candidate 7m 08s. Harness protocol tests passed 19/19 on each revision.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.origin/main: clean through P2.git diff --checkpassed.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.src/gateway/server-broadcast.narration.test.tssrc/gateway/server-methods/sessions.messages-subscribe-approvals.test.tspackages/gateway-protocol/src/session-narration.test.tssrc/gateway/server-methods/sessions.abort-agent-scope.test.tssrc/gateway/server-methods.canonical-validation.test.tssrc/gateway/server-methods.session-scoped-reads.test.tspackages/gateway-client/src/session-subscriptions.narration.test.tspackages/gateway-client/src/session-subscriptions.test.tssrc/gateway/server-chat-state.test.tssrc/gateway/server-chat-state.subscriptions.test.tsui/src/pages/activity/activity-page.test.tsui/src/pages/chat/chat-history-subscription-admission.test.tsui/src/pages/chat/chat-pane-history-issuance.test.tsui/src/pages/chat/chat-history.test.tsui/src/components/app-sidebar-session-narration-retry.test.tsui/src/components/app-sidebar-session-narration.test.tsui/src/lib/sessions/index-subscriptions.test.tsBaseline comparison:
server-chat-state.test.ts3.66 s versus candidate 3.91 s;sessions.messages-subscribe-approvals.test.ts20.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
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
2cd170c68a28ffixes a stale lookup-count assertion inserver-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
a8801989fca9passed 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
3ac8cbcc5b99preserves the PR history and merges mainc3dc06d3738f. The sole text conflict wasui/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.startupissuance. 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-othertype graph above its local 720-root limit. While validation ran, main landed the canonical UI-component split52ae7e314dc; commit166e3f010165applies 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-linesfailure inui/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 iscd7452d6c0f412e61e1122fc67dcf94335ed3bbaa60ed0952c0923c5355e38b1on 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
73dfd6d9877repairs 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.mode: "narration"; exercisesession.narrationthrough the mounted sidebar while retaining prose, accessibility, and end-of-run cleanup assertions.subscriptionIdon both exact requests. Restored observation, transcript contents, approval intent, and cleared error 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(revision6b9148b17). The materialized source tree wasd614c3b92b4c67b1a2e89504a86f5d28ed6dc12d, matching the pushed commit.The complete CI owner was
node --import tsx scripts/ci-run-node-test-shard.mts, withOPENCLAW_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 canonicalbun-compatiblepartition 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 confirmedshard: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 initialfalsenotification. 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=1wall 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_01m3kygr0yzbzw23px8we9jemkis 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
73dfd6d9877427ee61be664ba936f3dc0556024dwith merge basec3dc06d3738fd88d432d074333f41e19baed64e9on one Blacksmith Testbox, using separate source/dependency checkouts. No source changes were made, and the PR head and auto-merge settings remain unchanged.qaRuntimepreparationAI 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 setsOPENCLAW_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, thenOPENCLAW_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.listroster and durableprogressCardstate, 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 usingnode 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
sessionsseed 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 supplieshasActiveRun. 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_01m3m35fkrf0ejpps5g095nrbnis stopped. This is comparison evidence, not a claim that the PR's failed CI jobs passed.