Skip to content

fix: allow dashboard reads through official plugins - #150309

Merged
shakkernerd merged 9 commits into
mainfrom
fix/dashboard-plugin-reads
Sep 17, 2026
Merged

shakkernerd merged 9 commits into
mainfrom
fix/dashboard-plugin-reads

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A dashboard conversation can ask for messages from a Discord channel that its configured account is allowed to read. The request succeeds with bundled Discord but fails before provider traffic when the verified official plugin is registered externally. The host requires native channel conversation context even though the dashboard turn has no such context.

The same mismatch affects users whose operator.write permission already allows chat.send and the message tool. Requiring administrator scope for these otherwise permitted reads does not match the existing command permissions.

User Impact

Authenticated dashboard turns can use supported reads through verified official plugins under their existing chat, session participation, tool, account, destination, action, and requester permissions. Incognito sessions and fresh messages after reconnect retain their existing session rules. Providers that require native requester or workspace context continue to enforce it.

The permission belongs to the original admitted turn. Ordinary transport loss does not cancel that turn, while stopping the run, withdrawing required participation, or retiring caller authority prevents later reads. Internal re-entry, injected input, another run, and background work cannot borrow the permission. Scheduled jobs retain their own grants, including the account behavior delivered by #150278. No configuration, public SDK, wire protocol, or persisted-state format changes are introduced.

Why This Change Was Made

The authenticated Control UI handshake and external chat admission supply the source through the existing private message-action capability from #150166. It remains bound to the original run, agent, session key, and actual prepared session ID. The existing session authorization owner checks the expected original target before capturing its guard, then rereads current participation on subsequent assertions. This supports first-time session preparation without accepting a replacement session.

Local message execution and Gateway routing retain that assertion through preparation, provider requests, retries, and completion. Source-bound Gateway reads cannot replay an old result. The dispatcher consumes the permission only where host-eligible reads, adapter opt-in, and verified registration authority all agree. Private authorization is removed before plugin callbacks, and read-only tokens are withheld from unrelated writes. Integration with the landed SDK and account changes preserves their caller, account-selection, origin, and write-settlement guards.

Evidence

The tested source is ee6b99a84ca3a0743260d7d50a60cedc5f42d078, tree 92eccde3add15769c66e4d635b993a47ecbb6b96, integrated with the landed SDK and account changes. The current runtime, queued-request controls, and browser capture use this exact source. They exercise the real Gateway, signed clients, CLI child, generated MCP tool, and registered Discord provider with synthetic model decisions and provider data.

  • The current signed browser flow reads the channel metadata and messages, creates the requested automation, and retains the completed reply after a real reload. The new signed connection receives the sent session's persisted history through chat.startup; the reply is visible once, with one chat.send and no additional provider requests.
  • A non-admin participant reaches a real HTTP 429. A distinct owner removes the required membership through session.members.remove. The original socket and MCP request remain open, and the run remains pending. A new send is denied with SESSION_PARTICIPATION_REQUIRED; the original queued read then rejects before another provider request. The contrasting reconnect control completes the original read after socket loss without a new turn.
  • All 13 current session-binding cases and the production tsgo:core command pass. The preceding 3cb5b804fb1c79cdbbfd0cae52eabf457173afe9 composition passed 96 tests covering session authorization, Gateway account routing, hosted transport, registry/lifetime gates, and the missing-account credential boundary. Independent source, composition, and correction reviews are clean.
  • Retained results keep their tested revisions: e8dcd2a0f606debc36a14b0160b226a9513561e9 proves the external administrator read and matched bundled/external non-administrator parity, denied read-only scopes and disabled actions, and Incognito under its required permission. At e864971486041da16b63b48571eb880e169f246e, actual chat.abort stops the exact queued run with no second provider request. Its first abort guard remains unchanged.

Recorded diagnostics from the current live controls:

