Repository navigation
fix(plugins): reload bundled plugins with dormant registry records - #167647
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesAllows the selected bundled plugin to reload despite a dormant registry installation record with the same ID, while preserving ownership and path checks. Example: Run openclaw plugins reload voice-call after Doctor selects its bundled copy over a registry installation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs a documented failure that remains on current main and in v2026.9.9. No actionable correctness or security finding was identified; the overlapping contributor fixes remain open. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherPlugin management combines discovered plugin metadata with installation records to resolve operator reload requests. The Gateway replaces the selected runtime and returns an applied generation receipt. flowchart TD
A[Operator reload request] --> B[Plugin management]
C[Selected bundled plugin] --> D[Ownership and path checks]
E[Installation records] --> D
B --> D
D -->|Accepted| F[Gateway runtime replacement]
D -->|Conflicting ownership| G[Reload rejection]
F --> H[Generation receipt]
Technical reviewBest possible solution: Land one focused repair in the existing reload resolver, preserving dormant installation records and package-mutation safeguards. Do we have a high-confidence way to reproduce the issue? Yes, from source: select bundled voice-call while retaining a disjoint same-ID registry record, then request reload. Current main rejects that selection before runtime application; the reviewer did not execute target code. Is this the best way to solve the issue? Yes: repairing the existing reload resolver honors bundled selection without deleting intentionally retained records or weakening update and uninstall ownership checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e670b178f9db. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +26, Docs +2. Total +28 across 3 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 9, 2026, 2:18 AM ET / 06:18 UTC. |
…penclaw#167647) After an upgrade Doctor keeps an old registry install record but selects the bundled copy of a plugin; openclaw plugins reload then routed through package-owner validation and refused with 'no authoritative package-owner metadata', so a config change needed a full Gateway restart. Reload now follows the selected bundled plugin; any record whose path or owner claims that root still requires strict package validation. Closes openclaw#161193. Reported by @mbelinky.
Closes #161193. Thanks @mbelinky for the report.
What Problem This Solves
Fixes
openclaw plugins reload <id>refusing a selected bundled plugin with “no authoritative package-owner metadata” when Doctor retained a registry install record for the same plugin.User Impact
Operators can apply plugin configuration through reload without restarting the whole Gateway solely because a dormant registry record remains. Reload preserves configuration, installation state, and enabled/disabled policy. No new options, dependencies, schemas, or migration are needed.
Why This Change Was Made
Doctor intentionally preserves dormant registry records on source installations. The reload ownership resolver now consumes the selected index entry's bundled origin instead of treating the same-ID record as ownership of that runtime. It retains strict checks for ambiguous or conflicting owners and overlapping package paths; install-hash claims still cannot authorize a different, bundled copy. Package update and uninstall resolution are unchanged.
Related contributor fixes: #161225 and #161235.
Evidence
node scripts/run-vitest.mjs src/plugins/management-service.test.ts --maxWorkers=1(the direct wrapper equivalent ofpnpm test ... --maxWorkers=1): wrapper wall times 43.93 s / 23.92 s / 16.47 s; summed reported test execution 0.897 s / 1.177 s / 0.788 s; new retained-record case 97 ms / 25 ms / 18 ms. Compiler preparation and imports dominate wall time.plugin-update-unchanged-docker.test.ts,update-cohort.integration.test.ts, andmanifest-registry-installed.ownership.test.ts, followed by Doctor'spost-core-plugin-convergence.source-checkout.test.ts: 50 tests passed, 83.81 s wrapper wall time. Doctor retained registry records and selected the bundled source in all five source-checkout cases.HOMEandOPENCLAW_STATE_DIR. The reload regression exercises the management/lifecycle boundary with a runtime callback; it is not a live Gateway or telephony test. No operator Gateway was restarted.node scripts/check-changed.mjspassed 21 steps, including production types and all 27 test type graphs, then failed on four exports outside this patch:bindCliQuestionAnswerAuthority,prepareSessionEventTargetForHost,readSessionEntryCreationTransition, andRESTART_CONTINUATION_CONTEXT_PREFIX. The lead confirmed that these same four failures reproduce on the unchanged base; they are inherited main failures tracked separately. Subsequent lint/reference guards did not run. No baseline or suppressions were changed.P1 autoreview did not produce a verdict: the first invocation exited 1; the bounded diagnostic retry timed out after 300 seconds (engine exit 124). The lead will review the PR head; no clean review verdict is claimed.