Skip to content

fix(plugins): reload bundled plugins with dormant registry records - #167647

Merged
steipete merged 1 commit into
mainfrom
upd/upd-l1512
Oct 9, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/upd-l1512

Conversation

@steipete

@steipete steipete commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

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

  • Before the fix, the new management-boundary case failed with the reported ownership error: 1 failed, 18 passed. After the fix, the full changed suite passed 19/19 three times, including rejection of the dormant package's install-hash claim and assertions that config/install records are not written.
  • node scripts/run-vitest.mjs src/plugins/management-service.test.ts --maxWorkers=1 (the direct wrapper equivalent of pnpm 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.
  • Direct-importer suites plugin-update-unchanged-docker.test.ts, update-cohort.integration.test.ts, and manifest-registry-installed.ownership.test.ts, followed by Doctor's post-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.
  • All proof ran locally with isolated HOME and OPENCLAW_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.
  • Production +2/-2 (net 0); tests +28/-2 (net +26); docs +2/-0.

node scripts/check-changed.mjs passed 21 steps, including production types and all 27 test type graphs, then failed on four exports outside this patch: bindCliQuestionAnswerAuthority, prepareSessionEventTargetForHost, readSessionEntryCreationTransition, and RESTART_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.

@clawsweeper

clawsweeper Bot commented Oct 9, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Oct 9, 2026
@steipete
steipete marked this pull request as ready for review October 9, 2026 06:13
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 9, 2026
@clawsweeper

clawsweeper Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Allows 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.

  • Before: Reload rejects voice-call with “has no authoritative package-owner metadata.”
  • After: Reload can replace the selected bundled runtime without changing the dormant installation record.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused and correct repair with useful regression coverage, but this head's reported execution stops at the management-boundary harness.
Proof confidence 🦐 gold shrimp (3/6) The supplied Repository State identifies a MEMBER-authored repair, supported by verified prior area ownership, so the ordinary external-contributor proof gate does not apply. This head reports a management-boundary harness with a runtime callback; related PRs supply real Gateway observations for the same failure. The diff changes no stored-data format, migration, settings, or installation-record writer.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An operator cannot reload a running bundled plugin after Doctor retains a registry installation record for the same plugin.
Reason: Bundled reload and dormant-record retention are established contracts. The existing area's owner proposes a narrow repair of their interaction without adding settings or changing package maintenance.

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
Reviewed head: f3bda07d0ffc5d0286af87c6a0a5fb069e3770d8

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: This head has no reported CLI-to-Gateway reload run with a selected bundled plugin and a disjoint dormant same-ID registry record.
Agent review details

How this fits together

Plugin 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]
Loading

Technical review

Best 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

  • src/plugins/installed-plugin-package-ownership.ts: resolveReload changes intended behavior with a stated reason (b5134de: Support Gateway-owned runtime replacement without restarting or granting ownership of discovered source files.)
  • src/plugins/management-service.test.ts: discovered reload coverage keeps the original intent (25a42ef: Consolidate redundant tests while retaining meaningful authorization, lifecycle, filesystem, and regression boundaries.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source 0, Tests +26, Docs +2. Total +28 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 2 0
Tests 1 28 2 +26
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 32 4 +28

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #161193
Summary: The linked issue defines the exact bundled-selection reload failure; this PR and two open contributor PRs repair the same resolver condition.

Members:

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

Labels

Label changes:

  • add P2: The defect blocks targeted plugin reload in a specific source-build setup, with a full Gateway restart available as a workaround.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The defect blocks targeted plugin reload in a specific source-build setup, with a full Gateway restart available as a workaround.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 9, 2026, 2:18 AM ET / 06:18 UTC.

@steipete
steipete merged commit 73fdd3d into main Oct 9, 2026
188 checks passed
@steipete
steipete deleted the upd/upd-l1512 branch October 9, 2026 06:21
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 10, 2026
…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.
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 P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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.

plugins reload fails with "no authoritative package-owner metadata" when doctor keeps a bundled plugin over a registry install

1 participant