{
  "membershipWithdrawal": {
    "callerScopes": ["operator.read", "operator.write"],
    "requiredMembershipRemoved": true,
    "freshSendError": "SESSION_PARTICIPATION_REQUIRED",
    "originalRunStillPending": true,
    "originalSocketOpen": true,
    "originalMcpSignalAborted": false,
    "messageHttpRequests": 1,
    "retryHttpRequestsAfterRemoval": 0,
    "originalMcpError": "session is read-only for this connection",
    "settledQueueSize": 0,
    "settledActiveWorkers": 0
  },
  "transportReconnect": {
    "chatSendCount": 1,
    "messageHttpRequests": 2,
    "originalReadSucceeded": true,
    "settledQueueSize": 0,
    "settledActiveWorkers": 0
  }
}

Both controls have zero unexpected provider errors. The membership case confirms the run remains pending with an immediate agent.wait poll before and after removal; its first message request received the 429. The original REST request is rejected at retry, and the MCP result contains the participation error.

The browser-created account/default job preserves its definition and recorded webchat origin. Its separate scheduled Discord read correctly fails the origin restriction before provider I/O. The browser test passed; a post-run wrapper had expected missing origin. All remaining captured-data checks were completed against the observed origin, without altering the job or rerunning the browser. Original failed receipts are retained.

Current-head CI passes after one rerun on the identical CI checkout. The original Slack fixture timeout remains recorded without an assumed cause. The completed exact-head review rates the contribution Platinum (4/6), with Diamond (5/6) proof confidence and no actionable findings.

Visual evidence

Open preview

Before After
The dashboard reports a denied Discord read and confirms automation creation. After reload, the dashboard shows the fetched synthetic Discord message and confirms automation creation.

Dashboard send, completed read, and real history reload

dashboard-provider-reads-ee6b99a.webm

Visual verification

  • Baseline: a849670
  • Exact head: ee6b99a84ca3a0743260d7d50a60cedc5f42d078
  • Scenario: Use normal signed dashboard pairing, send the same synthetic Discord read and daily automation request, then reload the completed conversation.
  • Runtime/build: Real isolated Gateway and QA runtime at ee6b99a; Google Chrome for Testing 153.0.8010.12 / Playwright 1.63.0. Served assets/index-DceBHxgo.js verified against the fresh build (SHA256 f6d4cca245b47bc4ecaf424f149de779aefcee5e5da3df95d2b579c760691c38).
  • Immediate read: Before: denied without provider I/O. After: authenticated channel metadata and messages GETs succeeded.
  • Reload: Two signed connections, one chat.send, one visible completed reply; provider requests unchanged.
  • Automation boundary: Created definition unchanged. Its recorded webchat origin correctly denies the scheduled Discord read before provider I/O.
  • Equivalent view: 1280 x 900, dark theme, scale 1, same /chat/main route, request, account and provider data.
  • Actual Gateway, CLI child, generated MCP tool and registered Discord provider; synthetic model decisions and provider data.
  • After-source tree 92eccde3add15769c66e4d635b993a47ecbb6b96; served UI bytes match the recorded build.
  • Real chat.startup after reload returned the completed message for the sent session; the reply remained visible exactly once.
  • All 9.36 seconds decoded and played to completion; screenshots and the complete recording timeline inspected.

@shakkernerd
shakkernerd requested a review from a team as a code owner September 16, 2026 21:15
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Sep 16, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 17, 2026, 3:27 AM ET / 07:27 UTC (Revision 12).

ClawSweeper review

What this changes

Allows authenticated dashboard conversations to read through verified official plugins while binding permission to the original turn and current session access.

Merge readiness

✅ Ready for maintainer review

This remains a useful fix: current main and the latest release still lack dashboard admission for these reads. The earlier participation finding is resolved, the supplied authority-boundary proof is sufficient, and no actionable introduced defects remain.

