Repository navigation
refactor(channels): deslop Slack and Matrix - #163740
Conversation
Consolidate channel policy, routing and metadata handling with their existing owners; unify Matrix recovery-key settlement and remove redundant wrappers, types and state projections. Retire configuration migrations for shapes that were already obsolete before July while preserving supported configuration, persisted data, wire payloads, tool descriptions and visible UI. Bound newly created Matrix pairing cooldown records to the existing sender cap, and make the public compatibility chunker terminate for nonpositive limits. Regression proof demonstrates both original failures. Shrink the assertion-safety ratchet after removing ten unsafe casts.
|
🦞👀 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 October 2, 2026, 5:01 PM ET / 21:01 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch consolidates Slack and Matrix handling, retires older configuration migrations with recovery guidance, bounds Matrix pairing cooldown records, and fixes chunking with nonpositive limits. Merge readiness✅ Ready for maintainer review The PR remains useful: current main and the latest release retain the two reported Matrix defects. The earlier Doctor blocker is resolved, and this review found no actionable introduced defect. Priority: P2 Review scores
Verification
How this fits togetherSlack and Matrix plugins translate channel events and configuration into OpenClaw agent sessions, approvals, and outbound messages. Doctor prepares older configuration before those plugins start. flowchart TD
A[Channel configuration] --> B[Doctor compatibility checks]
B --> C[Slack and Matrix plugins]
B --> D[Intermediate upgrade guidance]
E[Messages and interactions] --> C
C --> F[Agent sessions and approvals]
F --> G[Channel replies]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -1103, Tests -202, Docs +3, Other -1. Total -1303 across 64 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep canonical channel behavior under its existing owners, with safe refusal and intermediate-upgrade guidance for retired configuration. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main and v2026.9.7 show the nonadvancing chunker loop and the pairing branch that bypasses eviction. This reviewer did not execute either path. Is this the best way to solve the issue? Yes. The changes consolidate existing owners, preserve supported contracts, and guard retired inputs before destructive recovery; no competing implementation or introduced correctness defect was found. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cb450bced528. 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.
|
* 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) ...
* refactor(channels): deslop Slack and Matrix Consolidate channel policy, routing and metadata handling with their existing owners; unify Matrix recovery-key settlement and remove redundant wrappers, types and state projections. Retire configuration migrations for shapes that were already obsolete before July while preserving supported configuration, persisted data, wire payloads, tool descriptions and visible UI. Bound newly created Matrix pairing cooldown records to the existing sender cap, and make the public compatibility chunker terminate for nonpositive limits. Regression proof demonstrates both original failures. Shrink the assertion-safety ratchet after removing ten unsafe casts. * fix(doctor): guard retired Slack and Matrix config
* 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) ...
What Problem This Solves
This maintainer-requested batch addresses duplicated Slack and Matrix runtime contracts, forwarding paths, and migration-only code predating the supported July configuration shapes. This batch removes 1,103 net production lines without moving code elsewhere.
User Impact
July 2026+ configuration, persisted data, wire payloads, model-facing descriptions, and visible UI remain unchanged. Matrix pairing cooldown state now stays bounded when every request is newly created, and the public compatibility chunker terminates for nonpositive limits.
Why This Change Was Made
Fixes found along the way
Evidence
node scripts/check-changed.mjs --base d20ba7392c1de16a0eb9dab79336ade5ebf996a3passed, including typechecks, lint, Doctor closure checks, all structural ratchets, and zero unused exports.pnpm test <file> --maxWorkers=1runs.pnpm buildpassed (13m 0.7s), including plugin SDK export and CLI bootstrap guards. The Slack/Matrix dependency audit passed with no unused dependencies.b61119eba245d9d687db5c25108b8eb26a1b4104: https://github.com/openclaw/openclaw/actions/runs/37055017214. That review identified a missing retirement guard; the follow-up adds the guard and real Doctor include/backup preservation coverage. The correction independently reviewed clean at P0/P1. Its two new retirement cases failed with the original detector; all 15 candidate Doctor include/backup cases passed, preserving root, include and backup bytes. OpenClaw 2026.9.5 was checked to contain every named intermediary transform. The correction passed its changed-file gate (all 27 core test type graphs, lint, dead exports, and ratchets), both zero-cycle gates, the Doctor preflight/Slack/Matrix tests, and all plugin-contract tests. Final-head CI passed one2890be6a6569991fea73777fb2510e302943f5c: https://github.com/openclaw/openclaw/actions/runs/37062141593. ClawSweeper revision 2 reviewed that head with no actionable findings and confirmed the prior Doctor issue resolved.Measured changed-test wall times
These one-worker Linux measurements include test-process, transform, import, and compiled-worker setup. No new process boots, real timers, sleeps, or polling were added. The new pairing case itself took 44 ms; each new chunk-limit case took 5 ms. Long wall times in the existing handler/outbound suites are dominated by their pre-existing worker/import preparation (76–92% transform in the cold runs), not the new assertions. The added Matrix/Slack refusal cases took 1.172 s and 0.670 s; their canonical control took 12.874 s through the real Doctor flow. This protects include and backup preservation before repair, which a detector-only unit test cannot establish. The first hosted CI run completed in 458 s; the final-head run completed in 559 s.
extensions/matrix/src/doctor.test.tsextensions/matrix/src/matrix/monitor/handler.pairing.test.tsextensions/matrix/src/matrix/poll-types.test.tsextensions/matrix/src/outbound.test.tsextensions/slack/src/accounts.test.tsextensions/slack/src/doctor.test.tsextensions/slack/src/monitor/message-handler/prepare.route-owner-admission.test.tsextensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.tsextensions/slack/src/monitor/slash.test.tsextensions/slack/src/shared.test.tsextensions/slack/src/stream-mode.test.tssrc/plugins/contracts/plugin-sdk-runtime-api-guardrails.test.tssrc/commands/doctor-config-flow.include-refusal.test.ts