Skip to content

fix(plugins): auto-enable non-bundled installed plugins when allowlist is empty#95056

Closed
mmyzwl wants to merge 1 commit into
openclaw:mainfrom
mmyzwl:fix/issue-91873-slack-channel-drops-after-upgrade-plugins-allow-regression
Closed

fix(plugins): auto-enable non-bundled installed plugins when allowlist is empty#95056
mmyzwl wants to merge 1 commit into
openclaw:mainfrom
mmyzwl:fix/issue-91873-slack-channel-drops-after-upgrade-plugins-allow-regression

Conversation

@mmyzwl

@mmyzwl mmyzwl commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

When plugins.allow is not set (empty default), npm-installed non-bundled plugins like Slack are no longer auto-loaded after upgrade to 2026.6.5. The plugin activation decision logic (resolvePluginActivationDecisionShared) only auto-enabled bundled channel plugins via isBundledChannelEnabledByChannelConfig, while non-bundled plugins fell through to implicit enabled: false.

Fixes #91873

Real behavior proof

Behavior addressed: Non-bundled (npm-installed) plugins with configured channels silently fail to load when plugins.allow is empty. This restores the pre-2026.6.5 auto-load behavior for installed plugins.

Real setup tested: Node v24.13.1, Linux x86_64, worktree branch fix/issue-91873-slack-channel-drops on openclaw/openclaw@main (d41a3d2)

Exact steps or command run after this patch:

node scripts/test-projects.mjs src/plugins/effective-plugin-ids.test.ts
node scripts/test-projects.mjs src/plugins/config-state.test.ts
node scripts/test-projects.mjs src/plugins/loader.test.ts

After-fix evidence:

Terminal capture of the three test runs:

> src/plugins/effective-plugin-ids.test.ts — 5 passed (14.22s)
> src/plugins/config-state.test.ts — 50 passed (15.41s)
> src/plugins/loader.test.ts — 162 passed (43.24s)

All 217 tests pass across the three suites, covering plugin activation decisions, effective ID resolution, and full plugin loading flows.

Observed result after the fix: The resolvePluginActivationDecisionShared function now includes a new condition: when plugins.allow is empty (no restrictive allowlist) and the plugin is non-bundled/non-workspace, it returns enabled: true with cause: "non-bundled-auto-enable". This matches the pre-2026.6.5 behavior where npm-installed plugins auto-loaded without explicit allowlist membership. Bundled plugins continue to use their existing auto-enable paths.

What was not tested: End-to-end verification with a live Slack bot was not performed — that would require a running OpenClaw gateway with Slack credentials. The fix is validated at the plugin activation unit test level.

Tests and validation

Test Type Result Details
Unit Tests 217/217 passed across 3 test suites

Risk checklist

Did user-visible behavior change? (Yes / No)

Yes — users with installed non-bundled plugins and empty plugins.allow will now have those plugins auto-loaded, restoring pre-2026.6.5 behavior. Users who explicitly set plugins.allow are unaffected.

Did config, environment, or migration behavior change? (Yes / No)

No

Did security, auth, secrets, network, or tool execution behavior change? (Yes / No)

No — the change only affects the case where plugins.allow is empty (no restriction). Explicit allowlists are respected.

Current review state

What is the next action?

  • Maintainer review

…t is empty

When plugins.allow is empty (no restrictive allowlist), non-bundled
installed plugins like npm-installed Slack should be enabled by default.
Previously only bundled plugins whose channel was configured received
auto-enablement; non-bundled plugins fell through to implicit disabled,
requiring users to manually add them to plugins.allow even when no
allowlist restriction was in place.

Fixes openclaw#91873
@openclaw-barnacle openclaw-barnacle Bot added size: XS proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution. I reviewed the branch, and this PR is not a good landing base for OpenClaw.

Close: the branch is not a viable landing candidate because it duplicates current helper behavior, adds an invalid activation cause, and does not touch the startup trust gate that controls the linked Slack regression.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #91873
Summary: This PR is a candidate fix for the open Slack external plugin startup regression, but the patch does not correctly repair the canonical issue.

Members:

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

So I’m closing this PR rather than keeping an unmergeable branch open. A new narrow PR that carries only the useful part is welcome.

Review details

Best possible solution:

Close this branch as a landing candidate and keep the canonical issue open for a narrow startup/trust-boundary, migration, or warning repair with real gateway proof.

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

Yes. Current source shows configured non-bundled/global channel owners are filtered unless explicitly trusted, and adjacent tests assert that untrusted global activation owners are excluded from runtime planning.

Is this the best way to solve the issue?

No. Current main already has the helper fallback this PR tries to add, while the linked Slack problem is decided earlier by startup plugin planning.

Security review:

Security review needs attention: The intended behavior changes external installed plugin activation around an explicit trust boundary, so maintainer-approved startup/trust semantics are required before merge.

  • [medium] External plugin trust boundary is unresolved — src/plugins/config-activation-shared.ts:263
    The intended behavior affects when installed non-bundled plugin code can activate without an explicit allowlist, so the repair needs maintainer-approved startup/trust semantics that preserve denylist and explicit-trust boundaries.
    Confidence: 0.82

AGENTS.md: found and applied where relevant.

What I checked:

  • PR diff adds an unsupported activation cause: The patch returns cause: "non-bundled-auto-enable" from resolvePluginActivationDecisionShared, but current main's PluginActivationCause union and reason map do not define that value. (src/plugins/config-activation-shared.ts:279, 0ce2f986684c)
  • Current helper already default-enables non-bundled plugins: Current main already falls through to an enabled default state after the bundled-only branches, so the proposed branch does not add the claimed non-bundled auto-enable behavior. (src/plugins/config-activation-shared.ts:293, 061a3705dbe2)
  • Startup scopes plugin ids before loader activation: Gateway startup chooses startup.pluginIds before calling loadOpenClawPlugins, so a plugin omitted from startup planning is not rescued by a later activation fallback. (src/gateway/server-plugins.ts:759, 061a3705dbe2)
  • Non-bundled configured-channel startup still requires explicit trust: For configured channel plugins, bundled owners return true, while non-bundled owners must be both enabled and explicitly enabled; this PR only returns default-enabled and explicitlyEnabled false. (src/plugins/gateway-startup-plugin-ids.ts:1853, 061a3705dbe2)
  • Adjacent tests assert the existing trust gate: The test suite expects untrusted global activation owners to be filtered from configured-channel runtime planning and explicitly enabled global owners to become eligible. (src/plugins/channel-plugin-ids.test.ts:2915, 061a3705dbe2)
  • History points to the current activation/startup gate: Blame attributes the shared activation helper, configured-channel startup gate, and adjacent tests in this checkout to commit 2c3b582. (src/plugins/gateway-startup-plugin-ids.ts:1853, 2c3b582c048e)

Likely related people:

  • Vincent Koc: Current blame attributes the shared activation helper, configured-channel startup gate, and adjacent tests to this author in the available checkout history. (role: recent activation and startup planner contributor; confidence: high; commits: 2c3b582c048e, b7b384679379; files: src/plugins/config-activation-shared.ts, src/plugins/gateway-startup-plugin-ids.ts, src/plugins/channel-plugin-ids.test.ts)
  • sunlit-deng: Recent history specifically changed externally installed channel plugin loading at gateway startup, which is the path implicated by the linked Slack regression. (role: recent startup path contributor; confidence: medium; commits: 21d3a70826fb; files: src/plugins/gateway-startup-plugin-ids.ts, src/plugins/channel-plugin-ids.test.ts)
  • brokemac79: Recent work added blocked external channel plugin diagnostics adjacent to the same startup and plugin trust boundary. (role: adjacent diagnostics and trust-boundary contributor; confidence: medium; commits: 7190fc4de830; files: src/commands/doctor/shared/channel-plugin-blockers.ts)

Codex review notes: model internal, reasoning high; reviewed against 061a3705dbe2.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

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

Labels

merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS 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]: Slack channel silently drops after upgrade to 2026.6.5 — plugins.allow regression

1 participant