Repository navigation
Conversation
…ress Mattermost gains the inbound UX the other chat channels already have: an acknowledgement reaction with lifecycle status, counted tool rows in progress previews (compactToolRuns), post edit/delete and member join/leave system events, a join introduction when the bot is added to a channel, reactionNotifications (own by default), and spoken-mention admission for media-only voice posts in mention-gated channels. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
🦞👀 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 real behavior proof before merge. What this changesAdds Mattermost acknowledgements, compact tool progress, channel events, optional introductions, reaction filtering, and spoken-mention admission. Example: Alice asks @octo to run twelve commands with progress previews enabled.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 6 items remain Keep open: this PR adds useful Mattermost capabilities absent from main, but its post-type filtering needs repair and its new settings and defaults need an owner decision. Priority: P2 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe Mattermost plugin receives WebSocket events, applies admission and session routing, invokes shared channel owners, and sends reactions and replies through Mattermost REST. flowchart LR
A[Mattermost WebSocket] --> B[Plugin event handlers]
B --> C[Admission and session routing]
C --> D[Shared agent runtime]
C --> E[Shared introduction owner]
D --> F[Feedback and progress adapters]
E --> G[Mattermost REST]
F --> G
Technical reviewBest possible solution: Retain the shared owners, apply the existing system_* post classification consistently, and settle the proposed defaults and introduction authority contract. Do we have a high-confidence way to reproduce the issue? Current-main source confirms the missing integrations, and a human post with type slack_attachment deterministically reaches the new handler's discard branch; no target code or tests were executed. Is this the best way to solve the issue? The smallest implementation uses the existing feedback, compositor, transcription, and introduction owners, but must preserve human attachment posts and resolve the introduction's live-authority lifecycle. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3a6cc6597d1d. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: shipped entry point. SecurityNeeds attention: Introduction delivery needs final-effect authority evidence; no dependency or supply-chain changes were found. EvidenceSecurity concerns:
What I checked:
Likely related people:
PR surfaceSource +583, Tests +255, Docs +17, Generated 0, Other 0. Total +855 across 45 files. Added test files: 4. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (6 earlier review cycles)
Reviewed November 11, 2026, 10:55 AM ET / 15:55 UTC (Revision 7). |
Regenerate bundled channel config metadata and the config docs baseline for the new joinIntro, reactionNotifications and ackReaction options (channel budget 4001 -> 4007), parse update_at on posts instead of asserting it, type the zero-arg mocks whose call tuples the tests read, and let mock factories pass real exports through. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…action defaults - Read the agent-run terminal outcome from `inbound.run` so a failed model run sets the error reaction even when its error notice delivered normally. - Default `reactionNotifications` to `all` so existing deployments keep forwarding every allowed reaction; `own` and `off` stay opt-ins. - Document the real `messages.ackReactionScope` default: `group-mentions` acks mentioned channel posts only, so DMs need `direct` or `all`. - Drop the test-only `createMattermostPreflightAudio` factory in favor of one module-level adapter; the skip cases prove the transcriber is not called. - Authorize the join introduction from the current configuration at event time (account enabled, group policy not disabled) instead of the policy captured at monitor start. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…line ceiling
The checks-fast-baseline-ratchets test-lines job failed on this branch
(net +520 test lines against a ceiling main already sits ~130 under).
Bring the branch's net test-line delta down to +98 without touching
production code or raising the ceiling.
Consolidated the tests this PR added:
- monitor.loopback.test-support.ts: one shared loopback Mattermost server
and monitor-context fixture (uses setMattermostRuntime instead of a
per-file vi.mock of ../runtime.js), now used by monitor-system-events
and monitor.reaction-thread-session.
- monitor-system-events: post edit/delete, threaded edit, member join/leave
in one table; join intro and the three authority skip cases unchanged
(still run the real reportChannelRoomJoin owner).
- monitor.feedback.test-support: ack cycle for completed and failed runs
(the ❌ case) as one table.
- monitor-websocket: reaction + edit/delete/membership dispatch in one
test; dropped the post_edited probe from the raw-envelope test it now
covers.
- preflight-audio, normalize: inline fixtures and it.each tables.
Removed duplicated or implementation-coupled coverage (surviving proof):
- monitor-auth "checks sender allowlists" asserted the arguments of a
mocked resolveAllowlistMatchSimple; now runs the real matcher with an
allowed and a denied case. Its four command-authorization cases moved
into the monitor.test authorizeMattermostCommandInvocation table, which
also replaces the "DM commands in open mode" ingress-level row.
- inbound "routes a mention-prefixed text command without debouncing":
the debounce table "flushes text before an immediate command post" now
asserts WasMentioned/CommandAuthorized/CommandSource too.
- thread-participation "remembers a thread the bot replied in": covered by
the restart and store-failure tests.
- monitor-ingress "retries a transient append failure and escalates a
persistent one": escalation folded into the retry-backoff order test.
- monitor-slash "falls back to the configured gateway port when the env
port is out of range": resolveGatewayPort is owned by
src/config/paths.test.ts ("resolves env port 65536 ...").
- interactions "falls back to localhost when customBindHost is a wildcard
bind address": same resolveCallbackHost branch proven in
slash-commands.test "falls back to localhost callback URL for wildcard
bind hosts"; single-use request helpers inlined.
- setup "treats secret-ref tokens plus base url as configured": covered by
channel-actions-setup-status.contract "inspects source SecretRefs".
- send "forwards retry settings when resolving a bare user id": covered
over real HTTP by send.authority "stops DM backoff after retirement"
and "resolves cold and warm bare users"; parseMattermostTarget empty
cases moved into the target-resolution table; dropped a call-count
assertion on resolveMattermostAccount.
- target-resolution "rejects disabled accounts before cache or provider
access": channel.test "rejects disabled accounts before opaque target
resolution provider access" proves it at the action boundary; "uses the
configured account for directory discovery" only asserted a mock's
arguments.
- channel.test "rejects invalid read cursors and limits": owned by
client.test "rejects read options %j before provider access".
- outbound-delivery hook rewrite/cancel tests merged into one table.
Pruned the two retired vi.mock factories from
config/test-mock-exports-baseline.txt.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…loads and make introductions opt-in - The join-introduction owner now accepts `roomAllowed` as a function and re-evaluates it after the room context loads and right before the isolated turn starts, releasing its claim and skipping with `room-not-allowed` when admission was revoked meanwhile. Mattermost passes a closure that re-reads the account and group policy from the gateway's current config, so disabling the account or setting `groupPolicy: "disabled"` while the channel purpose and posts load prevents both the provider call and the Mattermost post. - Mattermost introductions are opt-in: the owner takes `enabledByDefault`, Mattermost passes `false`, and an unset `joinIntro` skips with `disabled` before any channel read. Enable with `channels.mattermost.joinIntro: true` (or per account). Docs, the config hint, and the generated channel metadata follow; Slack, Discord, and the other callers keep their defaults. The Mattermost system-event test file moves to the database-worker project so the real owner's durable join claim can run against the loopback server. Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The change has an unresolved moderate configuration mismatch with its stated default behavior, plus missing coverage for the successful audio-transcription path.
2 open issues
What changed in this PR
This PR brings Mattermost closer to feature parity with other supported channels by adding acknowledgement/status reactions, compact tool-progress previews, audio-based mention admission, websocket-driven system events, reaction filtering, and channel join introductions. It also consolidates related tests and refreshes documentation and generated configuration metadata.
Changes:
- Added acknowledgement reactions, failed-run status handling, emoji mappings, and configurable reaction notification modes.
- Added edit, deletion, membership, and reaction event forwarding through Mattermost websockets.
- Added join introductions with room-policy and account authorization checks.
- Added spoken-mention admission for audio-only posts and compact repeated tool-progress rows.
- Consolidated Mattermost tests and updated documentation, configuration schemas, generated baselines, and worker registration.
| File | Description |
|---|---|
test/vitest/vitest.extension-database-workers-paths.mjs |
Registers the Mattermost system-event tests in the worker test project. |
src/channels/join-intro/report-channel-room-join.ts |
Adds join-introduction defaults and admission revalidation. |
src/channels/join-intro/report-channel-room-join.test.ts |
Tests introduction defaults and admission revocation. |
extensions/mattermost/src/setup.test.ts |
Consolidates Mattermost setup coverage. |
extensions/mattermost/src/outbound-delivery.test.ts |
Consolidates outbound delivery test cases. |
extensions/mattermost/src/normalize.test.ts |
Consolidates target normalization tests. |
extensions/mattermost/src/mattermost/thread-participation.test.ts |
Removes redundant thread-participation coverage. |
extensions/mattermost/src/mattermost/target-resolution.test.ts |
Consolidates target validation coverage. |
extensions/mattermost/src/mattermost/send.test.ts |
Consolidates send and target-resolution tests. |
extensions/mattermost/src/mattermost/preflight-audio.ts |
Adds audio detection and transcription for spoken-mention admission. |
extensions/mattermost/src/mattermost/preflight-audio.test.ts |
Tests audio preflight early-return behavior. |
extensions/mattermost/src/mattermost/monitor.ts |
Wires system-event handling into the Mattermost monitor. |
extensions/mattermost/src/mattermost/monitor.test.ts |
Expands Mattermost authorization coverage. |
extensions/mattermost/src/mattermost/monitor.reaction-thread-session.test.ts |
Tests reaction notification modes and shared loopback setup. |
extensions/mattermost/src/mattermost/monitor.preview-delivery.test-support.ts |
Tests compact and raw tool-progress rendering. |
extensions/mattermost/src/mattermost/monitor.loopback.test-support.ts |
Provides reusable Mattermost loopback monitor fixtures. |
extensions/mattermost/src/mattermost/monitor.ingress-debounce.test-support.ts |
Strengthens command-context and debounce assertions. |
extensions/mattermost/src/mattermost/monitor.inbound-system-event.test.ts |
Integrates feedback and preview harnesses into inbound tests. |
extensions/mattermost/src/mattermost/monitor.feedback.test-support.ts |
Tests acknowledgement lifecycle and spoken-mention admission. |
extensions/mattermost/src/mattermost/monitor-websocket.ts |
Recognizes and dispatches Mattermost system events. |
extensions/mattermost/src/mattermost/monitor-websocket.test.ts |
Tests websocket dispatch for reactions, post changes, membership, and ignored events. |
extensions/mattermost/src/mattermost/monitor-turn.ts |
Connects feedback lifecycle handling and compact progress rendering to turns. |
extensions/mattermost/src/mattermost/monitor-system-events.ts |
Implements post-event forwarding, membership events, and join introductions. |
extensions/mattermost/src/mattermost/monitor-system-events.test.ts |
Tests system-event routing, join context, and authorization behavior. |
extensions/mattermost/src/mattermost/monitor-slash.test.ts |
Removes redundant slash-command setup coverage. |
extensions/mattermost/src/mattermost/monitor-resources.ts |
Exports Mattermost media metadata for audio preflight. |
extensions/mattermost/src/mattermost/monitor-reactions.ts |
Applies configurable reaction notification filtering. |
extensions/mattermost/src/mattermost/monitor-posts.ts |
Adds audio admission, feedback creation, and media reuse. |
extensions/mattermost/src/mattermost/monitor-ingress.test.ts |
Consolidates transient ingress retry coverage. |
extensions/mattermost/src/mattermost/monitor-feedback.ts |
Implements acknowledgement and status-reaction lifecycle handling. |
extensions/mattermost/src/mattermost/monitor-auth.test.ts |
Consolidates authentication and allowlist coverage. |
extensions/mattermost/src/mattermost/interactions.test.ts |
Consolidates interaction-token and callback tests. |
extensions/mattermost/src/mattermost/emoji.ts |
Maps shared lifecycle reaction glyphs to Mattermost names. |
extensions/mattermost/src/mattermost/client.ts |
Adds post update timestamps to the Mattermost schema. |
extensions/mattermost/src/mattermost/client.test.ts |
Consolidates invalid post-read option tests. |
extensions/mattermost/src/config-surface.ts |
Adds UI hints for join, reaction, and acknowledgement settings. |
extensions/mattermost/src/config-schema-core.ts |
Adds schema support for the new Mattermost options. |
extensions/mattermost/src/channel.test.ts |
Removes duplicate provider-access validation coverage. |
docs/concepts/streaming.md |
Documents compact progress rows. |
docs/channels/mattermost.md |
Documents Mattermost reactions, audio admission, events, introductions, and progress compaction. |
docs/channels/index.md |
Updates the join-introduction support documentation. |
docs/.generated/config-baseline.sha256 |
Refreshes generated configuration hashes. |
docs/.generated/config-baseline.counts.json |
Refreshes generated configuration counts. |
config/test-mock-exports-baseline.txt |
Updates the generated mock-export baseline. |
Review effort: Lite
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Extension tests may not mock src/cron/isolated-agent.js directly, and no plugin-sdk subpath exposes runCronIsolatedAgentTurn. The revocation case already observes that no post reaches the loopback server and that the owner reports room-not-allowed; on the pre-fix owner the turn starts and the outcome becomes failed, so the observable keeps the case red there. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
🦞👀 Re-review progress:
|
A scope rule added by config reload reached the shared media pass but not the spoken-mention preflight, which still used the monitor's startup snapshot and sent a private-room voice note to the transcription provider. Found live on the disposable gateway. The preflight now reads config.current() like the join introduction does; the harness case asserts the live scope reaches it. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ssertion Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|





Related: #184712
What Problem This Solves
Mattermost gains acknowledgement/status reactions, compact repeated tool progress, post and membership events, optional join introductions, reaction filtering, and spoken-mention admission for voice messages.
The implementation uses shared channel owners. Acknowledgements follow existing
messages.ackReactionScope; failed runs receive the failure reaction.reactionNotificationsdefaults toall, preserving existing forwarding;ownandoffare opt-ins. Join introductions remain disabled unless explicitly enabled, with live admission rechecked before the model turn. Voice preflight honors audio scope and only echoes transcripts after admission, without downloading admitted media twice. Existing configs remain valid.Evidence
Current head
e22008765ad455a57210dec9bfcca88071053a81adds only the 254-line test allocation for the measured regression coverage. The local test-line ratchet passes. The runtime and tests are byte-identical to the build and live proof head below. Hosted CI has restarted.Runtime proof head
f7a61e86344452a9253b65ea897c047c1aea980eintegrates OpenClaw main8ae6b3852f97. The native link-preview handling and send tests are preserved. The bundled channel metadata and config-doc baseline were regenerated with the native generators.monitor-posts.ts, thenmonitor-feedback.ts,monitor-system-events.tsandpreflight-audio.ts. The external proof below covers additional prior-head scenarios.Reused proof from prior head
6d0cbc6f38c:reserves authenticated capacity…, expected 8, got 0); a clean checkout of its exact upstream baseddd4d963reproduces it (6 passed, 1 failed).Existing live screenshots and proof were captured on a prior PR head using a disposable Mattermost server and Gateway. They cover acknowledgement reactions, compact progress, system events and reaction filtering; they are not a live run of this refreshed head.
Maintainer edits are enabled.