Priority: P2
Reviewed head: ee6b99a84ca3a0743260d7d50a60cedc5f42d078

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with strong production-boundary evidence and no remaining actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Current-head production-path diagnostics exercise dashboard admission through signed Gateway clients, generated MCP, and Discord HTTP transport: allowed reads succeed, required-membership withdrawal blocks retry I/O while the run remains active, and transport loss preserves the admitted read. Inspected screenshots corroborate the visible result.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): Current-head production-path diagnostics exercise dashboard admission through signed Gateway clients, generated MCP, and Discord HTTP transport: allowed reads succeed, required-membership withdrawal blocks retry I/O while the run remains active, and transport loss preserves the admitted read. Inspected screenshots corroborate the visible result.
Evidence reviewed 9 items Current main still needs the fix: Current main’s provider-owned external read gate still requires native provider, account, and conversation context unless a scheduled grant exists; it has no dashboard exception. The merged scheduled-read contributions address separate invocation sources.
Latest release comparison: The v2026.9.4 dispatcher grants provider-owned read admission only to bundled registrations; external delegated reads require exact current conversation context. This release does not contain the requested dashboard repair.
Prior participation finding resolved: The retained dashboard assertion checks work admission and caller authority, captures authorization against the expected prepared session identity, and invokes current session authorization on subsequent checks.
Findings None None.
Security None None.

How this fits together

The Gateway admits dashboard messages and supplies private authorization to the agent’s message tool. Plugin dispatch carries that authorization through provider requests and retries before returning channel data.

flowchart TD
  A[Authenticated dashboard message] --> B[Chat and session admission]
  B --> C[Original turn permission]
  C --> D[Message tool and Gateway routing]
  D --> E[Verified plugin read checks]
  E --> F[Provider request and retries]
  F --> G[Dashboard reply]
  C --> H[Current caller and participation checks]
  H --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +204, Tests +345, Docs +7. Total +556 across 25 files.

View PR surface stats
Area Files Added Removed Net
Source 17 284 80 +204
Tests 7 385 40 +345
Docs 1 14 7 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 25 683 127 +556

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net +204 lines; tests net +345 lines Production growth carries private admission and live authorization across existing owners; tests cover identity, revocation, and write isolation.

Technical review

Best possible solution:

Keep dashboard reads on the existing private turn-capability and provider-policy path, with current participation enforced through final I/O.

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

Yes: current main rejects an authenticated dashboard read through an external official registration because it lacks native channel context; supplied baseline evidence shows that denial. This review did not execute a current-main reproduction.

Is this the best way to solve the issue?

Yes: the patch extends existing private admission and session authorization rather than adding a parallel plugin API, configuration switch, or persisted grant.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7885f84b1988.

Labels

Label justifications:

  • P2: Restores a bounded dashboard read workflow for verified official plugin installations.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): Current-head production-path diagnostics exercise dashboard admission through signed Gateway clients, generated MCP, and Discord HTTP transport: allowed reads succeed, required-membership withdrawal blocks retry I/O while the run remains active, and transport loss preserves the admitted read. Inspected screenshots corroborate the visible result.
  • proof: sufficient: Contributor real behavior proof is sufficient. Current-head production-path diagnostics exercise dashboard admission through signed Gateway clients, generated MCP, and Discord HTTP transport: allowed reads succeed, required-membership withdrawal blocks retry I/O while the run remains active, and transport loss preserves the admitted read. Inspected screenshots corroborate the visible result.

Evidence

