Skip to content

[codex] Fix missing channel plugin diagnostics#77559

Open
steipete wants to merge 1 commit intomainfrom
codex/fix-plugin-config-diagnostics
Open

[codex] Fix missing channel plugin diagnostics#77559
steipete wants to merge 1 commit intomainfrom
codex/fix-plugin-config-diagnostics

Conversation

@steipete
Copy link
Copy Markdown
Contributor

@steipete steipete commented May 4, 2026

Summary

  • Treat missing catalog-backed plugins.entries.* channel plugins as repairable installs instead of stale config.
  • Keep plugins.allow on the existing stale-config warning path because openclaw doctor --fix does not repair allow-only references.
  • Use neutral plugin not installed wording so third-party catalog entries are not labeled as OpenClaw-official.
  • Add regression coverage for Discord and WhatsApp upgrade-style config.

Root Cause

After bundled channel plugins were externalized, upgraded configs can still contain valid plugins.entries.discord or plugins.entries.whatsapp references while the plugin package is absent from the current manifest registry. Validation previously treated those entries the same as truly stale plugin IDs and told users to remove valid config, even though doctor already has an install repair path for missing configured plugin entries.

Behavior Change

For missing installable plugin entries, config validation now reports:

plugin not installed: discord (Discord; run openclaw doctor --fix or openclaw plugins install @openclaw/discord; config preserved)

Unknown or allow-only plugin references still use the old stale-config warning, avoiding a repair suggestion that doctor cannot complete.

Verification

  • pnpm test src/config/config.plugin-validation.test.ts -- --reporter=dot
  • pnpm test src/commands/doctor/shared/missing-configured-plugin-install.test.ts src/commands/doctor/shared/stale-plugin-config.test.ts -- --reporter=dot
  • pnpm exec oxfmt --check --threads=1 src/config/validation.ts src/config/config.plugin-validation.test.ts
  • git diff --check
  • pnpm changed:lanes --json
  • pnpm check:changed

Notes

Blacksmith Testbox changed-gate attempts did not reach repo commands because both fresh leases shut down while queued: tbx_01kqtga2jvntf4ft6vdzxrkwpb, tbx_01kqtgbp3r99jr04v5zfte47nf. Local pnpm check:changed initially exposed a stale local dependency tree missing web-tree-sitter; pnpm install repaired node_modules with no tracked file changes, then pnpm check:changed passed.

Fixes #77483

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels May 4, 2026
@steipete steipete marked this pull request as ready for review May 4, 2026 22:10
@steipete steipete force-pushed the codex/fix-plugin-config-diagnostics branch from e65333e to ea908ac Compare May 4, 2026 22:10
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 4, 2026

Codex review: needs changes before merge.

Summary
The PR changes config validation to emit repair-oriented missing-plugin warnings for catalog-backed plugins.entries.* references, adds Discord/WhatsApp regression coverage, and updates the changelog.

Reproducibility: yes. Source inspection gives a high-confidence reproduction path: apply the PR and validate a config with plugins.entries.discord.enabled: false or plugins.enabled: false; the new validation path emits a doctor repair hint while current doctor repair skips those configs.

Next step before merge
There is one narrow, source-proven PR defect that can be repaired mechanically by aligning validation diagnostics with doctor eligibility and adding focused tests.

Security
Cleared: The diff only changes validation messaging, tests, and changelog text; it does not add dependencies, workflows, package execution, permissions, or secret handling.

Review findings

  • [P2] Avoid repair hints for disabled plugin entries — src/config/validation.ts:1544
Review details

Best possible solution:

Keep the repair-oriented warning for enabled, catalog-backed missing plugin entries, but preserve stale/inert wording when doctor will not install anything, especially disabled entries and globally disabled plugins.

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

Yes. Source inspection gives a high-confidence reproduction path: apply the PR and validate a config with plugins.entries.discord.enabled: false or plugins.enabled: false; the new validation path emits a doctor repair hint while current doctor repair skips those configs.

Is this the best way to solve the issue?

No. The intended direction is right for enabled missing Discord/WhatsApp entries, but the implementation needs to gate the new wording on the same eligibility rules doctor uses for repair.

Full review comments:

  • [P2] Avoid repair hints for disabled plugin entries — src/config/validation.ts:1544
    The new doctorRepairable path applies to every missing plugins.entries.* key, but doctor repair ignores configs with plugins.enabled === false and skips entries where enabled === false. Those configs would now be told to run doctor to install a plugin that doctor intentionally leaves alone, so keep the stale/inert warning for disabled entries.
    Confidence: 0.91

Overall correctness: patch is incorrect
Overall confidence: 0.88

Acceptance criteria:

  • pnpm test src/config/config.plugin-validation.test.ts -- --reporter=dot
  • pnpm test src/commands/doctor/shared/missing-configured-plugin-install.test.ts -- --reporter=dot
  • pnpm exec oxfmt --check --threads=1 src/config/validation.ts src/config/config.plugin-validation.test.ts
  • git diff --check

What I checked:

Likely related people:

  • steipete: Recent current-main history includes stale channel plugin config tolerance and blocked plugin validation changes in src/config/validation.ts / plugin validation tests; the shallow local blame also points current validation lines to this maintainer snapshot. (role: recent maintainer and validation-area author; confidence: high; commits: 22a51de42289, f74e901794c1, 57c37ef9333c; files: src/config/validation.ts, src/config/config.plugin-validation.test.ts, src/commands/doctor/shared/missing-configured-plugin-install.ts)
  • vincentkoc: Recent current-main commits heavily touch missing configured plugin repair, allowlist passivity, external catalog trust, and channel package loading around the affected doctor/config boundary. (role: doctor/plugin repair maintainer; confidence: high; commits: 6b7f9eafed4b, eeed33e61e51, a4c1c28a1731; files: src/commands/doctor/shared/missing-configured-plugin-install.ts, src/plugins/official-external-plugin-catalog.ts, scripts/lib/official-external-channel-catalog.json)
  • jack-stormentswe: The merged current-main commit for repairing configured missing plugins added the central behavior and tests that this PR's diagnostics must stay aligned with. (role: introduced configured missing-plugin repair behavior; confidence: medium; commits: bdd68a75eadc; files: src/commands/doctor/shared/missing-configured-plugin-install.test.ts, src/config/config.plugin-validation.test.ts)

Remaining risk / open question:

  • No tests were executed during this read-only review; the blocking finding is based on PR diff, current-main source, existing tests, docs, and PR discussion.

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

Re-review progress:

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea908ac594

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/config/validation.ts
Comment on lines +1542 to +1545
pushMissingPluginIssue(`plugins.entries.${pluginId}`, pluginId, {
warnOnly: true,
doctorRepairable: true,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid doctor repair hints for disabled plugin entries

This marks every missing plugins.entries.* value as repairable, but openclaw doctor --fix intentionally skips disabled plugin entries and returns no configured IDs when plugins.enabled === false in collectConfiguredPluginIds. In configs such as plugins.entries.discord.enabled: false or globally disabled plugins, validation now tells users to run doctor to reinstall a plugin that doctor will not touch, instead of keeping the stale-config warning path.

Useful? React with 👍 / 👎.

@Patrick-Erichsen
Copy link
Copy Markdown
Contributor

I believe #77613 closes this out.

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

Labels

maintainer Maintainer-authored PR size: S

Projects

None yet

2 participants