Skip to content

fix(plugins): emit actionable install hint for externalized channel plugins (#77483) - #77502

Merged
Patrick-Erichsen merged 2 commits into
openclaw:mainfrom
hclsys:fix/77483-externalized-channel-plugin-migration-hint
May 4, 2026
Merged

Patrick-Erichsen merged 2 commits into
openclaw:mainfrom
hclsys:fix/77483-externalized-channel-plugin-migration-hint

Conversation

@hclsys

@hclsys hclsys commented May 4, 2026 •

Copy link
Copy Markdown

Summary

  • Problem: upgrades can leave previously bundled official plugins configured but not installed, while config validation says the entries are stale and should be removed.
  • Why it matters: that wording sends operators in the wrong direction during the 5.x external-plugin migration and can prolong channel outages.
  • What changed: missing plugins.entries.* and plugins.allow refs now consult the official external plugin catalog and show openclaw plugins install <spec> when the plugin is cataloged.
  • What did NOT change: no startup/postinstall package-manager installs; explicit install/update and doctor repair remain the install surfaces.

Change Type

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Root Cause

  • Root cause: config validation treated every missing configured plugin as stale config, even when the official external plugin catalog knew the package is installable.
  • Missing detection / guardrail: no regression test covered the validation warning for a missing configured official external plugin.
  • Contributing context: several formerly bundled plugins now resolve through official external package metadata during the 5.x migration.

Regression Test Plan

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
  • Target test or file: src/config/config.plugin-validation.test.ts
  • Scenario the test should lock in: a missing configured official external plugin emits an install command from catalog metadata, not stale/remove wording.
  • Why this is the smallest reliable guardrail: it exercises the config validation warning path that operators see without running package managers.
  • Existing test that already covers this: src/commands/doctor/shared/missing-configured-plugin-install.test.ts covers doctor repair installation.

User-visible / Behavior Changes

Missing configured official external plugins now warn like:

plugin not installed: brave — install the official external plugin with: openclaw plugins install @openclaw/brave-plugin

Diagram

Before:
configured official plugin missing -> stale/remove warning

After:
configured official plugin missing -> official catalog lookup -> install command warning

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Linux Testbox via Blacksmith
  • Runtime/container: Node 22 / pnpm workspace
  • Integration/channel: plugin config validation and doctor plugin repair
  • Relevant config: synthetic missing official plugin config in tests

Steps

  1. Configure a missing official external plugin under plugins.entries or plugins.allow.
  2. Run config validation.

Expected

  • Validation points to openclaw plugins install <catalog spec>.

Actual Before

  • Validation said stale config entry ignored; remove it from plugins config.

Evidence

  • Failing test/log before + passing after

Human Verification

  • Verified scenarios: plugins.entries.brave, plugins.allow.brave, existing plugins.allow.discord, and doctor missing-configured-plugin repair coverage.
  • Edge cases checked: non-catalog missing plugins still keep the generic stale warning; blocked plugin diagnostics still take precedence.
  • What I did not verify: historical live package upgrade from 2026.4.27 to 2026.5.2.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: catalog drift could make hints stale.
    • Mitigation: the warning derives from src/plugins/official-external-plugin-catalog.ts instead of a duplicated hardcoded map.

Verification

  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/config/validation.ts src/config/config.plugin-validation.test.ts
  • pnpm testbox:run --id tbx_01kqte3ztehvpxgbgykk83r20f -- env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:serial src/config/config.plugin-validation.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts
  • pnpm testbox:run --id tbx_01kqte3ztehvpxgbgykk83r20f -- env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm check:changed

@clawsweeper

clawsweeper Bot commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Summary
The PR adds catalog-backed install hints for missing configured official external plugins in config validation, updates regression tests, and records an Unreleased changelog entry.

Reproducibility: yes. source-reproducible: current main's warn-only missing plugin path emits stale/remove warnings for plugins.entries and plugins.allow, and the existing Discord test expected that stale warning. I did not run local tests in this read-only review, but the PR head and check-runs cover the intended regression path.

Next step before merge
No repair job is needed; the open PR already contains a focused implementation with passing checks and no review findings.

Security
Cleared: The diff changes config warning text, tests, and changelog only; it adds no dependency installation, network, secret, CI, permission, or package execution surface.

Review details

Best possible solution:

Merge the catalog-backed warning path, then keep any broader auto-install or upgrade-documentation policy follow-up on the linked issue if maintainers want more than diagnostic guidance.

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

Yes, source-reproducible: current main's warn-only missing plugin path emits stale/remove warnings for plugins.entries and plugins.allow, and the existing Discord test expected that stale warning. I did not run local tests in this read-only review, but the PR head and check-runs cover the intended regression path.

Is this the best way to solve the issue?

Yes. Using the existing official external plugin catalog and install resolver is the narrowest maintainable fix, avoids startup or postinstall package-manager work, and preserves blocked-plugin and unknown-plugin behavior.

What I checked:

Likely related people:

  • vincentkoc: git blame attributes the current missing-plugin warning closure to Vincent Koc, and recent main history shows external catalog contract and official channel package loading work by the same maintainer. (role: current validation and external plugin catalog maintainer; confidence: high; commits: 2511be524466, b5affa64b3bb, 4781b46056e8; files: src/config/validation.ts, src/plugins/official-external-plugin-catalog.ts, scripts/lib/official-external-plugin-catalog.json)
  • steipete: Recent GitHub history for src/config/validation.ts includes blocked plugin validation and config validation fixes by Peter Steinberger, adjacent to the diagnostic path this PR changes. (role: adjacent config/plugin policy maintainer; confidence: medium; commits: f74e901794c1, 81fea91fdaee, 0031ef3120bd; files: src/config/validation.ts, docs/tools/plugin.md, src/plugins)

Remaining risk / open question:

  • The linked issue's broader package-upgrade outage may still need separate docs or migration work; this PR intentionally covers only the misleading validation hint.

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

@vincentkoc
vincentkoc force-pushed the fix/77483-externalized-channel-plugin-migration-hint branch from ca553e7 to fb35185 Compare May 4, 2026 21:32
@vincentkoc

Copy link
Copy Markdown
Member

Updated this PR against latest origin/main and replaced the duplicated EXTERNALIZED_CHANNEL_PLUGIN_IDS map with official catalog-backed resolution.

Summary:

  • src/config/validation.ts now uses getOfficialExternalPluginCatalogEntry() + resolveOfficialExternalPluginInstall() for missing configured official external plugins.
  • Missing plugins.entries.* / plugins.allow refs now show an actionable install command, for example openclaw plugins install @openclaw/brave-plugin, instead of stale/remove wording.
  • Blocked-plugin diagnostics still take precedence, and unknown non-catalog plugin refs keep the existing generic warning.
  • Added regression coverage that uses brave so the test proves the package spec is coming from catalog metadata, not @openclaw/${id} string construction.

Verification:

  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/config/validation.ts src/config/config.plugin-validation.test.ts
  • Testbox tbx_01kqte3ztehvpxgbgykk83r20f: pnpm test:serial src/config/config.plugin-validation.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts passed: 2 Vitest shards, 65 tests.
  • Testbox tbx_01kqte3ztehvpxgbgykk83r20f: pnpm check:changed passed.

GitHub Actions Testbox run for targeted proof: https://github.com/openclaw/openclaw/actions/runs/25344395895

@vincentkoc
vincentkoc force-pushed the fix/77483-externalized-channel-plugin-migration-hint branch from fb35185 to 7bb69e1 Compare May 4, 2026 21:42
@vincentkoc

Copy link
Copy Markdown
Member

Maintainer refresh for latest origin/main.

Summary:

  • Rebased the PR onto latest origin/main (a4f2bf273a219eba218cd2e010ef7a17aa73e361).
  • Kept the migration hint backed by src/plugins/official-external-plugin-catalog.ts; no duplicated hardcoded external-plugin map.
  • Missing configured official external plugins now warn with the catalog install command, while blocked-plugin diagnostics still win.

Verification:

  • pnpm test:serial src/config/config.plugin-validation.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts — passed (65 tests across 2 shards)
  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/config/validation.ts src/config/config.plugin-validation.test.ts — passed
  • git diff --check — passed

Pushed refreshed head: 7bb69e17a200d50182a3753003dfe611915c568f.

@Patrick-Erichsen Patrick-Erichsen self-assigned this May 4, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit b3e42bf into openclaw:main May 4, 2026
108 checks passed
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Landed after resolving the current main conflict.

  • Repaired PR head: d1b1b10
  • Merge commit: b3e42bf
  • Gate: pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/config/validation.ts src/config/config.plugin-validation.test.ts
  • Gate: pnpm test src/config/config.plugin-validation.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts
  • Gate: Blacksmith Testbox pnpm check:changed on tbx_01kqtgx4tbwabn0esnv43zzf97
  • GitHub CI: green on d1b1b1044403a2072fe10631a70fb13438990440

Thanks @hclsys!

lxe pushed a commit to lxe/openclaw that referenced this pull request May 6, 2026
…lugins (openclaw#77502)

Fixes openclaw#77483.\n\n- Suggest catalog-backed install commands for missing official external plugins in config validation.\n- Preserve stale/remove wording for non-catalog missing plugins.\n- Add regression coverage for plugins.entries and plugins.allow warnings.\n\nVerification:\n- pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/config/validation.ts src/config/config.plugin-validation.test.ts\n- pnpm test src/config/config.plugin-validation.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts\n- pnpm crabbox:run -- --provider blacksmith-testbox ... pnpm check:changed\n- GitHub CI green on d1b1b10
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
…lugins (openclaw#77502)

Fixes openclaw#77483.\n\n- Suggest catalog-backed install commands for missing official external plugins in config validation.\n- Preserve stale/remove wording for non-catalog missing plugins.\n- Add regression coverage for plugins.entries and plugins.allow warnings.\n\nVerification:\n- pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/config/validation.ts src/config/config.plugin-validation.test.ts\n- pnpm test src/config/config.plugin-validation.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts\n- pnpm crabbox:run -- --provider blacksmith-testbox ... pnpm check:changed\n- GitHub CI green on d1b1b10
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
…lugins (openclaw#77502)

Fixes openclaw#77483.\n\n- Suggest catalog-backed install commands for missing official external plugins in config validation.\n- Preserve stale/remove wording for non-catalog missing plugins.\n- Add regression coverage for plugins.entries and plugins.allow warnings.\n\nVerification:\n- pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/config/validation.ts src/config/config.plugin-validation.test.ts\n- pnpm test src/config/config.plugin-validation.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts\n- pnpm crabbox:run -- --provider blacksmith-testbox ... pnpm check:changed\n- GitHub CI green on d1b1b10
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
…lugins (openclaw#77502)

Fixes openclaw#77483.\n\n- Suggest catalog-backed install commands for missing official external plugins in config validation.\n- Preserve stale/remove wording for non-catalog missing plugins.\n- Add regression coverage for plugins.entries and plugins.allow warnings.\n\nVerification:\n- pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/config/validation.ts src/config/config.plugin-validation.test.ts\n- pnpm test src/config/config.plugin-validation.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts\n- pnpm crabbox:run -- --provider blacksmith-testbox ... pnpm check:changed\n- GitHub CI green on d1b1b10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

3 participants