Repository navigation
refactor(channels): deslop msteams, imessage, signal, mattermost and googlechat - #156952
Conversation
Consolidate request, dispatch, cache, approval, and delivery flows in msteams, imessage, signal, mattermost, and googlechat while preserving public contracts.
|
🦞👀 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 24, 2026, 12:02 AM ET / 04:02 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch consolidates dispatch, approval, attachment, cache, and delivery code in the bundled Teams, iMessage, Signal, Mattermost, and Google Chat plugins. Merge readiness⛔ Blocked before merge - 1 item remains This remains distinct from current main. The consolidation is coherent, and review found no concrete introduced defect or unresolved merge blocker. Priority: P3 Review scores
Verification
How this fits togetherBundled channel plugins receive provider events and attachments, check access, and pass accepted messages to OpenClaw. They also send replies and actions back through provider APIs. flowchart LR
A[Provider events] --> B[Channel plugins]
B --> C[Account and sender checks]
C --> D[Conversation dispatch]
D --> E[Reply delivery]
E --> F[Provider APIs]
G[Attachments and callbacks] --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1553, Tests -158, Other -1. Total -1712 across 70 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one plugin-owned path for each affected responsibility while preserving channel access checks, delivery results, and existing operator state. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes maintenance cleanup rather than reporting a broken behavior. The review compared the pinned diff with current source and did not execute provider interactions. Is this the best way to solve the issue? Yes for the stated maintenance goal: the changed flows remain in their existing plugin owners, and inspection found no competing implementation or introduced contract change. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2765f7a3341b. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
Consolidate request, dispatch, cache, approval, and delivery flows in msteams, imessage, signal, mattermost, and googlechat while preserving public contracts.
What Problem This Solves
Repeated transport flows, forwarding layers, and redundant state make the Teams, iMessage, Signal, Mattermost, and Google Chat plugins harder to maintain consistently.
User Impact
No intended behavior change. Authorization order, webhook verification, credential precedence and diagnostics, message formatting/chunking, configuration, protocol, SDK exports, and persisted formats remain unchanged.
Why This Change Was Made
This is an explicit maintainer-requested channel-maintenance deliverable: consolidate these five bundled transports, preserve their existing contracts, and remove at least 1,000 net production lines. It is the requested exception to the refactor-only contribution rule.
Keep each responsibility with its existing owner and remove the parallel implementations and private indirection around it.
performIMessageCatchupstill owns per-row failure conversion, andextractAuthoritativeRecoveryProjectionstill rejects missing conversation anchors.extensions/imessage/src/monitor/conversation-repair.tsreconstructs an incoming message object from the read-onlychats.listandmessages.historyRPCs. It does not write stored data or implement a migration/backfill. The admitted projection has the same fields and missing-field behavior, including clearing an absentdestination_caller_idtonull; its producer already requires a usable conversation anchor. Existing recovery cases inmonitor.behavior.test.tspassed again in the final affected-owner replay. No stored-data upgrade contract changes, so no new migration is required.The assertion-safety baseline only shrinks to match deleted assertions. Tests for retired private paths were removed or moved onto the surviving entry point; meaningful transport and lifecycle coverage remains.
Evidence
node scripts/check-changed.mjs --base origin/main: passed on Blacksmith, including typechecks, dead-export scans, all selected lint batches, formatting, and boundary guards.pnpm test:extensions:batch msteams,imessage,signal,mattermost,googlechat: 322 files passed; 5,376 tests passed, 3 macOS-only ACL tests skipped on Linux.node scripts/run-vitest.mjs <cross-shard files below>: all 10 routed Vitest shards passed (603.98 seconds including E2E runtime preparation).pnpm test extensions/msteams/src/attachments/remote-media.test.ts extensions/msteams/src/monitor-handler.adaptive-card.test.ts extensions/msteams/src/monitor.conversation-allowlist.lifecycle.test.ts extensions/msteams/src/monitor.lifecycle.test.ts extensions/msteams/src/reply-stream-controller.test.ts --maxWorkers=1: 5 files / 101 tests passed; 21.54 seconds wall time.pnpm build: passed on the final candidate (5m 5.4s). Its UI size report printed a non-failing Mermaid gzip notice (1,555.8 KiB versus 960 KiB); this PR changes no UI files.Remote proof used Blacksmith Testbox
tbx_01m38g4aqb27x58rsenjwtj0sa, with source-byte verification before commands: https://github.com/openclaw/openclaw/actions/runs/35942663656Production source only: 1,553 net lines removed (63 files, 996 insertions, 2,549 deletions). The work-order command reports:
Cross-shard tests found by consumer searches
The requested production-filtered shortstat includes test-helper and baseline bookkeeping; production-only accounting excludes both. No changelog, manifest, dependency, schema, protocol, or public SDK export changes.
Local control: the Google Chat guarded-transport suite timed out in its 180-second import hook on both the candidate and a clean checkout at the merge base. Its sibling authority suite passed all nine tests on both. The local full-tree Knip scan also reached its unchanged 600-second limit; the same gate passed on Blacksmith. The complete five-plugin batch passed on the isolated Testbox, including that transport suite; three macOS-only Signal ACL cases are skipped on Linux.
Exact-head CI is green for
eb53f5ffda1bf2f1d0a4d39d46d0000d184c77e4: CI run 35949535724, attempt 2. The first attempt was explicitly deferred before preflight by Full Release Validation priority; it was restarted only after that hold cleared. No CI or test gate was bypassed. Selected extension test jobs took 692s, 182s, and 175s including runner setup and all tests in each job.