Repository navigation
fix(plugins): repair archive plugin host links after upgrades - #158002
Conversation
Include registered archive installs in the existing host-link repair owner so Doctor and post-update convergence can recover stale or dangling SDK links without the original archive. Preserve canonical install-root, path ownership, and lifecycle authority checks.
|
🦞👀 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. |
|
@clawsweeper re-review The PR body now includes the requested published-updater × exact-candidate proof. The published Doctor left the deliberately dangling archive-plugin link broken; the unchanged published updater installed this candidate and repaired it with the original archive absent. Native runtime inspection and a direct SDK import passed, while plugin payload bytes/file identities, configuration, and installation timestamp were preserved. The tested head is unchanged: 3e629cc. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 25, 2026, 4:52 AM ET / 08:52 UTC. ClawSweeper reviewWhat this changesThe branch extends Doctor and post-update host-link repair to archive-installed plugins, adds archive recovery tests, and documents the behavior. Merge readiness✅ Ready for maintainer review Current main still skips archive install records during host-link repair. This focused PR uses the existing guarded repair path, and no actionable defect emerged from the review. Priority: P2 Review scores
Verification
How this fits togetherPlugin installation records the installed package and its source in a local index. Doctor and post-update convergence use that index to repair a plugin’s link to the current OpenClaw package so its SDK imports can resolve. flowchart TD
A[Archive plugin install] --> B[Installed plugin index]
B --> C[Doctor or post-update convergence]
C --> D{Owned package with OpenClaw dependency?}
D -->|Yes| E[Repair host link]
E --> F[Plugin SDK import resolves]
D -->|No| G[Leave package untouched]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3, Tests +33, Docs +4. Total +40 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Archive-installed plugins recover their OpenClaw SDK link from the retained installed package during Doctor and post-update convergence, without requiring the source archive or changing authored configuration. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s source filter excludes archive records, and the PR body gives a specific published-version dangling-link scenario; this read-only review did not execute it. Is this the best way to solve the issue? Yes. Adding archive records to the existing ledger-backed repair owner is a narrow fix that retains its path and effect-authority safeguards. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 79399a653aab. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Backport #148890: d69a5e7 Backport #158002: 1ae730f Backport #145043: d069a6c Adapted backport #157727: 7ed2b28 Backport #157862: 63716d9 Retain the first filesystem authority refusal and pinned recovery bytes; repair registered archive host links; finish existing core migrations using validated post-convergence config while retaining plugin locators. Preserve capture coordinators until payload removal and normalize only inspection-time import.meta assignment targets. The reviewed cleanup correction preserves legacy roots when producer visibility is unavailable; rename success is not custody evidence. Keep the existing fs-safe 0.18.1 contract and all release/schema/dependency versions. Necessary guard and line-cap adaptations stay with their owners. Focused source proof and the eleven-case cleanup correction pass; the independent finding is resolved. Exact postimages, frozen ratchets, Madge and both structural guards pass on composition. Native nine-case and published-driver/package qualification remain separate. Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Jason (Json) <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: jalehman <[email protected]>
…aw#158002) Include registered archive installs in the existing host-link repair owner so Doctor and post-update convergence can recover stale or dangling SDK links without the original archive. Preserve canonical install-root, path ownership, and lifecycle authority checks.
What Problem This Solves
Fixes Doctor skipping archive-installed plugins whose OpenClaw host link becomes stale or dangling after an upgrade.
User Impact
openclaw doctor --fixand post-update plugin convergence can repair registered archive plugins using the installed package, even when the original archive is gone. The repair does not reinstall the plugin or change its authored configuration.Why This Change Was Made
Archive installation already creates the host link through the shared package owner. Include archive records in that owner's repair selection, retaining the existing canonical install-root checks, developer-path and alias protections, and effect-authority callbacks. Document the recovery behavior and exercise archive records through the existing Doctor cases.
Evidence
check:changedpassed, including production and test typechecks, formatting, lint, dead-export scans, and repository guards.Published-updater proof
An isolated Linux/Node 26.10 run installed the published
[email protected], then installed a synthetic SDK consumer throughplugins install <archive.tgz> --force --accept-capabilities. After removing the original archive and replacing its host link with a dangling link, the SDK import failed. The publisheddoctor --fix --yes --non-interactive --no-workspace-suggestionsexited 0 and left that link broken.The unchanged published driver then ran:
It returned
status: ok, exit 0, in 177.715 seconds. Both the tarball and installeddist/build-info.jsonidentify this exact PR head,3e629ccd1aeb83f4587fd635de2ec85532ff7ac0; the canonical candidate tarball SHA-256 is329208a97389132bef8d9f742a125b93b8ffc11db129d3661e222b2c9fbe552a. Both packages carry version 2026.9.6, so the proof checks commit provenance and uses the supported explicit artifact install.The repaired link resolves to the installed candidate,
plugins inspect --runtime --jsonreports the plugin loaded, and a direct Node SDK import resolves physically inside that candidate. The original archive remains absent. Every non-link plugin payload byte and file/directory device+inode, the authored plugin policy/configuration, and the original installation timestamp remain unchanged. The complete cell passed in 223.728 seconds. This proves package/Doctor recovery; it does not exercise a managed Gateway restart.The first fixture attempt stopped before fault injection or updating because the native local-plugin installer required capability consent. Supplying its documented
--accept-capabilitiesflag resolved that fixture admission; the candidate and assertions were unchanged.The remote command and assertions completed successfully, but the test broker's terminal-history upload timed out and its receipt lookup confirmed no committed terminal record. The evidence above describes the observed command and pinned artifact, not a successful broker receipt. The lease was released successfully; exact-head GitHub CI is independently green.