Repository navigation
fix: preserve global board ownership from pinning to notifications - #138675
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 10:47 PM ET / September 5, 2026, 02:47 UTC. ClawSweeper reviewWhat this changesPreserves the selected agent when pinning dashboard widgets and directs board updates and gallery notifications to the viewers of the correct session. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful, focused repair: inspected main still loses ownership at both boundaries, and the updated acceptance evidence addresses the earlier proof concern. No blocking correctness findings were established in the pinned patch. Priority: P1 Review scores
Verification
How this fits togetherSession dashboards store widgets in the owning agent’s database. Agent tools and dashboard requests enter through the Gateway, which resolves ownership, changes the board, and sends notifications through session-access filtering. flowchart TD
A[Agent widget tool] --> C[Gateway board methods]
B[Dashboard requests] --> C
C --> D[Canonical session and agent]
D --> E[Owning agent database]
E --> F[Board and gallery notifications]
D --> F
F --> G[Current session access checks]
G --> H[Authorized dashboard viewers]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +12, Tests +174. Total +186 across 5 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Carry the prepared owner through the existing board request, storage resolution, and private notification scope while preserving public payloads; the small production increase supplies those existing scope arguments without adding another resolver or migration. Do we have a high-confidence way to reproduce the issue? Yes: current source establishes both the ownerless global pin and projected-key recipient collision, and the supplied failing-base/passing-head regressions exercise those paths. No tests were executed during this read-only review. Is this the best way to solve the issue? Yes: this repairs the two producers using existing owner-aware contracts. Reinterpreting display keys downstream or introducing another storage/API path would duplicate ownership resolution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6832f3b61ebc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
|
@clawsweeper re-review The scope now also repairs the |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Forward the host-prepared agent to the existing board request so raw global sessions pin and refresh widgets in their owning board. Cover explicit ownership, retained Main compatibility, and ordinary qualified sessions.
9151978 to
bc3cdc2
Compare
|
Merged via squash.
|
…penclaw#138675) * fix: deliver global board updates to their session viewers * fix: retain the session owner when pinning widgets Forward the host-prepared agent to the existing board request so raw global sessions pin and refresh widgets in their owning board. Cover explicit ownership, retained Main compatibility, and ordinary qualified sessions.
* refs/remotes/origin/main: (602 commits) fix(plugins): trace trust refusals and repair legacy provenance (openclaw#138746) perf(sqlite): reuse compiled plugin state point reads (openclaw#138758) refactor: type chat prefetch dependencies and clean loading tests (openclaw#138793) ci: reduce Doctor test startup and core lint jobs (openclaw#138796) feat(update): retain run history and share outcome reports (openclaw#138690) chore(deps): update @openclaw/fs-safe to 0.8.1 (openclaw#138500) fix: preserve global board ownership from pinning to notifications (openclaw#138675) fix(gateway): deliver session catalog updates from slow hosts (openclaw#138674) perf(sessions): index pending conversation replies (openclaw#127182) perf(auth): reuse ordered provider alias entries (openclaw#138805) docs(diagnostics): clarify whole-process CPU metrics (openclaw#138804) perf(memory): narrow source reads and stream embedding cache rows (openclaw#138766) fix: allow older source on newer Testbox checkouts (openclaw#138782) fix(agents): preserve recovered task progress and lifecycle ownership (openclaw#138785) perf(codex): reduce rollout tail scan CPU (openclaw#138784) perf(gateway): stop projecting history deltas at the byte budget (openclaw#138655) fix(build): bound native declaration inputs to checkout (openclaw#138742) fix(cli): preserve foreground Gateway argument handling (openclaw#138765) fix(ui): align task toolbar with side-panel tabs (openclaw#138769) fix(logbook): drain accepted work before closing SQLite (openclaw#138754) ... # Conflicts: # src/agents/embedded-agent-runner/compact.queued.ts
Additional instructions
This is a maintainer-owned branch in the same repository.
What Problem This Solves
An agent pinning a widget from its global session could report success while writing it to Main's board. With explicit ownership and no retained default owner, the same action failed as ownerless. Board viewers could also miss updates or receive another session's gallery metadata when a global board and an ordinary session shared an outward-facing event key.
Why This Change Was Made
The prepared session owner was lost at two boundaries.
show_widgetkept its agent identity in the constructor but omitted it from the existing board request. The board handlers correctly resolved the storage owner, then used the projected event key for recipient filtering and gallery notifications.The tool now forwards its existing host-prepared agent. Board notifications carry the resolved canonical key and agent into the existing private broadcast and session-change contracts. The public event payload stays unchanged. This keeps one resolution path and avoids trying to recover ownership from an ambiguous display key.
User Impact
Pinned widgets stay on the selected agent's board. Live board updates and gallery refreshes reach that board's viewers, including when another session shares its projected key. Existing ordinary sessions, content-kind checks, widget approvals, and no-op behavior remain covered.
Current validation
Rebased onto
c57e36320e0cd19f1026ff6b36659b6976168d46after main migrated broadcaster clients toGatewayClientRegistry. Both original board ownership cases and all upstream fixture changes are preserved. The board and widget production files are byte-identical to the earlier reviewed head. Current PR head:bc3cdc2e873bfc5a173cdc8459098c1840b06ba7.The refreshed candidate passed 204 tests across 13 files, both targeted actual-source typechecks, type-aware lint, formatting, and two independent review passes with no actionable findings. A new isolated Gateway WebSocket run passed all 38 authenticated requests across four peers; all six ownership and no-op controls matched, and sockets, listener, and the owned process group closed. The first attempt stopped before application startup because an isolated home changed Git diff formatting; deterministic proof metadata resolved that fixture issue without changing application code or weakening assertions.
The earlier UI captures and their stated limits remain evidence for their recorded source. The new WebSocket run covers integration with the updated broadcaster. CI on the current head passed, including the required
openclaw/ci-gate. This completes the latest ClawSweeper requests to preserve the canonical client registry during conflict resolution and validate the refreshed ownership regressions. The prior green CI remains attributed to91519785d603ddfc9e5164b871dbb4ef166514a4.Earlier reproduction and UI evidence
The board regressions fail on the unchanged base and pass in both global and per-sender modes. They exercise real handlers, SQLite, profile authorization, and the broadcaster with recording sockets. All 131 focused handler, broadcaster, store, sharing, session-change, and UI board-provider tests passed on the original three-file board change.
The expanded widget regression independently failed for both Research/global cases while qualified Main passed. With the producer repair, all 34 tests across the five widget suites passed, covering creation, refresh, grants, scheduled authoring, presenters, and prompt contracts. Actual-source types (10,781 inputs), type-aware lint, formatting, and a fresh independent P0–P2 review of the complete five-file diff passed. The first type-check attempt used an external config and could not locate Node types; the existing in-repo configuration passed without source or dependency changes.
A separate real default-tool → in-process Gateway router → canonical SQLite replay passed under explicit ownership and retained-Main compatibility. Research/global received the pin, Main/global remained empty at revision zero, and all six owner-aware board, ordinary-session pinning, and dashboard controls passed. This used a synthetic system actor; it is not human-profile WebSocket evidence.
Authenticated WebSocket acceptance passed on
5fdd5e0fa4630ef9bb92e370f3b6c33f80153b7d, whose three board files are unchanged in the expanded candidate. Three signed, paired read-only profiles and a separate admin writer completed 38 RPCs through an isolated real Gateway. Update, replacement, and approval events reached only the intended reader; gallery IDs/labels stayed with the owner; empty updates emitted nothing. Canonical SQLite revisions were 3/1/1, and all sockets, the listener, and the Gateway process closed. This live run used global mode; per-sender behavior has failing/passing broadcaster coverage.The initial public CI failure was an existing widget test expecting only two broadcast arguments. Both assertions now check the canonical owner scope in the expanded create/refresh regression. Production is +29/−17 lines (net +12 for the existing broadcast scope arguments); tests are +287/−113 (net +174, including reindentation of the table-driven widget case). The producer fix itself is net zero. No schema, configuration, dependency, public RPC, or storage representation changes.
Previously tested head:
91519785d603ddfc9e5164b871dbb4ef166514a4. Exact-head CI passed: 108 successful jobs, 17 skipped, and the requiredopenclaw/ci-gatesucceeded.The isolated Testbox browser run completed the board flow on this exact source: select Research/global, invoke the actual default
show_widgettool, reload the selected dashboard, refresh the same widget through the tool, reload again, and return to Main. Research's board advanced from revision 1 to 2 to 3, its single widget advanced from revision 1 to 2, and Main's complete stored board remained unchanged. All five browserboard.getrequests carried the selected owner and succeeded; the captures show the rendered iframe before pinning, after pinning, and after refresh. The tool was invoked through the real in-process Gateway router without model inference; browser readback used the actual listener Gateway and source Control UI. This proves durable readback; the separate authenticated WebSocket run proves event recipients.The broader browser runner exited 1 after those board assertions because one sidebar
sessions.describe({key:"global"})response was outside its error allowlist. Its caller and handler are unchanged from the PR base: the sidebar lineage lookup omits the owner, and the handler rejects the ambiguous global key. Global-session sidebar lineage owner resolution remains a separate follow-up; this PR does not claim that path fixed. The retained raw report stays failed. All 243 requests received responses; the 19 non-board errors were two progress-card requests, eleven GitHub-options requests, five unconfigured Talk-catalog requests, and that one lineage request. Progress/GitHub ownership is separate ongoing repair work; Talk was intentionally unconfigured in this synthetic two-agent fixture. No board RPC failed, no browser page error or external request was recorded, and all processes, ports, and the owned lease were closed. The scoped board result does not claim the whole UI is healthy.ClawSweeper's latest rank-up request for actual selected-board pin/refresh evidence is addressed by the captures below. The Control UI gallery itself was not exercised; gallery row identity and notification delivery are covered by the separate 38-RPC authenticated WebSocket proof above. The earlier local setup/loading failures and the first Testbox source-context failure remain retained as failed attempts.
Authenticated WebSocket recipient trace
Synthetic fixture only. Readers authenticated as three distinct operator.read profiles; a fourth operator.admin profile issued the writes. Session IDs below are the fixture rows verified after delivery. This trace projects the recorded socket frames; empty arrays mean no board or session-change frame reached that reader during the completed operation.
{"stage":"raw-global-update","received":{"raw-owner":[{"event":"sessions.changed","sessionKey":"global","agentId":"work","sessionId":"0e98f1ff-6726-4e6d-b7fe-5b1613c5727d","label":"raw-owner"},{"event":"board.changed","sessionKey":"agent:work:global","revision":1}],"ordinary-owner":[],"other-agent-owner":[]}} {"stage":"raw-global-put","received":{"raw-owner":[{"event":"board.changed","sessionKey":"agent:work:global","revision":2,"widget":"status"},{"event":"sessions.changed","sessionKey":"global","agentId":"work","sessionId":"0e98f1ff-6726-4e6d-b7fe-5b1613c5727d","label":"raw-owner"}],"ordinary-owner":[],"other-agent-owner":[]}} {"stage":"raw-global-grant","received":{"raw-owner":[{"event":"board.changed","sessionKey":"agent:work:global","revision":3}],"ordinary-owner":[],"other-agent-owner":[]}} {"stage":"empty-update","received":{"raw-owner":[],"ordinary-owner":[],"other-agent-owner":[]}} {"stage":"ordinary-qualified-control","received":{"raw-owner":[],"ordinary-owner":[{"event":"sessions.changed","sessionKey":"agent:work:global","agentId":"work","sessionId":"8ab1c614-13d0-4271-91d9-2dd44f53fafa","label":"ordinary-owner"},{"event":"board.changed","sessionKey":"agent:work:global","revision":1}],"other-agent-owner":[]}} {"stage":"other-agent-control","received":{"raw-owner":[],"ordinary-owner":[],"other-agent-owner":[{"event":"sessions.changed","sessionKey":"global","agentId":"main","sessionId":"5b67880e-d67a-49ff-98b6-3891755cdb33","label":"other-agent-owner"},{"event":"board.changed","sessionKey":"agent:main:global","revision":1}]}}Recorded runner SHA256:
d92c06f77969e0e75477eda7bf41aa4c913f3274dd674f2f05921e8137c50b17; complete local report SHA256:52201e8d84d8de8ea7cd352a69e0c2612b72ea171f5c8c263b1628cff6f5e5fd.Actual selected-board captures
These are before/after actions on the same fixed source, not before/after code screenshots. The selected agent and rendered dashboard are visible in each full capture.
Main before the Research pin
Research before pinning
Research after pinning
Research after refreshing the same widget
Main after both Research actions
Closes #138616.