fix(config): enable repaired external plugins whose id matches built-in channel#98975
fix(config): enable repaired external plugins whose id matches built-in channel#98975yaotukeji wants to merge 3 commits into
Conversation
…in channel When doctor --fix repairs a configured external plugin whose pluginId coincides with a built-in chat channel id (e.g. mattermost), materializePluginAutoEnableCandidates was writing the activation bit to channels.<id>.enabled instead of plugins.entries.<id>.enabled. Gateway startup only honors the plugin entry for non-bundled plugins, so the repaired plugin was silently omitted. This change makes resolveAutoEnableChannelId return null for configured-plugin-repaired candidates, so the activation is materialized as plugins.entries.<id>.enabled=true. Fixes openclaw#98564 Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close: this PR is superseded by the merged canonical fix in #98608, and current main already has the requested repaired-external-plugin activation behavior with broader coverage. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Keep #98608 as the canonical merged fix and close this redundant branch rather than landing a second overlapping activation change. So I’m closing this here and keeping the remaining discussion on #98608. Review detailsBest possible solution: Keep #98608 as the canonical merged fix and close this redundant branch rather than landing a second overlapping activation change. Do we have a high-confidence way to reproduce the issue? Yes for the original shipped regression: the linked issue gives concrete 2026.6.10 to 2026.6.11 Docker logs, and source shows non-bundled gateway startup requires explicit plugin activation. Current main now contains the repaired activation path. Is this the best way to solve the issue? Yes, the merged implementation in #98608 is the better current solution because it covers this repaired-plugin case plus same-id external channel and allowlist/fallback invariants. This PR should not land separately. Security review: Security review cleared: Cleared: the diff only touches config auto-enable logic and a colocated test, with no new dependency, workflow, secret, or supply-chain surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 019603d33602; fix evidence: commit 48f4a09e1fd8, main fix timestamp 2026-07-02T17:13:38+01:00. |
The regression test for issue openclaw#98564 used origin: 'npm', but PluginOrigin only accepts bundled | global | workspace | config. This caused check-test-types to fail with TS2322. Use 'global' to represent the externalized Mattermost plugin. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…-enable-gateway-startup
|
ClawSweeper applied the proposed close for this PR.
|
What Problem This Solves
After Mattermost was externalized in 2026.6.11, running
openclaw doctor --fixon an upgraded container installs@openclaw/mattermostbut does not enable it for gateway startup. The gateway starts with only 7 plugins and silently omits Mattermost, causing message loss. The root cause is thatmaterializePluginAutoEnableCandidateswrites the activation bit tochannels.mattermost.enabledbecause "mattermost" is also a built-in channel id, but gateway startup for non-bundled plugins requiresplugins.entries.mattermost.enabled=true.Changes
src/config/plugin-auto-enable.shared.ts: makeresolveAutoEnableChannelIdreturnnullforconfigured-plugin-repairedcandidates, so activation is written toplugins.entries.<id>.enabled.src/config/plugin-auto-enable.core.test.ts: add regression test covering a repaired external plugin whose id matches a built-in channel id.Evidence
plugins.entries.mattermost.enabledistrueandchannels.mattermost.enabledis not set for aconfigured-plugin-repairedcandidate.src/config/plugin-auto-enable.core.test.ts: 52 passedsrc/commands/doctor/repair-sequencing.test.ts: 15 passedRelated
Fixes #98564
This PR was prepared with AI assistance. The contributor has reviewed every change, verified local tests pass, and takes full responsibility for this submission.