Repository navigation
fix(plugins): keep rebuilt bundled plugins on git installs instead of npm refreshes with a mismatched SDK - #145356
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: blocked before merge. Reviewed September 12, 2026, 12:06 AM ET / 04:06 UTC (Revision 10). ClawSweeper reviewWhat this changesThe PR keeps host-built plugins selected on source installations, preserves dormant registry installs, and reports skipped refreshes during Doctor and plugin updates. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain This remains a useful repair for a current problem, but the previously reported ownership-preflight failure is still present at the unchanged head. The related draft offers a different approach and does not supersede this PR. Priority: P1 Review scores
Verification
How this fits togetherOpenClaw’s plugin registry selects executable plugins from bundled builds, explicit paths, and tracked installations. Doctor and update commands consume that selection alongside install records to repair packages and prepare Gateway startup. flowchart TD
A[Host-built plugins] --> D[Plugin selection]
B[Tracked registry installs] --> D
C[Explicit plugin paths] --> D
D --> E[Update ownership preflight]
E --> F[Doctor and plugin convergence]
F --> G[Payload checks and Gateway startup]
B --> E
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +148, Tests +313, Docs +6. Total +467 across 18 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Use one source-selection decision throughout update preflight, convergence, and payload checks, preserving active-package ownership safeguards and proving fresh and published-driver upgrade behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: select a compiled source bundle with a retained same-ID npm record, then request a named plugin update, --all, or stable/beta cohort convergence. Ownership preflight rejects before the new skip; this read-only review did not execute tests. Is this the best way to solve the issue? Not yet: extending the existing selection owner is appropriate, but its consumers must consistently distinguish dormant installs before package ownership validation. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fec3b7de5df1. LabelsLabel justifications:
EvidenceAcceptance criteria:
What 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 (9 earlier review cycles; latest 8 shown)
|
9e1f7e8 to
f28e947
Compare
f28e947 to
c66c4a5
Compare
Prefer compiled plugins from the running source checkout during discovery, Doctor convergence, updates, and payload verification. Preserve dormant npm records and report why version equality cannot establish SDK compatibility. Fixes #145266. Thanks @DonnieFi for the report and artifact-skew evidence.
Retain external install records for rebuilt source bundles while preserving the existing record retirement for ordinary bundled plugins. Extend the cleanup regression to a source checkout.
Read plugin outcome details only when present. The shipped post-core result reader accepts status-only acknowledgments, and collecting advisories must not turn that committed success into an update failure.
c66c4a5 to
893e9d8
Compare
Carry the existing source-build selection through named and bulk plugin updates and stable/beta release-cohort preflight. Keep dormant registry records available for unchanged notices without treating them as packages to mutate; retain strict ownership checks for active package updates. The four entrypoint regressions failed with missing package-owner metadata before this change and now pass. Thanks @DonnieFi for the original report. Refs #145266
|
@clawsweeper re-review Addressed the dormant-install preflight finding in 7eebcd4. Named CLI, --all, and stable/beta cohort regressions fail before the fix and pass after it; 88 focused tests and the complete changed-file gate pass. The PR body records the remaining broader upgrade-matrix gap. Fresh CI for this head is being watched. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
… npm refreshes with a mismatched SDK (openclaw#145356) Git/dev installations keep the plugin rebuilt from the running source checkout instead of refreshing a same-version npm build with a different Plugin SDK. Doctor records why the registry artifact was not admitted. Manifest-registry selection owns bundle precedence and dormant install detection. Named plugin updates, --all, and stable/beta release-cohort convergence carry that decision through package-mutation preflight while retaining strict checks for active packages. Existing npm records remain available, explicit plugin paths retain priority, and package-host updates retain their registry behavior. Fixes openclaw#145266 Thanks @DonnieFi for reporting the artifact skew and providing the reproduction evidence.
Fixes #145266
What Problem This Solves
Fixes an issue where users updating a git/dev installation would lose every Codex harness turn after Doctor refreshed the plugin from npm. The published plugin and rebuilt host could share
2026.9.4while importing and exporting different Plugin SDK symbols. Retained npm records could also make named plugin updates,--all, and stable/beta release-cohort convergence fail with missing package-owner metadata after selecting the rebuilt bundle.Why This Change Was Made
Compiled bundled plugins from the running source checkout retain priority without requiring
OPENCLAW_DEV_SOURCE_ROOT. Doctor and plugin updates keep those builds and record why the registry artifact was not admitted: current package metadata has no matching SDK build identity, and matching version strings are insufficient.The existing manifest selection owner determines which registry payloads are dormant. Update planning carries that selection through package-mutation preflight, while active packages retain strict ownership and reconciliation checks. Dormant records still reach the updater for an explanatory unchanged outcome. A damaged unused npm generation cannot quarantine the selected bundle.
External npm records and payloads remain available; explicit plugin paths and the existing development selector retain their precedence. Unbuilt source copies do not gain automatic priority. Ordinary bundled plugins retain their existing stale-record cleanup. Status-only post-core acknowledgments remain valid when detailed npm outcomes are absent.
User Impact
Git/dev updates keep using the plugin rebuilt with the host SDK, including when an older or same-version npm installation remains recorded. Named and bulk plugin updates and stable/beta source updates no longer reject that dormant record as an active package. Package-host updates retain their registry behavior. Selection notices appear in update outcomes and the existing update ledger.
Thanks @DonnieFi for the report and artifact-skew evidence.
Evidence
Head
7eebcd4a85098b782b5240b01c2c5000dd558161includes the reviewed preflight fixup and passed CI run 34673248789. The exact-head watcher reports GREEN with zero pending checks; five superseded check records remain in the aggregate GitHub rollup. Native review-artifact validation and hosted CI/Testbox preparation passed without changing the head. Its predecessor893e9d86523fdd8cd1a8ce4e33692eb189d39568also passed CI run 34670330882.The source-checkout boundary fixture covers older and equal-version npm records, the development selector present and absent, a corrupt dormant payload, explicit symlink selection, and an unbuilt source control. The original selection regression failed before the original repair. The added entrypoint regressions failed on
893e9d86523before the preflight fixup:The CLI entrypoint cases use dry-run with real manifest selection, isolated persisted install records, ownership preflight, and updater behavior. The stable/beta cases execute release-cohort convergence against synthetic source and registry artifacts. Existing ambiguous-ownership and package-reconciliation regressions pass. A lint-only fixture rewrite preserved the same cases, and the final regression rerun passed all 9 tests.
git diff --checkpassed. Independent review of the original patch and the preflight fixup is scoped-clean at P1; the intervening rebases were verified mechanical.Previously recorded real-artifact replay through original and repaired post-core convergence, followed by a built-CLI Codex turn:
That turn uses a synthetic app-server transport and isolated state without real provider credentials. Doctor also passes with the published post-core marker. Earlier validation passed 401 Doctor/updater tests, the focused status-only post-core cases, and all 153 public Plugin SDK build subpaths. These earlier results are supporting evidence, not a fresh full build of the fixup.
ClawSweeper review
No baselines, limits, or assertions were weakened. No dependencies, schema changes, or changelog edits were added.