Skip to content

docs(plugins): correct bundled override precedence - #132181

Merged
steipete merged 1 commit into
mainfrom
steipete/exciting-chatterjee-97d7c2
Aug 28, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/exciting-chatterjee-97d7c2

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where operators following the plugin internals documentation would expect an enabled or allowlisted workspace plugin to replace a bundled plugin with the same id. Current manifest selection and loading keep the bundled copy ahead of an auto-discovered workspace copy; enablement does not change that source selection.

The related manifest reference also named the wrong config field for selecting an override path and used singular openclaw plugin commands.

Why This Change Was Made

Correct the public trust note and its linked duplicate-precedence reference to match the existing canonical discovery → manifest selection → activation → loading flow. Document explicit plugins.load.paths selection, matching tracked global installs, ordinary bundled precedence, and the separate OPENCLAW_DEV_SOURCE_ROOT bundled priority. Clarify the intentional tracked-install duplicate-warning exception.

This is documentation only. It does not change runtime policy, configuration schema, plugin trust/capability gates, or the separate developer-plugin trust design.

The stale note was added in 3cf06f793957, before 8d44b16b7cc7 reserved bundled duplicates. Source inspection of stable tag v2026.7.1-2 confirms the documented ranking is shipped behavior rather than a new policy.

User Impact

Operators can distinguish permission to load a plugin id from selection of its source, and use plugins.load.paths for intentional local overrides instead of relying on workspace enablement. The six-tier precedence list preserves both tracked-install overrides and development-source priority.

Public references: Plugin internals and Discovery precedence.

Evidence

  • Personally inspected discovery, manifest ranking, installed-index/snapshot propagation, shared loader discovery, runtime and CLI loaders, activation, and the focused existing tests. The two ranking owners are src/plugins/manifest-registry.ts and src/plugins/loader-provenance.ts.
  • Verified the affected documentation and runtime owner files have no drift against freshly fetched origin/main before publication.
  • Focused existing behavior proof: 10 tests passed across 3 files, including the enabled/allowlisted workspace duplicate, configured-path override, tracked global override, development-source priority, and discovery-order cases:
node scripts/run-vitest.mjs src/plugins/loader.test.ts src/plugins/manifest-registry.test.ts src/plugins/discovery.test.ts -t 'resolves duplicate plugin ids by source precedence|handles workspace-discovered plugins according to trust and precedence|keeps only the higher-precedence plugin|lets config-loaded plugins replace bundled duplicates|explicit installed globals overriding bundled plugins|prefers dev source bundled plugins|installed global is discovered before bundled|discovers global and workspace extensions|preserves configured load-path order|discovers bundled and global plugins for each workspace-specific scan'
pnpm check:docs

The complete docs suite passed: formatting, Markdown and template lint, MDX, i18n glossary, internal links (0 broken), and config examples (1,208 validated).

git diff --check

Documentation LOC: +16/-12 across two files. Production LOC: +0/-0. Tests/test support: +0/-0. Existing tests already cover the behavior; no runtime regression test or live Gateway change is needed for this prose correction. No operator config or services were changed.

AI-assisted documentation correction; source and validation results reviewed by the maintainer session.

@steipete steipete self-assigned this Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS maintainer Maintainer-authored PR labels Aug 28, 2026
@steipete
steipete marked this pull request as ready for review August 28, 2026 22:50
@steipete

steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Land-ready verification for head 24c608c4007517bcb6d153178dfd5126ac50f352:

The public trust note now separates id-based load permission from duplicate-source selection. The related reference uses plugins.load.paths, preserves configured-path and tracked-install overrides plus the separate development-source bundled priority, and accurately describes duplicate warnings. No runtime policy, config schema, tests, or operator services changed. Production/test LOC is +0/-0; docs are +16/-12.

Current source and native main-baseline checks confirm both duplicate-ranking owners still match the documented order. Fresh Codex autoreview returned no findings at its default P0 scope, and native review artifacts validated for this exact head.

Local proof passed:

