Skip to content

fix(cli): keep plugin toggles out of channel config - #76525

Merged
vincentkoc merged 1 commit into
mainfrom
fix/plugin-cli-channel-policy
May 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/plugin-cli-channel-policy

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • keep openclaw plugins enable / disable scoped to plugin policy instead of creating channels.<id> config
  • cover CLI policy forwarding so channel config sync stays opt-in
  • add changelog note

Validation

  • pnpm test:serial src/cli/plugins-cli.policy.test.ts
  • Crabbox AWS targeted Twitch lifecycle: install/inspect/disable/enable/doctor/uninstall, 0 failures, 0 observations, max RSS ~510 MB
  • Crabbox Blacksmith-backed pnpm check:changed: selected core/coreTests/docs only, passed

@vincentkoc vincentkoc self-assigned this May 3, 2026
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS maintainer Maintainer-authored PR labels May 3, 2026
@clawsweeper

clawsweeper Bot commented May 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
The PR changes CLI plugin enable/disable handlers to pass the existing channel-config opt-out, updates CLI policy tests and mocks, and adds a changelog entry.

Reproducibility: yes. by source inspection against current main: CLI enable/disable omit updateChannelConfig:false, and the shared toggle helper writes channels..enabled for built-in channel ids by default. I did not execute the command because this review is read-only.

Next step before merge
No repair job: the open PR already contains the narrow fix and has no discrete automated repair finding; maintainer review and merge gates are the remaining path.

Security
Cleared: The diff only touches CLI policy calls, tests, mocks, and changelog text; it does not add dependency, workflow, install-script, secret, or permission changes.

Review details

Best possible solution:

Land this narrow CLI-scoped fix after normal maintainer review and merge gates, preserving channel config sync only for setup paths that intentionally opt into it.

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

Yes, by source inspection against current main: CLI enable/disable omit updateChannelConfig:false, and the shared toggle helper writes channels..enabled for built-in channel ids by default. I did not execute the command because this review is read-only.

Is this the best way to solve the issue?

Yes. The diff uses the existing updateChannelConfig:false seam at the CLI policy boundary, keeping the helper default available for onboarding/setup flows that intentionally sync channel config.

What I checked:

  • Current main CLI path: Current main calls enablePluginInConfig and setPluginEnabledInConfig from plugins enable/disable without updateChannelConfig:false, so it takes the helper default. (src/cli/plugins-cli.ts:129, b74401074b6e)
  • Existing opt-out seam: setPluginEnabledInConfig already skips writing channels. when options.updateChannelConfig === false; otherwise built-in channel ids materialize channels..enabled. (src/plugins/toggle-config.ts:27, b74401074b6e)
  • Existing helper contract test: Current tests already document that enablePluginInConfig(..., { updateChannelConfig:false }) enables the plugin entry without creating channels.twitch. (src/plugins/enable.test.ts:154, b74401074b6e)
  • PR diff scope: The PR head applies updateChannelConfig:false only to CLI policy enable/disable, widens the CLI mock to forward variadic helper args, adds policy coverage, and adds one changelog line. (src/cli/plugins-cli.ts:126, 49e99c911255)
  • Reported validation: The PR body reports pnpm test:serial src/cli/plugins-cli.policy.test.ts, a targeted Twitch lifecycle probe, and Blacksmith-backed pnpm check:changed passing. (49e99c911255)
  • Protected handling signal: GitHub issue metadata shows author_association MEMBER and the maintainer label, so this cleanup review should not close the PR even with a clean review.

Likely related people:

  • ai-hpc: The current src/cli/plugins-cli.ts, src/plugins/enable.ts, src/plugins/toggle-config.ts, and policy test files were introduced in the merged fix(cli): reject missing plugin ids before config writes #73554 squash commit authored by ai-hpc/NVIDIAN. (role: introduced current CLI policy path; confidence: high; commits: 6a3f5d0b1f35; files: src/cli/plugins-cli.ts, src/cli/plugins-cli.policy.test.ts, src/plugins/enable.ts)
  • hxy91819: The fix(cli): reject missing plugin ids before config writes #73554 merge metadata lists hxy91819 as reviewer and co-author/assignee for the commit that created the current CLI plugin policy files. (role: reviewer/merger of adjacent CLI policy work; confidence: medium; commits: 6a3f5d0b1f35; files: src/cli/plugins-cli.ts, src/cli/plugins-cli.policy.test.ts)
  • steipete: Commit 87603b5 added the shared built-in channel enablement sync through setPluginEnabledInConfig and related tests, which is the behavior this PR narrows for CLI toggles. (role: introduced built-in channel config sync behavior; confidence: high; commits: 87603b5c45e5; files: src/plugins/toggle-config.ts, src/plugins/enable.ts, src/cli/plugins-config.test.ts)
  • vincentkoc: Recent current-main plugin policy work by vincentkoc updated plugin enable result metadata, CLI policy refresh arguments, and adjacent plugin install/uninstall behavior, making him a current owner beyond authoring this PR. (role: recent maintainer of plugin policy refresh path; confidence: high; commits: 579acc3a917c, caba05b94a26; files: src/cli/plugins-cli.ts, src/cli/plugins-cli.policy.test.ts, src/cli/plugins-cli-test-helpers.ts)

Remaining risk / open question:

  • This read-only sweep did not rerun Vitest or changed-gate commands; validation evidence is from source/diff inspection and the PR-reported checks.

Codex review notes: model gpt-5.5, reasoning high; reviewed against b74401074b6e.

@vincentkoc
vincentkoc force-pushed the fix/plugin-cli-channel-policy branch from 49e99c9 to f73cb7a Compare May 3, 2026 07:19
@vincentkoc
vincentkoc merged commit 74f243a into main May 3, 2026
74 of 76 checks passed
@vincentkoc
vincentkoc deleted the fix/plugin-cli-channel-policy branch May 3, 2026 07:19
lxe pushed a commit to lxe/openclaw that referenced this pull request May 6, 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

cli CLI command changes maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant