Skip to content

fix: Mattermost fails to load after configured plugin repair#98608

Merged
shakkernerd merged 3 commits into
openclaw:mainfrom
jacobtomlinson:fix/98564-mattermost-activation
Jul 2, 2026
Merged

fix: Mattermost fails to load after configured plugin repair#98608
shakkernerd merged 3 commits into
openclaw:mainfrom
jacobtomlinson:fix/98564-mattermost-activation

Conversation

@jacobtomlinson

Copy link
Copy Markdown
Contributor

Closes #98564

AI-assisted: yes, prepared with Codex.

What Problem This Solves

Fixes an issue where users upgrading a configured Mattermost deployment from OpenClaw 2026.6.10 to 2026.6.11 could run openclaw doctor --fix, see the missing external Mattermost plugin installed, and still have the gateway start without Mattermost loaded.

We proved this locally with the reported container upgrade path: start a 2026.6.10 OpenClaw container with channels.mattermost.enabled=true, Mattermost baseUrl, and a bot token supplied through a SecretRef; verify Mattermost loads and connects; replace that container with ghcr.io/openclaw/openclaw:2026.6.11 while preserving the same state/config; run openclaw doctor --fix --non-interactive; then restart the 2026.6.11 gateway. After repair, the gateway still started with only the built-in plugin set and omitted Mattermost until plugins.entries.mattermost.enabled=true was set manually.

Why This Change Was Made

Doctor already materializes auto-enable candidates for plugins repaired from existing configuration. The missing piece was that repaired channel plugin IDs such as mattermost were treated like built-in channel activation because their plugin ID is also a channel ID. This change keeps repaired plugin activation on the plugin config path so doctor writes plugins.entries.<id>.enabled=true, which is the explicit activation contract non-bundled gateway channel plugins require.

User Impact

Users with configured Mattermost channels can upgrade from the bundled Mattermost release to the externalized Mattermost plugin release, run doctor repair, and have the gateway load Mattermost on restart without manually setting plugins.entries.mattermost.enabled=true.

Evidence

Manual local container proof for the regression:

  • 2026.6.10 container baseline loaded Mattermost and connected:
    http server listening (8 plugins: browser, canvas, device-pair, file-transfer, mattermost, memory-core, phone-control, talk-voice; ...)
    [mattermost] connected as @test
  • The same preserved state/config after switching to the 2026.6.11 container and running openclaw doctor --fix --non-interactive installed the plugin but the restarted gateway omitted Mattermost:
    Installed missing configured plugin "mattermost" from @openclaw/mattermost.
    http server listening (7 plugins: browser, canvas, device-pair, file-transfer, memory-core, phone-control, talk-voice; ...)
  • Setting plugins.entries.mattermost.enabled=true manually and restarting the same 2026.6.11 container made Mattermost load and connect again, proving the repair needed to materialize that activation bit.

Focused local validation for this patch:

  • node scripts/run-vitest.mjs src/config/plugin-auto-enable.channels.test.ts
  • node scripts/run-vitest.mjs src/commands/doctor/repair-sequencing.test.ts
  • node scripts/run-vitest.mjs src/config/plugin-auto-enable.core.test.ts
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode local

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jul 1, 2026
@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 2, 2026, 10:17 AM ET / 14:17 UTC.

Summary
The PR changes plugin auto-enable so repaired and non-bundled same-id channel plugins are persisted under plugins.entries, with Mattermost regression coverage.

PR surface: Source +6, Tests +100. Total +106 across 2 files.

Reproducibility: yes. source-reproducible: the linked report provides concrete 2026.6.10 to 2026.6.11 container logs, and current main source shows the same-id repaired candidate can route to channel activation while gateway startup requires explicit plugin activation. I did not rerun the Docker upgrade path.

Review metrics: 1 noteworthy metric.

  • Config repair activation path: 1 Doctor auto-enable materialization path changed. This path persists upgrade-time config used by gateway channel startup, so compatibility and patched-run proof matter before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #98564
Summary: This PR is a candidate fix for the Mattermost configured-plugin repair regression; the broader container-upgrade migration issue is adjacent but distinct.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR includes regression and manual-workaround logs, but it still needs redacted after-fix patched Doctor/gateway proof; after updating the PR body, ClawSweeper should re-review automatically or a maintainer can comment @clawsweeper re-review.

Risk before merge

  • [P1] The PR intentionally changes upgrade-time Doctor config materialization, so maintainers need patched upgrade proof before accepting the compatibility-sensitive repair.
  • [P1] The PR body proves the shipped failure and manual workaround, but not a patched run where Doctor writes plugins.entries.mattermost.enabled=true and the restarted gateway loads Mattermost.
  • [P1] fix(config): enable repaired external plugins whose id matches built-in channel #98975 is another open candidate for the same root cause, so landing both independently could create duplicate review/merge churn.

Maintainer options:

  1. Require patched Mattermost upgrade proof (recommended)
    Before merge, require redacted output from the patched branch showing openclaw doctor --fix writes explicit Mattermost plugin activation and the restarted gateway loads Mattermost.
  2. Choose one final candidate
    Maintainers should pick this PR or fix(config): enable repaired external plugins whose id matches built-in channel #98975 as the canonical repair path, then close or supersede the other after proof is positive.
  3. Accept source-level proof
    Maintainers may intentionally accept the focused source/tests plus reported workaround logs if release urgency outweighs rerunning the container upgrade path.

Next step before merge

  • [P1] The protected maintainer label, compatibility-sensitive config repair, missing patched-run proof, and overlapping open candidate make this a maintainer-review item rather than an automated repair lane.

Security
Cleared: Cleared: the diff touches config auto-enable logic and tests only, with no new dependency, workflow, secret-handling, or supply-chain surface.

Review details

Best possible solution:

Land one origin-aware config repair for the canonical Mattermost issue after redacted patched Doctor/gateway proof shows the activation bit is written and Mattermost loads on restart.

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

Yes, source-reproducible: the linked report provides concrete 2026.6.10 to 2026.6.11 container logs, and current main source shows the same-id repaired candidate can route to channel activation while gateway startup requires explicit plugin activation. I did not rerun the Docker upgrade path.

Is this the best way to solve the issue?

Yes, this appears to be the narrow owner-boundary fix: keep external same-id channel plugins on the plugins.entries activation path while preserving bundled channel activation. The remaining blocker is patched real behavior proof and maintainer choice between overlapping candidates.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 40d4e321105a.

Label changes

Label justifications:

  • P1: The PR targets an upgrade regression where a configured Mattermost channel is silently omitted from gateway startup, causing missed messages.
  • merge-risk: 🚨 compatibility: The patch changes Doctor’s upgrade-time repair by deciding where repaired external channel plugin activation is persisted.
  • merge-risk: 🚨 message-delivery: The affected activation path decides whether a configured Mattermost channel loads at gateway startup and receives messages.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR includes regression and manual-workaround logs, but it still needs redacted after-fix patched Doctor/gateway proof; after updating the PR body, ClawSweeper should re-review automatically or a maintainer can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +6, Tests +100. Total +106 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 9 3 +6
Tests 1 101 1 +100
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 110 4 +106

What I checked:

Likely related people:

  • vincentkoc: Authored the merged official plugin externalization work that made Mattermost external, and recent plugin auto-enable/repair work touches the same activation boundary. (role: externalization and config repair feature contributor; confidence: high; commits: f2eca9439189, 21728777dfa0; files: extensions/mattermost/package.json, package.json, src/config/plugin-auto-enable.shared.ts)
  • sunlit-deng: Authored the merged external channel gateway startup change that defines the explicit activation boundary this PR relies on. (role: adjacent gateway startup contributor; confidence: medium; commits: 21d3a70826fb; files: src/plugins/gateway-startup-plugin-ids.ts, src/plugins/channel-plugin-ids.test.ts)
  • jesse-merhi: Recently changed ClawHub/plugin install trust and Doctor repair surfaces adjacent to missing configured plugin installation. (role: recent plugin install and Doctor repair contributor; confidence: medium; commits: ec737ee74d9b; files: src/commands/doctor/repair-sequencing.ts, src/commands/doctor/shared/missing-configured-plugin-install.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jul 1, 2026
@shakkernerd shakkernerd self-assigned this Jul 2, 2026
@shakkernerd
shakkernerd force-pushed the fix/98564-mattermost-activation branch from b81c2eb to 8d4b0ab Compare July 2, 2026 16:09
@shakkernerd
shakkernerd merged commit c032f98 into openclaw:main Jul 2, 2026
95 checks passed
@shakkernerd

Copy link
Copy Markdown
Member

Merged using rebase.

What changed after review:

  • Added repaired Mattermost allowlist coverage for restrictive plugins.allow.
  • Preserved plugin-entry activation for same-id external channel plugins.
  • Guarded the built-in channel fallback so unrelated same-id plugins do not steal built-in channel auto-enable.

Verification:

  • Rebased/refreshed onto current origin/main before pushing.
  • Testbox-through-Crabbox tbx_01kwhscz0c4jt33039d8y11g8m: node scripts/run-vitest.mjs src/config/plugin-auto-enable.channels.test.ts passed, 17/17 tests.
  • Auto-review: clean on prepared head 8d4b0ab.
  • GitHub checks: no required checks reported; relevant config/lint/type/security checks green before merge.

Landed on main:

Thanks @jacobtomlinson!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Mattermost repair installs external plugin without enabling gateway startup

2 participants