Repository navigation
fix: restore reads for the installed official Mattermost plugin - #147660
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: needs maintainer review before merge. Reviewed September 14, 2026, 9:33 AM ET / 13:33 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR restores permitted history reads for verified official Mattermost installations by connecting the existing read action and HTTP client to shared authority checks, with documentation and regression coverage. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main still lacks Mattermost’s read-authority opt-in. No actionable correctness or security defect was found, and the recorded production-boundary proof covers permitted, forbidden, and revoked reads. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s shared message tool dispatches history requests to the selected Mattermost plugin. The host verifies caller and plugin authority, while Mattermost checks account and channel access before fetching posts. flowchart TD
A[Agent history request] --> B[Host caller and plugin checks]
B --> C[Mattermost account and channel policy]
C --> D[HTTP client authority check]
D --> E[Mattermost API]
E --> F[Host completion check]
F --> G[Messages or visible rejection]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +9, Tests +439, Docs +2. Total +450 across 6 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. Technical reviewBest possible solution: Keep Mattermost on the existing host authority contract, preserve provider-owned access rules, and distribute it through the coordinated core/plugin release tooling. Do we have a high-confidence way to reproduce the issue? Yes: current main’s missing adapter declaration selects the exact-current restriction for installed Mattermost reads, and the supplied registered-tool evidence records that failure. This read-only review did not execute a reproduction. Is this the best way to solve the issue? Yes: adopting the already-merged authority contract repairs the installation discrepancy without duplicating trust policy, changing saved settings, or adding another permission mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8638c54e15f8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
cf83584 to
5b834df
Compare
5b834df to
ed7ee04
Compare
ed7ee04 to
9b57b18
Compare
|
Fixed: enabled Mattermost history reads can access permitted channels after npm or official ClawHub installation. |
…claw#147660) Restore configured channel history reads for the official Mattermost plugin installed through npm or ClawHub while preserving existing account, channel, and action settings. Revalidate active read authority before provider requests. Refs openclaw#115367.
Related: #115367
What Problem This Solves
The official Mattermost plugin can reject history reads from a configured, permitted channel after installation through npm or official ClawHub onboarding. Enabling
channels.mattermost.actions.messagesand allowing the destination inchannels.mattermost.groupsdoes not remove the host's external-plugin restriction.For example, an agent in one Mattermost channel should be able to read another allowed channel using the same bot account. The bundled plugin already applies Mattermost's channel policy to that request. The installed plugin must also participate in the shared read-authority contract before the host can let that policy decide.
User Impact
Enabled history reads follow the same account and channel access rules for the bundled plugin and verified official installations. Reads stay disabled by default, and an account-level
actions.messages: falsestill disables them for that account. Cross-account requests and disallowed channels remain blocked. Direct operator reads retain their existing behavior; older external adapters and unverified installations retain the exact-current-conversation restriction. Sending messages and adding or removing reactions receive no new authority.Why This Change Was Made
Mattermost declares only its existing
readaction for the shared authority mechanism. Its HTTP client captures the current request's assertion and checks it before provider I/O, including after asynchronous DNS and transport preparation. The same client also serves target resolution, so a read cannot continue making lookup requests after its caller or plugin registration expires.The host remains responsible for withholding stale results and provider errors when the operation completes. Provider admission stays in Mattermost, registration trust stays in the loader, and request lifetime stays in the existing host mechanism. There are no new trust settings, permission defaults, persistence changes, or read actions.
The shared prerequisites #143341 and #147492 are merged. This PR adds no host-eligible actions; its scope is Mattermost's existing read action, its client, documentation, and regression coverage.
Evidence
The regression was reproduced through the registered message tool: the bundled registration read the configured channel, while the installed-style registration rejected the same request with
requires the exact current conversation and account. A declaration-only control also failed all five metadata/DNS revocation cases because it still sent subsequent HTTP requests.The complete change passes all 22 registered-tool/HTTP cases. Its request ledger verifies:
The fresh remote batch executed on
5b834dffa12c9f42ebe01885d2f969c2396b7776passed all 916 Mattermost cases across 58 files and all 167 discovery, extension-boundary, and native project-routing cases across three files. The complete channel-surface CI group passed 249 cases across 13 files, including all 22 Mattermost cases, on merge result216ef8076bd005f4a22464783fe819e46f390345containing that head. The independently reviewed shared-owner continuation passed 124 selected lifecycle, startup, SQLite, and routing cases on matching owner inputs.Fresh native npm and official ClawHub installations each passed 17 compiled-consumer cases: 34 probes and 46 native stages in total. They use the actual CLI installers, SQLite install records, and compiled plugin loader, with official registry transport redirected to isolated fixtures. Coverage includes allowed/current/named-account reads, disabled settings and accounts, requester mismatches, disallowed channels and DMs, provider errors, and caller/plugin expiry before requests and before result or error delivery. All 34 registrations were loaded global official installations and declared only
read.The core and Mattermost package were rebuilt from
5b834dffa12c9f42ebe01885d2f969c2396b7776through canonical release tooling using a test-only2026.9.5fixture; no package was published. The core tarball SHA-256 is77045fdbd3f63dec5a1f8f6f58e206c9aa4a781b40606f859331cb14d3e18079; Mattermost isf08005a09861abbaa2e8944d5e90aeff6a0520a28882308bf89fb483e763030c. The packed manifest and every native installation reportopenclaw.compat.pluginApi: ">=2026.9.5". Both registry fixtures and every probe server stopped, all process groups joined, and source remained unchanged.Shared qualification in #143341 also passed four incompatible-core/plugin API rejection controls and the actual published
2026.9.3and2026.9.4updater paths, preserving configuration, install records, and workspace records with four successful post-update reads. Those updater controls used Discord and Slack. Mattermost adds no migration, persisted format, or updater owner.The necessary conflict replays onto
9a5af1b9537045fc2de707fddd34fb25b4054fd6produce head9b57b184a79d9aa317a5071313c68aeb3393c176. Five changed files, including all implementation and tests, remain byte-identical to the proven head. The SDK guide preserves main's landed Discord and Matrix wording and adds one Mattermost sentence. Range-diff and owner/input inspection support reuse of the recorded proof; those receipts retain their actual execution identities. Formatting, syntax, and diff preflight passed on the replayed content. All 30 selected checks are accounted for. The remote gate completed 23 stages before its unsplit native lint process was killed; that failure remains recorded. Completed CI stripes cover core, extension, and scripts lint with matching compiler, rules, and relevant inputs, and the remaining guard results are retained individually. The media-download and runtime-sidecar source scanners passed locally in under nine seconds after the shared runner closed, using matching existing dependencies without an install or build. Current-head CI is assessed separately before landing.