What I checked:

  • Current main still needs the fix: Current main’s provider-owned external read gate still requires native provider, account, and conversation context unless a scheduled grant exists; it has no dashboard exception. The merged scheduled-read contributions address separate invocation sources. (src/channels/plugins/message-action-dispatch.ts:430, 7885f84b1988)
  • Latest release comparison: The v2026.9.4 dispatcher grants provider-owned read admission only to bundled registrations; external delegated reads require exact current conversation context. This release does not contain the requested dashboard repair. (src/channels/plugins/message-action-dispatch.ts:143, 3a9d69db306c)
  • Prior participation finding resolved: The retained dashboard assertion checks work admission and caller authority, captures authorization against the expected prepared session identity, and invokes current session authorization on subsequent checks. (src/gateway/server-methods/chat-send-handler.ts:173, ee6b99a84ca3)
  • Read permission remains private and source-bound: Dashboard capability issuance requires the admitted run, agent, session key, and prepared session ID. Dispatch requires existing provider-owned read opt-in and registration authority, strips private authorization before plugin callbacks, and does not substitute dashboard authority for native or scheduled context. (src/auto-reply/reply/agent-runner-utils.ts:345, ee6b99a84ca3)
  • Final provider boundary: Discord captures the shared read assertion before queue submission and checks it immediately before HTTP execution. The changed Gateway path supplies that assertion and disables result replay for dashboard-authorized reads. (extensions/discord/src/internal/rest.ts:240, ee6b99a84ca3)
  • Current-head runtime and forbidden-principal proof: The supplied body snapshot, sourceRevision eddde4e8f06c57f52a8300425a159ead7efdf613489f62f999ef6c0e61ea8ffb, records the real Gateway, signed clients, generated MCP tool, and registered Discord transport at this head with synthetic provider data. After a real HTTP 429, a distinct owner removes required membership while the original run and socket remain active: fresh sends are denied and retry provider requests remain zero. The reconnect control completes the original read with one chat.send and two provider requests. These observations directly cover the earlier participation concern. (ee6b99a84ca3)

Likely related people:

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

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 (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-17T02:47:18.374Z sha e8dcd2a0f606debc36a14b0160b226a9513561e9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-17T03:24:36.822Z sha ff4e866 :: blocked before merge. :: none
  • reviewed 2026-09-17T03:39:49.272Z sha ff4e866 :: needs real behavior proof before merge. :: [P1] Revalidate session participation in the retained dashboard grant
  • reviewed 2026-09-17T04:22:28.042Z sha e864971 :: needs real behavior proof before merge. :: [P1] Revalidate session participation in the retained dashboard grant
  • reviewed 2026-09-17T05:03:46.737Z sha ffce52e :: needs real behavior proof before merge. :: [P1] Revalidate session participation in the retained dashboard grant
  • reviewed 2026-09-17T06:02:24.678Z sha 3cb5b80 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-17T06:23:41.421Z sha ee6b99a :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-17T07:03:55.412Z sha ee6b99a :: needs maintainer review before merge. :: none

@shakkernerd
shakkernerd force-pushed the fix/scheduled-account-reads branch from 6ff0de6 to 2c85b0f Compare September 17, 2026 01:30
@shakkernerd shakkernerd self-assigned this Sep 17, 2026
@shakkernerd
shakkernerd changed the base branch from fix/scheduled-account-reads to fix/scheduled-message-reads September 17, 2026 02:14
@shakkernerd
shakkernerd force-pushed the fix/dashboard-plugin-reads branch from c7f40a9 to e8dcd2a Compare September 17, 2026 02:14
Base automatically changed from fix/scheduled-message-reads to main September 17, 2026 02:37
@shakkernerd
shakkernerd force-pushed the fix/dashboard-plugin-reads branch from e8dcd2a to ff4e866 Compare September 17, 2026 03:13
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 17, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 17, 2026
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 17, 2026
@shakkernerd
shakkernerd merged commit 9ace0a5 into main Sep 17, 2026
377 of 379 checks passed
@shakkernerd
shakkernerd deleted the fix/dashboard-plugin-reads branch September 17, 2026 07:55
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: dashboard conversations can perform permitted reads through verified official plugins.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
Restore supported reads from authenticated dashboard turns through verified official plugins. Keep them bound to the original run and session while applying the existing chat, tool, account and provider permissions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant