Treat plugins.enabled=false as a gateway startup fast path#73041
Conversation
Greptile SummaryThis PR adds Confidence Score: 5/5Safe 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 |
c012363 to
056d301
Compare
7f72327 to
03f80ec
Compare
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
03f80ec to
b716508
Compare
|
Landed via rebase onto Proof before merge:
Land commit: b716508 Thanks @WuKongAI-CMU. |
Summary
plugins.enabled=falseVerification
pnpm docs:listpnpm 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.tspnpm check:changedpnpm buildNotes
This was tested in an isolated
/tmp/openclaw-gateway-containment-20260427worktree so the main local checkout remains untouched.