Repository navigation
fix(plugins): prevent bundled discovery loss and out-of-scope activation - #114547
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 27, 2026, 9:42 AM ET / 13:42 UTC. ClawSweeper reviewWhat this changesThe PR makes plugin metadata bootstrap use the installed-plugin index, preserves explicit plugin activation scopes, and replaces a multi-entry registry cache with one current process-wide metadata graph. Merge readinessKeep this PR open for explicit maintainer review. The supplied branch evidence shows a focused repair for plugin discovery, scoped activation, and process-current metadata, but the protected Priority: P2 Review scores
Verification
How this fits togetherOpenClaw builds plugin metadata from installed plugin manifests, then passes that metadata to plugin activation, provider/model discovery, and authentication resolution. This PR changes how that metadata is bootstrapped, scoped, cached, invalidated, and published to later control-plane consumers. flowchart LR
A[Installed plugin manifests] --> B[Installed plugin index]
B --> C[Plugin metadata snapshot]
D[Requested plugin scope] --> E[Plugin activation context]
C --> E
C --> F[Current process metadata graph]
F --> G[Provider and auth discovery]
E --> H[Loaded plugin runtime]
Decision needed
Why: This is a compatibility-sensitive lifecycle decision spanning plugin discovery, runtime activation, provider selection, and authentication metadata; the protected maintainer label requires an owner decision rather than automated approval. Before merge
Agent review detailsSecurityNone. PR surfaceSource -4, Tests +196. Total +192 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Rebase onto current Do we have a high-confidence way to reproduce the issue? Unclear for a current-main failing path: the supplied source diff and regression tests define the bootstrap, scope, and lifecycle paths, but this review could not independently execute or inspect the checkout after the read-only command environment failed before even Is this the best way to solve the issue? Unclear: the patch follows the repository's stated preference for lifecycle-owned, process-stable metadata, but an owner must still confirm that only complete unscoped metadata may be published to provider and authentication consumers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 96a7a21d3130. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
662a73f to
a608b24
Compare
|
Merged via squash.
|
…ion (openclaw#114547) * fix(plugins): prevent missing and out-of-scope plugin activation * fix(plugins): clear complete metadata on lifecycle invalidation * fix(plugins): clear metadata without lifecycle import cycles * test(agents): preserve plugin metadata lifecycle in model mock * test(agents): align Ollama auth with the installed plugin index * test(auto-reply): preserve plugin metadata lifecycle in model mock * test(auto-reply): keep plugin metadata mock within lint limit * test(auto-reply): align plugin metadata fixture with lint and format
What Problem This Solves
Fixes an issue where fresh or newly repaired OpenClaw installs could lose their bundled plugins during registry bootstrap, while explicitly scoped plugin requests could rediscover or activate unrelated installed plugins. Repeated control-plane lookups also retained multiple historical plugin registry graphs instead of one process-stable snapshot.
Why This Change Was Made
Derive bootstrap metadata from the same manifest-backed installed-plugin index used by persisted registries, make resolved empty indexes authoritative, preserve requested plugin scopes before activation, and publish only complete unscoped metadata to the process-wide registry. Replace the historical registry LRU with one lifecycle-owned immutable graph without changing plugin manifests, SDK exports, database schemas, configuration, protocol versions, dependencies, or plugin ownership.
User Impact
Fresh installs continue to discover their bundled plugins; registry refresh keeps the same installed plugin inventory; disabled or empty plugin scopes stay empty; single-plugin requests do not load unrelated plugin owners or corrupt process-wide model/provider metadata. Production code decreases by 22 lines.
Evidence
tbx_01kyhmqhparwmrc2jpe84hekta: 326 passing focused tests across 12 plugin, index, manifest, discovery, runtime, activation, loader, and Plugin SDK test files.pnpm buildand canonical self-contained package tarball integrity check passed.gpt-5.6-solreview atxhighreasoning: no accepted or actionable findings after fixing the two confirmed scoped/bootstrap defects.AI-assisted: implementation and verification performed with Codex; no agent prompts, private logs, or transcripts are included.