Skip to content

refactor(plugins): deslop imessage, mattermost, and voice-call - #163767

Merged
steipete merged 1 commit into
mainfrom
deslop/l311-deslop-imessage-mattermost-voice-20261002
Oct 2, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/l311-deslop-imessage-mattermost-voice-20261002

Conversation

@steipete

@steipete steipete commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The iMessage, Mattermost, and Voice Call plugins repeat transport serialization, callback discovery, carrier HTTP handling, and lifecycle bookkeeping that already have authoritative owners.

User Impact

Supported configuration keys, persisted records, carrier payloads, model-facing descriptions, and visible output remain unchanged. Twilio now releases an empty stream ID when that stream disconnects. The obsolete Mattermost private-network alias migration from April 2026 is retired under the July-2026-and-newer migration policy; the July streaming migration remains.

Why This Change Was Made

This is one accumulated batch removing 1,232 net production lines (excluding tests, fixtures, docs, and generated files); tests add 74 net lines.

  • iMessage shares message/participant action encoding, unifies short-ID/GUID authorization, removes redundant send-recovery wrappers, and simplifies catchup watermark handling.
  • Mattermost shares callback route discovery and host formatting, reuses its setup plugin definition, and removes redundant Markdown and authorization projections.
  • Voice Call routes carrier REST requests through the existing guarded HTTP owner, uses one stream registry and one playback-state owner, shares carrier frame/XML handling, and removes unused restore indexes and forwarding helpers.
  • Repetitive commentary is shortened while retaining security, persistence, ownership, and platform constraints. No code is moved out of these plugins and no public Plugin SDK API changes are introduced.

Fixes found along the way

Twilio's old disconnect guard treated an empty registered stream ID as absent, leaving the call in its stream map. The new regression checks the public registration query after disconnect. The voice-call configuration guide also incorrectly said the ngrok option accepted invalid signatures; it now describes URL reconstruction with signature verification still required.

Evidence

Linux Blacksmith Testbox proof used frozen-lockfile installs and the repository's source-verifying wrapper. Leases: tbx_01m3z04xgwj0zee78yagq6a2wd (allocation run) and its replacement tbx_01m3z3ydw8kzm0djry5b9jsmv9 (allocation run). Both leases have been stopped.

  • node scripts/run-vitest.mjs extensions/imessage extensions/mattermost extensions/voice-call: 194 files and 2,684 tests passed across six projects, 281.33s total.
  • node scripts/run-vitest.mjs src/plugins/contracts: 48 files and 1,132 tests passed, 67.40s.
  • The new empty-stream regression fails against the original Twilio implementation (expected true to be false) and passes with the cleanup fix. The final outbound suite also passed all 21 tests.
  • Both import-cycle checks report zero; final plugin lint covers 485 files with zero warnings/errors. Production and test typechecks, formatting, package/Doctor boundaries, dead-export scans, dependency and storage guards passed. The assertion baseline was regenerated with nine fewer grandfathered assertions and no new allowance.
  • Independent autoreview completed with no accepted actionable findings. A reported type-narrowing concern was rejected after verifying the existing type predicate and passing the production compiler gate.

The first changed-check run requested the expected assertion-baseline shrink. A later lint run caught a removed stored-mode cast; that declaration and log line were restored to base. A standalone all-extension lint run also reported the untouched extensions/codex/src/session-catalog-index.ts at 723/700 lines; the normal changed-path workflow classifies that cap as a warning. The final owned-plugin lint pass is clean.

Changed-test cost, measured with pnpm test <file> --maxWorkers=1 on the Linux CI-sized runner (wall/runner seconds, including startup):

File Tests Wall / CI runner seconds
extensions/imessage/src/actions.runtime.test.ts 23 24.36
extensions/voice-call/src/manager/events.test.ts 25 28.95
extensions/voice-call/src/providers/twilio.test.ts 27 19.54

These are synthetic transport/lifecycle tests; no live carrier calls or signed-in Mac messages were sent. Hosted CI passed on 67926abf2816e0ac45483fba825326a91a07fd97. Squash-merged as 2d8a022362e791912a6be3d180f2d7a466501d66; ancestry verified on current main.

@clawsweeper

clawsweeper Bot commented Oct 2, 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 channel: imessage Channel integration: imessage channel: mattermost Channel integration: mattermost channel: voice-call Channel integration: voice-call size: XL labels Oct 2, 2026
@steipete
steipete enabled auto-merge (squash) October 2, 2026 20:39
@clawsweeper

clawsweeper Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 2, 2026, 4:42 PM ET / 20:42 UTC.

ClawSweeper review

What this changes

The PR consolidates transport and lifecycle helpers in the iMessage, Mattermost, and Voice Call plugins, fixes Twilio stream cleanup, and removes a Mattermost configuration migration.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 4 items remain

The cleanup remains useful and is not implemented on current main, but removing Mattermost’s network migration leaves an unsafe upgrade path for legacy configuration.

Priority: P2
Reviewed head: 67926abf2816e0ac45483fba825326a91a07fd97

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The consolidation and reported validation are useful, but the migration retirement has a concrete compatibility blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: Ordinary contributor proof is exempt under the supplied MEMBER author context; the recorded Testbox runs provide synthetic transport and lifecycle validation. Mattermost’s configuration-migration removal lacks verified legacy-upgrade preservation or refusal coverage, independently of that exemption.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Ordinary contributor proof is exempt under the supplied MEMBER author context; the recorded Testbox runs provide synthetic transport and lifecycle validation. Mattermost’s configuration-migration removal lacks verified legacy-upgrade preservation or refusal coverage, independently of that exemption.
Evidence reviewed 8 items Introduced migration removal: The pinned introduced diff removes both detection and normalization of Mattermost’s flat allowPrivateNetwork alias, leaving only streaming migration. The verified test merge preserves this removal.
Retirement contract: The documented July cutoff permits retiring older formats only with a clear refusal naming an intermediate release, and prohibits silently discarding persisted data. The retirement checker detects browser.ssrfPolicy.allowPrivateNetwork but does not detect the Mattermost root or account aliases.
Reachable recovery consequence: Mattermost’s strict schema accepts network.dangerouslyAllowPrivateNetwork, not the flat alias. Without its migration, automatic repair cannot produce a valid candidate; Doctor can then consider last-known-good recovery rather than issue the required retirement refusal.
Findings 1 actionable finding [P1] Preserve a safe upgrade path for the retired network alias
Security None None.

How this fits together

These plugins translate OpenClaw message actions and call operations into platform requests and process incoming callbacks. Their Doctor contracts repair existing configuration before runtime validation.

flowchart LR
  A[Existing configuration] --> B[Doctor repairs]
  B --> C[Plugin configuration]
  D[Message and call actions] --> E[Plugin transport owners]
  C --> E
  E --> F[Messaging platforms and carriers]
  F --> G[Incoming callbacks]
  G --> E
Loading

Before merge

  • Preserve a safe upgrade path for the retired network alias (P1) - Removing the network contract leaves channels.mattermost.allowPrivateNetwork and account-level equivalents invalid under the strict schema, while findRetiredConfigUpgradeRequirement recognizes neither scope. Doctor can no longer migrate these inputs and can fall through to last-known-good recovery instead of preserving the active configuration with an intermediate-upgrade refusal. The documented cutoff explicitly requires that refusal even for pre-July formats. Retain the existing transform here, or add both-scope refusal and preservation coverage before retiring it.
  • Resolve merge risk (P1) - Legacy Mattermost configuration can lose its deterministic Doctor repair path and enter generic invalid-config recovery without an intermediate-upgrade refusal.
  • Complete next step (P2) - Restore Mattermost’s network alias migration and verify legacy root/account configuration remains safely repairable before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P1] Preserve a safe upgrade path for the retired network alias — extensions/mattermost/src/doctor-contract.ts:9-14
Agent review details

Security

None.

PR surface

Source -1232, Tests +74, Docs 0, Other -4. Total -1162 across 53 files.

View PR surface stats
Area Files Added Removed Net
Source 42 604 1836 -1232
Tests 9 159 85 +74
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 5 -4
Total 53 765 1927 -1162

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: extensions/mattermost/src/doctor-contract.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Retain the network migration (recommended)
    Restore the existing network normalizer and its regression coverage while keeping the other cleanup.
  2. Complete retirement separately
    Move migration retirement into a focused change that refuses both legacy scopes before recovery, names an intermediate release, and proves configuration preservation.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Restore Mattermost’s existing flat allowPrivateNetwork detection and normalization before streaming migration, preserve canonical-value precedence, and restore focused root/account regression coverage without changing unrelated refactors.

Technical review

Best possible solution:

Keep the transport simplifications while preserving Mattermost’s existing network migration until a safe retirement path has upgrade coverage.

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

Yes, from source: pass a Mattermost root or account configuration containing allowPrivateNetwork through Doctor repair; the removed transform leaves an invalid alias that the retirement checker does not recognize. Runtime execution was not performed.

Is this the best way to solve the issue?

Mostly yes: consolidating existing owners is appropriate, but deleting the migration without its retirement refusal is incomplete; retaining that transform is the narrowest repair.

Full review comments:

  • [P1] Preserve a safe upgrade path for the retired network alias — extensions/mattermost/src/doctor-contract.ts:9-14
    Removing the network contract leaves channels.mattermost.allowPrivateNetwork and account-level equivalents invalid under the strict schema, while findRetiredConfigUpgradeRequirement recognizes neither scope. Doctor can no longer migrate these inputs and can fall through to last-known-good recovery instead of preserving the active configuration with an intermediate-upgrade refusal. The documented cutoff explicitly requires that refusal even for pre-July formats. Retain the existing transform here, or add both-scope refusal and preservation coverage before retiring it.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is useful plugin cleanup with a bounded legacy-configuration upgrade defect.
  • add merge-risk: 🚨 compatibility: Removing the network migration changes how existing Mattermost configuration is repaired during Doctor and updates.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.

Label justifications:

  • P2: This is useful plugin cleanup with a bounded legacy-configuration upgrade defect.
  • merge-risk: 🚨 compatibility: Removing the network migration changes how existing Mattermost configuration is repaired during Doctor and updates.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.

Evidence

Acceptance criteria:

  • [P1] pnpm test extensions/mattermost/src/doctor.test.ts --maxWorkers=1.
  • [P1] pnpm test extensions/mattermost/src/doctor-contract.test.ts --maxWorkers=1.
  • [P1] pnpm test src/config/legacy-private-network-migration.test.ts --maxWorkers=1.
  • [P1] git diff --check.

What I checked:

  • Introduced migration removal: The pinned introduced diff removes both detection and normalization of Mattermost’s flat allowPrivateNetwork alias, leaving only streaming migration. The verified test merge preserves this removal. (extensions/mattermost/src/doctor-contract.ts:9, 67926abf2816)
  • Retirement contract: The documented July cutoff permits retiring older formats only with a clear refusal naming an intermediate release, and prohibits silently discarding persisted data. The retirement checker detects browser.ssrfPolicy.allowPrivateNetwork but does not detect the Mattermost root or account aliases. Public docs: docs/gateway/doctor/config-migrations.md. (docs/gateway/doctor/config-migrations.md:33, 67926abf2816)
  • Reachable recovery consequence: Mattermost’s strict schema accepts network.dangerouslyAllowPrivateNetwork, not the flat alias. Without its migration, automatic repair cannot produce a valid candidate; Doctor can then consider last-known-good recovery rather than issue the required retirement refusal. (src/commands/doctor-config-preflight-legacy-config.ts:112, 67926abf2816)
  • Shipped repair path: The latest supplied stable release still composes the network normalizer before streaming normalization. This establishes an existing repair path, without asserting that the release writes the legacy format. (extensions/mattermost/src/doctor-contract.ts:8, c074824a27c9)
  • Current-main necessity: Fetched main retains Mattermost’s network migration and Twilio’s truthiness guard that fails to remove an empty registered stream ID. The branch therefore contains meaningful work absent from main. (extensions/voice-call/src/providers/twilio.ts, ad23b8888d55)
  • Validation and proof scope: The captured PR body reports 2,684 plugin tests and 1,132 contract tests passing on Testbox, plus an empty-stream regression failing before the fix. It explicitly identifies these as synthetic tests and reports no live carrier or signed-in Mac execution. The supplied Repository State identifies the author as MEMBER; ordinary external-contributor proof is therefore exempt. Upgrade compatibility remains independently unresolved. (67926abf2816)

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore the network migration and verify root/account aliases preserve authored canonical values and unrelated configuration.

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.

