Repository navigation
fix: restore context reads for installed official Discord and Slack plugins - #143341
Conversation
|
🦞👀 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 14, 2026, 3:10 AM ET / 07:10 UTC (Revision 15). ClawSweeper reviewWhat this changesRestores permitted context reads for installed official Discord and Slack plugins, retaining caller and plugin authority through lookups, queues, retries, and result delivery. Merge readiness⛔ Blocked before merge - 3 items remain This remains a useful fix: current main still restricts installed plugins to the current conversation. No blocking patch defect was found, and the supplied installed-runtime evidence supports the authority checks. Priority: P1 Review scores
Verification
How this fits togetherOpenClaw’s shared message tool sends context-read requests through the channel dispatcher to Discord or Slack. The host checks registration and caller authority; each plugin applies its account and destination policies before retrieving provider data. flowchart TD
A[Agent context read] --> B[Current caller and conversation]
B --> C[Verified plugin registration]
C --> D{Declared supported read?}
D -->|Yes| E[Provider destination policy]
D -->|No| F[Existing conversation restriction]
E --> G[Authority checked before HTTP]
G --> H[Checked result delivery]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +236, Tests +1192, Docs +37. Total +1465 across 32 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: Keep one host-owned read-authority contract with provider-owned destination checks, qualified through fresh and upgrade installs of release-aligned core and plugin packages. Do we have a high-confidence way to reproduce the issue? Yes, from source: a delegated cross-conversation read through an installed official registration reaches current main’s exact-current gate before provider policy. This review did not execute the runtime. Is this the best way to solve the issue? Yes: the patch extends the existing dispatcher and lifecycle owners, preserves provider policies, and uses one shared SDK callback instead of a trust setting or competing read implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 322e27210a48. LabelsLabel 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 (14 earlier review cycles; latest 8 shown)
|
|
Updated in One hosted CI job currently needs a maintainer rerun: checks-node-compact-large-18. The unchanged @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
4741ea7 to
3916c17
Compare
f56d285 to
e407b69
Compare
e407b69 to
6f7be4b
Compare
|
Fixed: provider-permitted context reads now work with verified official Discord and Slack installations while preserving caller and plugin lifetime checks. With thanks to @anyech. |
* commit 'a08cdc50bc049074ed7ad2db9e18e0ed3f5415ec': (81 commits) perf: reuse stateless plugin scope defaults (#148080) fix(gateway): flush slow-consumer 1008 close frame before terminating socket (#147707) fix: keep model catalogs loading during other session updates (#147878) fix: show queued external chat messages and their source (#147848) refactor(chat): share math label configuration (#148073) perf(ui): trim eager debug overlay icon payload (#147954) improve(logbook): sample batch frame metadata in SQLite (#147999) fix(ui): dismiss suggested task cards without waiting (#148021) fix(maturity): cover governance, interoperability, fleet, and state (#143528) chore(ui): restore core lint and startup budget checks (#148010) fix: chat startup loads unnecessary session setup text (#147973) perf: speed up fresh cloud worker activation (#147945) fix: recover PR preparation after committed merge conflicts (#148063) test(plugins): isolate ClawHub Docker fixture identity (#148074) fix(release): acknowledge ClawHub risk on moving installs (#148041) fix: restore context reads for installed official Discord and Slack plugins (#143341) fix: identify source capsule filesystem failures (#147778) fix(linux): keep Quick Chat widgets bound to their Gateway (#146049) refactor(infra): consolidate update campaign reset ownership (#146555) refactor: simplify Gateway health response parsing (#147834) ...
* commit '7d485aa2e89af7fdbd09e8ed0489b06d250b07e3': test(scripts): check the configurable ClawHub sweep spec fix: show queued external chat messages and their source (openclaw#147848) refactor(chat): share math label configuration (openclaw#148073) perf(ui): trim eager debug overlay icon payload (openclaw#147954) improve(logbook): sample batch frame metadata in SQLite (openclaw#147999) fix(ui): dismiss suggested task cards without waiting (openclaw#148021) fix(maturity): cover governance, interoperability, fleet, and state (openclaw#143528) chore(ui): restore core lint and startup budget checks (openclaw#148010) fix: chat startup loads unnecessary session setup text (openclaw#147973) perf: speed up fresh cloud worker activation (openclaw#147945) fix: recover PR preparation after committed merge conflicts (openclaw#148063) test(plugins): isolate ClawHub Docker fixture identity (openclaw#148074) fix(release): acknowledge ClawHub risk on moving installs (openclaw#148041) fix: restore context reads for installed official Discord and Slack plugins (openclaw#143341) fix: identify source capsule filesystem failures (openclaw#147778) fix(linux): keep Quick Chat widgets bound to their Gateway (openclaw#146049) refactor(infra): consolidate update campaign reset ownership (openclaw#146555) refactor: simplify Gateway health response parsing (openclaw#147834)
…lugins (openclaw#143341) Restore provider-permitted context reads for verified official Discord and Slack installations while preserving account, destination, caller, and plugin lifetime checks. Refs openclaw#115367. Reviewed-by: @shakkernerd Co-authored-by: Shakker <[email protected]>
Related: #115367
What Problem This Solves
An agent in one conversation can need messages, pins, or reactions from another conversation that its configured Discord or Slack account is allowed to read. The same provider implementation could serve that request when bundled, but installing the official plugin through npm or ClawHub caused the host to reject it before the provider's destination checks could run.
The existing provider-owned read gate admitted bundled registrations only. Extending admission also requires keeping the operation attached to the caller and plugin instance that authorized it: target lookup, queued requests, retries, and result delivery must not continue with authority that has expired or been replaced.
User Impact
With matching updated core and plugin versions, verified official installations can perform the following provider-permitted context reads:
read,search,reactions,list-pins,thread-list,channel-inforead,reactions,list-pinsAccount matching, current-provider context, requester context, and the provider's destination policy still apply. Bundled plugins retain their existing admission rules and receive the same lifetime checks for these opted-in reads. Other actions, unverified installations, and older adapters keep their existing authorization behavior.
Delegated Discord reaction reads also stop using the resolver that can create a DM. A user alias in the current trusted DM resolves to its existing native channel; an unmatched or unattested user target fails before provider traffic. Direct operator reads and reaction writes retain their existing resolution path.
Why This Change Was Made
The host now combines the existing loader-verified official installation record with an explicit
readAuthorityActionslist and the adapter'sproviderOwnedReadGatesdeclaration. The host intersects that list with the six actions above. This keeps lifetime participation and provider admission explicit, and prevents a later host action addition from silently expanding an existing adapter's opt-in. Plugin-supplied fields cannot substitute for the selected registration's authority.Local message tools capture the existing operational caller assertion before asynchronous preparation and retain the original turn capability. That assertion is carried through routing and dispatch; Gateway requests retain their server-owned caller assertion as well. Opted-in delegated execution needs a live registered instance, including for bundled plugins. A bundled artifact fallback or an omitted scoped registration cannot supply that lifecycle.
The shared
captureChannelReadAuthority()SDK callback is captured when each transport request is submitted, retained through queues and retries, and checked immediately before provider I/O after asynchronous request preparation. Host and installed SDK copies share the invocation scope. The host also checks completion, covering stale results and errors, and closes captured callbacks when the action finishes. These checks stop subsequent requests and stale delivery; they cannot undo a request already sent.The complete target-alias owner repair in #147492 is included in the integrated proof and remains a separate change.
The new SDK export is absent from the published 2026.9.3 and 2026.9.4 cores. Core and plugin releases therefore need coordinated version and plugin-API alignment. Package proof uses the canonical release tools in a disposable 2026.9.5 fixture, with matching build metadata and no version change in this PR.
Evidence
6f7be4b8, based on main8c776697, passed all 1,581 affected tests across 44 selected files. Native reports verify every case and file, successful exits, unchanged source, and joined process cleanup. This includes all 15 settings-storage cases and the current Slack probe cleanup, profile authorization, and real-child state preflight paths.6f7be4b8in a disposable 2026.9.5 fixture. All 41 campaign stages passed. Generated build metadata, plugin-API versions, the SDK export, package contents, compiled bindings, and the six published baseline tarball identities were verified. No release was published.update --tag <candidate-core-tarball> --yes --no-restartagainst those fresh packages. Channel configuration, workspace, plugin entries, and native install records are preserved. Both provider reads pass after each upgrade: four current installed reads. The three fixture processes and provider servers stopped; the source stayed unchanged and the final task-process inventory was empty.e407b697package campaign passed 83 stages and 31 installed cases. Its 24 ordinary npm/official-ClawHub cases cover allowed reads, destination denial, account mismatch, plugin revocation before I/O and before delivery, and real caller-claim revocation. Three installed Slack HTTP/1 proxy cases cover an allowed read and caller/plugin revocation. Four post-update reads complete that matrix. Actual installation, integrity validation, native records, loading, dispatch, proxy transport, and updater commands ran against synthetic registry/provider servers.e407b697review. The integration is conflict-free and matches its expected tree. Current-main caller, probe-dispatcher, package-metadata, update, and plugin-runtime changes were inspected for compatibility. ClawSweeper's current-head review rates the patch Platinum with no actionable code findings.