node scripts/run-vitest.mjs src/plugins/loader.test.ts src/plugins/manifest-registry.test.ts src/plugins/discovery.test.ts -t 'resolves duplicate plugin ids by source precedence|handles workspace-discovered plugins according to trust and precedence|keeps only the higher-precedence plugin|lets config-loaded plugins replace bundled duplicates|explicit installed globals overriding bundled plugins|prefers dev source bundled plugins|installed global is discovered before bundled|discovers global and workspace extensions|preserves configured load-path order|discovers bundled and global plugins for each workspace-specific scan'

10 focused existing tests passed across three files.

pnpm check:docs
git diff --check

Exact-head CI run 33218294107, attempt 1 is successful, including preflight, security-fast, check-docs, and openclaw/ci-gate. No retries were needed. Live Gateway/UI proof is not applicable to this documentation-only correction.

ClawSweeper completed its exact-head review with no findings or security issues and no repair lane or rank-up changes requested. Its remaining normal maintainer-review step is satisfied by the source-backed review above. Native OPENCLAW_TESTBOX=1 scripts/pr prepare-run 132181 passed using hosted CI without a rebase or repush. No separate approval requirement was returned by the live main-branch rules; proceeding through native merge.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 6:58 PM ET / 22:58 UTC.

ClawSweeper review

What this changes

The PR corrects plugin documentation so intentional overrides use plugins.load.paths and duplicate plugin IDs follow the loader’s actual precedence order.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

The documentation correction matches the current plugin-discovery implementation and focused regression coverage; this maintainer-authored PR remains open for normal landing.

Priority: P3
Reviewed head: 24c608c4007517bcb6d153178dfd5126ac50f352

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow documentation correction that accurately describes the current, tested discovery behavior.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 5 items Current precedence implementation: The two current ranking owners give highest priority to configured paths, then development-source bundled plugins, tracked globals, ordinary bundled plugins, workspace plugins, and untracked globals.
Discovery and duplicate handling: Configured load paths become config-origin candidates; auto-discovered globals remain behind bundled plugins, while registry selection emits the documented explicit-override diagnostic.
Focused existing coverage: Existing tests exercise configured-path overrides, bundled-versus-auto-discovered selection, tracked-global overrides, and development-source precedence.
Findings None None.
Security None None.

How this fits together

Plugin discovery gathers configured paths, workspace extensions, bundled plugins, and global installs. The manifest registry selects one candidate per plugin ID before activation and runtime loading.

flowchart LR
  A[Configured paths] --> E[Plugin discovery]
  B[Workspace extensions] --> E
  C[Bundled plugins] --> E
  D[Global installs] --> E
  E --> F[Manifest precedence]
  F --> G[Activation permission]
  G --> H[Gateway plugin loader]
Loading

Before merge

  • Complete next step (P2) - No repair lane is needed: the submitted documentation already matches current main behavior.
Agent review details

Security

None.

PR surface

Docs +4. Total +4 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 2 16 12 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 16 12 +4

Review metrics

None.

Technical review

Best possible solution:

Land the source-backed documentation correction so operators use explicit paths rather than enablement to select an override.

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

Not applicable: this is docs-only, and current source plus focused tests establish the described precedence behavior.

Is this the best way to solve the issue?

Yes: correcting the two public pages at the manifest-selection boundary is the narrowest maintainable fix for the operator-facing misinformation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 021f8b6c66ce.

Labels

Label changes:

  • add P3: This is a small documentation correction for an existing plugin override workflow and changes no runtime behavior or configuration surface.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Label justifications:

  • P3: This is a small documentation correction for an existing plugin override workflow and changes no runtime behavior or configuration surface.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

Likely related people:

  • steipete: Current duplicate-ranking lines and the corrected documentation pages are attributed to Peter Steinberger in local history. (role: recent area contributor; confidence: high; commits: 90b7950ccdcf, 24c608c40075; files: src/plugins/loader-provenance.ts, src/plugins/manifest-registry.ts, docs/plugins/architecture.md)
  • Vincent Koc: The historical bundled-duplicate reservation change is recorded as commit 8d44b16. (role: feature introducer; confidence: medium; commits: 8d44b16b7cc7; files: src/plugins/manifest-registry.ts, src/plugins/loader-provenance.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 9a3ede3 into main Aug 28, 2026
108 checks passed
@steipete
steipete deleted the steipete/exciting-chatterjee-97d7c2 branch August 28, 2026 23:01
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant