Skip to content

fix(wizard): honor effective plugin activation in configuration (#127578) - #175490

Open
MoerAI wants to merge 2 commits into
openclaw:mainfrom
MoerAI:fix/wizard-effective-plugin-inventory
Open

MoerAI wants to merge 2 commits into
openclaw:mainfrom
MoerAI:fix/wizard-effective-plugin-inventory

Conversation

@MoerAI

@MoerAI MoerAI commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #127578

What Problem This Solves

Summary

The plugin wizard offers explicitly disabled default-on plugins and misses plugins activated by canonical slot, platform, channel, or auto-enable policy. Both onboarding and configure now use the existing activation owners, including bundled-provider upgrade compatibility.

User Impact

Settings choices follow effective activation. Explicit disablement, global policy, workspace trust, and strict allowlists are respected. Migrated compat-mode installations retain their default bundled providers. Skipping plugin setup preserves authored plugin settings.

Why This Change Was Made

Root Cause

listEnabledConfigurableManifestPlugins used enabledByDefault || entry.enabled === true. Metadata intentionally includes disabled records, so this shortcut could not apply activation-policy precedence.

Execution path: onboarding/configure -> shared manifest inventory -> configurable fields -> wizard choices.

The first candidate also omitted bundled-provider compatibility: with machine-owned plugins.bundledDiscovery=compat and plugins.allow=["memory-core"], runtime retained default bundled providers but the wizard rejected them as not allowlisted. This revision reuses the same provider-only projection as projectInstalledPluginIndexPolicy.

Changes

  • Prepare auto-enable facts from the existing workspace-scoped metadata snapshot.
  • Apply withBundledPluginEnablementCompat(..., activation: "defaults") to bundled provider owners, including contract-only providers, before canonical activation. Other origins and non-provider owners keep their original policy projection.
  • Use platform defaults, owned channels, authored activation source, and auto-enable reasons with resolveEffectivePluginActivationState(...).activated.
  • Keep projection and helper loading local to inventory selection; settings writers receive authored configuration.
  • Extend retained boundary tests across policy, workspace, platform, slot, channel, configured-provider, compat/strict, and Skip cases. Fixtures satisfy the actual manifest contract and clean up their owned paths.
  • Preserve actual metadata module exports and remove its one obsolete mock-export exception, an exact shrink-only ratchet update.

Earlier candidate #132604 is closed unmerged. This patch does not include its unrelated alias-saving behavior.

Evidence

Real Behavior Proof: shipped CLI and stable-owned data

Installed the public [email protected] package, whose CLI reports 2026.10.4 (383c124). Its normal package lifecycle completed successfully. Created three synthetic, isolated profiles, then used that installed CLI's Doctor to migrate their legacy discovery setting into the actual shared SQLite store. The stable CLI owned and loaded the resulting existing settings before the candidate opened the same profile directories.

For each profile, ran the actual installed CLI and then the candidate's pnpm openclaw entrypoint through:

onboard --classic --flow advanced
configure --section plugins

Onboarding used explicit auth skip, loopback-only configuration, and flags skipping service installation, channels, skills, search, health, hooks, workspace bootstrap, and Control UI launch. PTY automation answered real prompts, selected Skip/Back, and declined telemetry, memory setup, optional plugins, and shell completion. No WizardPrompter was injected.

All 12 native CLI flows exited 0. Each candidate flow was followed by assertions against the actual saved configuration and machine-owned SQLite row.

Existing stable profile Stable onboarding / configure offers xai Candidate onboarding / configure offers xai Stored data after both candidate flows
Compat mode, memory-core-only allowlist, explicit xai disable yes / yes no / no Explicit false and saved webSearch.inlineCitations=true retained
Compat mode, memory-core-only allowlist, no xai entry or configured xai route yes / yes yes / yes Mode and allowlist retained; xai entry still absent
Strict allowlist mode, memory-core-only allowlist, no xai entry or configured xai route yes / yes no / no Strict mode and allowlist retained; xai entry still absent

The installed version displays the plugin as @openclaw/xai-plugin; the candidate displays the same provider ID as xAI (Grok).

Redacted terminal rows and stored-data receipts

Terminal rows below have paths and cursor controls removed.

Stable, explicitly disabled profile:
  Select plugin to configure
  Search: xa (1 match)
  @openclaw/xai-plugin (1/15 configured)
  Configuration updated.

Candidate, same explicitly disabled profile:
  Select plugin to configure
  Search: xa (0 matches)
  No matches found
  Configuration updated.

Candidate, existing compat default control:
  Select plugin to configure
  Search: xa (1 match)
  xAI (Grok) (0/15 configured)
  Configuration updated.

The captured onboarding menus likewise omit xai in the explicitly disabled and strict cases, retain xAI (Grok) in the compat control, and complete with Skip.

{"fixture":"disabled","bundledDiscoveryMode":"compat","authoredAllow":["memory-core"],"xaiEntryPresent":true,"explicitlyDisabled":true,"savedInlineCitations":true,"expectedPluginStatePreserved":true}
{"fixture":"compat","bundledDiscoveryMode":"compat","authoredAllow":["memory-core"],"xaiEntryPresent":false,"explicitlyDisabled":false,"expectedPluginStatePreserved":true}
{"fixture":"allowlist","bundledDiscoveryMode":"allowlist","authoredAllow":["memory-core"],"xaiEntryPresent":false,"explicitlyDisabled":false,"expectedPluginStatePreserved":true}

The complete sanitized native receipt JSON has SHA-256 adc98411a87593f33498a24e733c9b2f1d5268715747e2941aa471f0e033be22.

Native captures used the reviewed working candidate. Final commit 21c0134183a2ba810b6acf8af37045b1ff0dbc71 has the exact captured production/test delta SHA-256 3379440a3c5d2d923e47d07e341fbc85817b22509abb24c431f09685a8ac2147 against clean main 8839e329ea705e015d2a0a758990c035652f6d7f. The separate baseline-file change only removes the obsolete exception. Fresh main 8cfa2ec42441eefefcdbf5626d8063fd239137bc retains the original wizard source; the final candidate merges cleanly with it.

Test

  • Original activation reproduction on unchanged production main: 11 failures, 12 passes.
  • Compat regression reproduced on the first candidate: 2 failures, 25 passes; both provider and contract-only compat controls failed for the intended reason.
  • OPENCLAW_VITEST_RUNTIME=node node scripts/run-vitest.mjs src/wizard/setup.plugin-config.test.ts src/plugins/installed-plugin-index.compat.test.ts --maxWorkers=1: 31 passed across two shards in 26.18 seconds. Wizard shard: 27 tests, 2.13 seconds. Installed-index shard: 4 tests, 20.53 seconds, dominated by transform work.
  • Core production and official test/tsconfig/tsconfig.core.test.commands.json type graphs passed.
  • Changed-file typed lint, formatting, line-cap and mock-export ratchets, import-cycle checking, and git diff --check passed. Runtime value cycles: zero.
  • pnpm build and real source-CLI bootstrap builds passed, including the bootstrap import guard and control-plane module checks.
  • Fresh structured Codex review through P2 and required native codex review --base origin/main both completed with no actionable findings.
  • Earlier global changed-graph admission hit the unchanged infra shard's 732 test roots versus its 720 limit. No test-root files, graph limits, or allowances were added; no broad fallback pass is claimed. The relevant production/wizard type graphs passed.
  • Exact-head PR CI is checked separately after publication; the prior head's green CI is not claimed for this commit.

Risk

Compatibility and activation scope are covered by real stable-to-candidate profile reuse, both CLI entrypoints, restrictive compat and strict controls, retained saved settings, and existing installed-index sibling tests. Workspace trust and non-provider policy use their original projection. Provider execution and credential flows were not changed or exercised.

Changelog

Release-note context: plugin setup/configuration inventories honor effective activation, retain bundled-provider upgrade compatibility, and preserve skipped settings. CHANGELOG.md is release-owned.

Notes

AI-assisted: yes. Testing degree: focused regression and static checks plus completed native CLI and stable-data upgrade proof. Broader regression coverage belongs to PR CI.

…claw#127578)

Replace the manifest-default shortcut with canonical activation, prepared metadata discovery, platform defaults, and authored source policy. Keep auto-enable projection local so Skip preserves existing settings. Real bundled-registry probes cover onboarding and configure; all 23 focused regressions, scoped types/lint/format, owned mock-ratchet shrink, and independent Codex reviews pass. The inherited global infra test-root budget failure is documented separately.
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@MoerAI
MoerAI marked this pull request as ready for review October 17, 2026 12:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T12:18:09.781091Z f0d30d1 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown
Contributor

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: f0d30d1766

ℹ️ 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/wizard/setup.plugin-config.ts Resolved
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 17, 2026
@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The plugin configuration wizard selects plugins using canonical activation policy while preserving authored settings and bundled-provider compatibility.

Example: Run configure --section plugins with plugins.entries.xai.enabled=false.

  • Before: The default-on xai plugin appears in the configuration picker.
  • After: The picker omits xai and preserves its saved configuration.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused owner-based repair with native CLI and stable-profile upgrade evidence, successful exact-head gates, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Supplied terminal output exercises the changed inventory through actual onboarding and configure CLI prompts on three isolated v2026.10.4-owned profiles, showing disabled and strict-filtered xai disappear, compatibility defaults remain available, and Skip preserves saved settings.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users see settings for disabled plugins and miss settings for plugins activated through supported policy.
Reason: The repair implements the linked issue's explicit direction and restores documented activation precedence without adding configuration or public APIs.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current-main wizard activation defect and resolves the earlier bundled-provider compatibility finding; no actionable defects remain.

Priority: P2
Reviewed head: 21c0134183a2ba810b6acf8af37045b1ff0dbc71

Before merge

None.

Findings

None.

Agent review details

How this fits together

Onboarding and configure consume workspace-scoped plugin metadata and activation policy to produce configuration choices, then write only settings the user changes.

flowchart TD
  A[Onboarding or configure] --> B[Workspace metadata snapshot]
  B --> C[Auto-enable projection]
  C --> D[Provider compatibility projection]
  D --> E[Canonical activation policy]
  E --> F[Plugin configuration picker]
  F --> G[Authored settings writer]
Loading

Technical review

Best possible solution:

Land the canonical activation repair with authored settings and bundled-provider compatibility preserved.

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

Current-main source deterministically offers a default-on plugin despite explicit disablement; the supplied stable CLI output demonstrates the same user-visible mismatch, without executing target code during this review.

Is this the best way to solve the issue?

The patch repairs the shared inventory used by both wizard flows through existing activation owners and keeps temporary policy projections out of settings writes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2ff0acf65b1d.

Provenance checked

  • Wizard inventory selection changes intended behavior with a stated reason (881f7dc: Add manifest-driven plugin configuration prompts to onboarding and configure; the original comments intended to show enabled plugins.)
  • Metadata snapshot acquisition keeps the original intent (2f44ffc: Route plugin metadata consumers through snapshots while preserving shared inventory acquisition.)
  • Wizard boundary tests and mock-export baseline keeps the original intent (76d2410: Consolidate wizard coverage at observable boundaries; the patch extends that retained boundary and removes only the obsolete partial-mock exception.)
  • Bundled-provider compatibility keeps the original intent (c5c5397: Preserve default bundled providers for migrated compatibility-mode allowlists while retaining explicit disables and strict non-provider policy; historical helper blame encountered an unavailable local blob, so the merged PR and current helper establish this contract.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 2f44ffc adds src/wizard/setup.plugin-config.ts:2 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2f44ffc8a75f; files: src/wizard/setup.plugin-config.ts)
  • George Zhang: Raw commit 881f7dc adds src/wizard/setup.plugin-config.ts:10 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 881f7dc82f7e; files: src/wizard/setup.plugin-config.ts)

PR surface

Source +49, Tests +171, Other -1. Total +219 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 52 3 +49
Tests 1 176 5 +171
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 3 228 9 +219

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #127578
Summary: This PR addresses the canonical wizard activation inventory defect.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Incorrect configuration choices create limited wizard friction without evidence of runtime failure or a blocked first useful run.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-17T12:27:35.300Z sha f0d30d1 :: needs real behavior proof before merge. :: [P2] Apply bundled-provider compatibility before filtering

Reviewed October 17, 2026, 11:17 AM ET / 15:17 UTC (Revision 2).

Apply the existing provider-only compatibility projection before canonical inventory filtering. Preserve strict allowlists and authored plugin settings. Verified both native CLI flows on stable-owned stores, 31 related tests, typed checks, and independent Codex reviews.
@MoerAI

MoerAI commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 17, 2026

This branch has not been deployed

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

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin wizard enabled inventory bypasses canonical effective activation

1 participant