@steipete
steipete merged commit 2d8a022 into main Oct 2, 2026
121 of 125 checks passed
@steipete
steipete deleted the deslop/l311-deslop-imessage-mattermost-voice-20261002 branch October 2, 2026 20:47
vincentkoc added a commit that referenced this pull request Oct 2, 2026
* commit '79be075e5aa46be9e42dbd53ed6e30e81469210a': (33 commits)
  fix(ui): keep selected-text comment input readable while scrolling (#163772)
  test(memory): open corpus database explicitly
  fix: bound Doctor migration capture to plugin data (#163780)
  fix(ui): gate system information at the shared reader (#160982)
  chore(db): reclassify worker inventory sites with caller evidence (#163754)
  refactor(channels): deslop Slack and Matrix (#163740)
  fix(agents): reject empty sessions_search queries in the tool schema (#129120)
  perf(nodes): load only what a worker turn needs (#160442)
  test(cli): assert concise Gateway failure copy in CLI process tests (#163649)
  refactor(discord): deslop discord (#163728)
  fix(workboard): make Sessions boards work on multi-agent Gateways (#163761)
  test(gateway): add sustained heap retention diagnostics (#163764)
  test(ui): disambiguate session filter controls
  refactor(plugins): deslop imessage, mattermost, and voice-call (#163767)
  fix(qa): run Telegram plugin source in --source-gateway userbot runs (#163718)
  feat(macos): add a --no-activate launch flag for background automation (#163758)
  fix(agents): preserve host authority across module reloads (#163725)
  perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (#163690)
  fix: keep video widgets scrollable and preload initial frames (#163762)
  feat(memory): add a provider-neutral memory provider runtime (#162175)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…law#163767)

Consolidate iMessage action encoding and reply authorization, Mattermost callback/setup definitions, and Voice Call carrier HTTP, frame, playback, and call-store plumbing. Remove 1,232 net production lines while preserving supported configuration, persisted records, carrier payloads, and model-facing descriptions.

Fix Twilio disconnect cleanup for an empty stream ID, retire the April Mattermost network-alias migration under the July-2026+ support policy, and correct the ngrok signature-verification documentation.

Validation: 2,684 plugin tests, 1,132 plugin-contract tests, original-code regression failure, production/test typechecks, clean owned-plugin lint, both cycle checks at zero, and independent review.
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Oct 3, 2026
* commit '1fda703fb4d3630e4633461967b2a2186e8f15fd': (33 commits)
  fix(ui): keep selected-text comment input readable while scrolling (openclaw#163772)
  test(memory): open corpus database explicitly
  fix: bound Doctor migration capture to plugin data (openclaw#163780)
  fix(ui): gate system information at the shared reader (openclaw#160982)
  chore(db): reclassify worker inventory sites with caller evidence (openclaw#163754)
  refactor(channels): deslop Slack and Matrix (openclaw#163740)
  fix(agents): reject empty sessions_search queries in the tool schema (openclaw#129120)
  perf(nodes): load only what a worker turn needs (openclaw#160442)
  test(cli): assert concise Gateway failure copy in CLI process tests (openclaw#163649)
  refactor(discord): deslop discord (openclaw#163728)
  fix(workboard): make Sessions boards work on multi-agent Gateways (openclaw#163761)
  test(gateway): add sustained heap retention diagnostics (openclaw#163764)
  test(ui): disambiguate session filter controls
  refactor(plugins): deslop imessage, mattermost, and voice-call (openclaw#163767)
  fix(qa): run Telegram plugin source in --source-gateway userbot runs (openclaw#163718)
  feat(macos): add a --no-activate launch flag for background automation (openclaw#163758)
  fix(agents): preserve host authority across module reloads (openclaw#163725)
  perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (openclaw#163690)
  fix: keep video widgets scrollable and preload initial frames (openclaw#163762)
  feat(memory): add a provider-neutral memory provider runtime (openclaw#162175)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: imessage Channel integration: imessage channel: mattermost Channel integration: mattermost channel: voice-call Channel integration: voice-call docs Improvements or additions to documentation size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant