Skip to content

Treat plugins.enabled=false as a gateway startup fast path#73041

Merged
steipete merged 2 commits into
openclaw:mainfrom
WuKongAI-CMU:fix/gateway-plugin-disable-fastpath
Apr 27, 2026
Merged

Treat plugins.enabled=false as a gateway startup fast path#73041
steipete merged 2 commits into
openclaw:mainfrom
WuKongAI-CMU:fix/gateway-plugin-disable-fastpath

Conversation

@WuKongAI-CMU

Copy link
Copy Markdown
Contributor

Summary

  • skip plugin manifest registry and auto-enable discovery when plugins.enabled=false
  • bypass gateway plugin lookup/runtime-deps staging while plugins are globally disabled
  • make doctor stale-plugin cleanup inert under the global plugin-disable setting while preserving blocker warnings

Verification

  • pnpm docs:list
  • pnpm test src/gateway/server-startup-plugins.test.ts src/config/plugin-auto-enable.core.test.ts src/commands/doctor/shared/stale-plugin-config.test.ts src/commands/doctor/shared/preview-warnings.test.ts
  • pnpm check:changed
  • pnpm build

Notes

This was tested in an isolated /tmp/openclaw-gateway-containment-20260427 worktree so the main local checkout remains untouched.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations size: S triage: refactor-only Candidate: refactor/cleanup-only PR without maintainer context. labels Apr 27, 2026
@greptile-apps

greptile-apps Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds plugins.enabled=false as a fast-path across the gateway startup, plugin auto-enable, and doctor stale-plugin cleanup paths. Each affected function now short-circuits early when plugins are globally disabled, avoiding manifest registry loading, auto-enable discovery, and loadPluginLookUpTable. Tests cover all four changed modules. The changes are focused and consistent.

Confidence Score: 5/5

Safe to merge — all fast-path guards are consistent, each function has its own early-return, and new tests confirm the expected bypass behavior.

No P0 or P1 issues found. The plugins.enabled === false guard appears correctly at every relevant call site. The outer guard added in preview-warnings.ts is intentionally redundant — it prevents the dynamic import of stale-plugin-config.js entirely, which is a deliberate optimization. All assertions in the new tests are consistent with the implementation.

No files require special attention.

Reviews (1): Last reviewed commit: "Prevent disabled plugins from warming th..." | Re-trigger Greptile

@WuKongAI-CMU
WuKongAI-CMU force-pushed the fix/gateway-plugin-disable-fastpath branch from c012363 to 056d301 Compare April 27, 2026 21:21
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord extensions: memory-wiki extensions: memory-core Extension: memory-core size: M and removed size: S labels Apr 27, 2026
@WuKongAI-CMU
WuKongAI-CMU force-pushed the fix/gateway-plugin-disable-fastpath branch from 7f72327 to 03f80ec Compare April 27, 2026 22:02
Intern Dev and others added 2 commits April 27, 2026 23:54
A local containment profile uses plugins.enabled=false to stop plugin and channel runtime churn. The previous startup path still built plugin lookup tables and doctor stale scans despite the global disable, which made the switch noisy and slow.

Constraint: plugins.enabled=false must leave channel blocker warnings intact while treating stale plugin config as inert.
Rejected: Clear user plugin config automatically | would mutate a reversible containment setting.
Confidence: high
Scope-risk: narrow
Directive: Do not reintroduce plugin registry discovery before checking plugins.enabled.
Tested: pnpm test src/gateway/server-startup-plugins.test.ts src/config/plugin-auto-enable.core.test.ts src/commands/doctor/shared/stale-plugin-config.test.ts src/commands/doctor/shared/preview-warnings.test.ts
Tested: pnpm check:changed
Tested: pnpm build
@steipete
steipete force-pushed the fix/gateway-plugin-disable-fastpath branch from 03f80ec to b716508 Compare April 27, 2026 22:57
@openclaw-barnacle openclaw-barnacle Bot removed the extensions: memory-core Extension: memory-core label Apr 27, 2026
@steipete
steipete merged commit 5e8cc1d into openclaw:main Apr 27, 2026
11 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Landed via rebase onto main.

Proof before merge:

  • Blacksmith Testbox: pnpm test:serial src/gateway/server-startup-plugins.test.ts src/config/plugin-auto-enable.core.test.ts src/commands/doctor/shared/stale-plugin-config.test.ts src/commands/doctor/shared/preview-warnings.test.ts && pnpm check:changed && pnpm build
  • Result: passed.

Land commit: b716508
Merge commit: 5e8cc1d

Thanks @WuKongAI-CMU.

ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations gateway Gateway runtime size: S triage: refactor-only Candidate: refactor/cleanup-only PR without maintainer context.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants