Repository navigation
Conversation
…producer readOpenClawManagedNpmRootOverrides returned host pnpm-workspace overrides without filtering pnpm-only parent-child selectors (parent>child). Those selectors are invalid npm override keys and trigger EINVALIDTAGNAME before the retry-based compatibility path can recover, breaking managed npm plugin installs and the pre-install peer-sync that runs before the retry loop. Filter pnpm parent-child selectors once at the shared producer so every managed npm install/uninstall consumer receives a npm-compatible manifest up front. The existing retry path stays as a fallback for npm alias compatibility, which is npm-version-dependent. Fixes openclaw#124426
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 11:16 PM ET / August 27, 2026, 03:16 UTC. ClawSweeper reviewWhat this changesThe PR filters pnpm-only override selectors before generating managed npm manifests, plans peers using the normalized incoming overrides, and retains a bounded retry for npm alias incompatibility. Merge readinessThis focused repair remains necessary: current main still passes raw workspace overrides into the managed npm path and plans peers from the persisted manifest, while the PR normalizes that producer input and plans against the resulting manifest. No blocking patch defect was found. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherManaged npm plugin installation copies compatible host dependency overrides into a private npm project, plans peer dependencies, then installs or cleans packages. The changed boundary turns workspace override syntax into npm-safe manifest input before either planner or installer consumes it. flowchart LR
A[Host workspace overrides] --> B[Managed npm override reader]
B --> C[Normalize npm-compatible rules]
C --> D[Peer dependency planner]
D --> E[Managed npm manifest]
E --> F[npm install or cleanup]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -61, Tests -37, Docs 0. Total -98 across 8 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:
Technical reviewBest possible solution: Land the shared producer normalization and incoming-manifest peer planning once exact-head validation is green, preserving npm alias fallback only for npm versions that reject aliases. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: current main forwards raw workspace overrides and plans peers from the stored manifest, while the supplied before/after npm 11/12 evidence exercises the resulting invalid-selector path. Is this the best way to solve the issue? Yes—the shared override producer is the correct boundary, and supplying its normalized result to the peer planner removes the error-text-driven selector retry without dropping the separate alias fallback. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 064b0ddf59d2. 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
History |
Plan peers against the incoming compatible override set so retired selectors cannot silently retain stale pins. Remove duplicate selector retry and synchronization paths while preserving npm alias compatibility. Co-authored-by: WangYan <[email protected]>
|
@clawsweeper re-review Preserved the contributor history, merged current main, and appended the reviewed owner-boundary correction at The change also removes the obsolete selector retry and duplicate synchronization paths. Hosted checks on this final head are still pending. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Latest ClawSweeper review and rank-up follow-through for Existing-root compatibility is explicitly exercised: a persisted pnpm-only selector is replaced by normalized incoming overrides before peer planning, and the stale managed peer is removed from both manifest metadata and installed packages. Fresh-root normalization, unmanaged overrides, aliases, rollback, and conflict cases remain covered. No SQLite schema or public configuration surface changed. Real offline npm 11.17.0 and 12.0.2 subprocess proof is recorded above; this is not a claim of every historical upgrade path. I also directly inspected installed npm's |
|
Merged via squash.
|
…penclaw#124532) * [AI] fix(plugins): filter pnpm parent-child overrides at managed npm producer readOpenClawManagedNpmRootOverrides returned host pnpm-workspace overrides without filtering pnpm-only parent-child selectors (parent>child). Those selectors are invalid npm override keys and trigger EINVALIDTAGNAME before the retry-based compatibility path can recover, breaking managed npm plugin installs and the pre-install peer-sync that runs before the retry loop. Filter pnpm parent-child selectors once at the shared producer so every managed npm install/uninstall consumer receives a npm-compatible manifest up front. The existing retry path stays as a fallback for npm alias compatibility, which is npm-version-dependent. Fixes openclaw#124426 * fix(plugins): normalize overrides before managed peer planning Plan peers against the incoming compatible override set so retired selectors cannot silently retain stale pins. Remove duplicate selector retry and synchronization paths while preserving npm alias compatibility. Co-authored-by: WangYan <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]>
Closes #124426.
Summary
Keep the original producer-side repair from @wangyan2026 and complete the same managed-npm ownership boundary: normalize pnpm-only parent-child selectors before npm sees a manifest, and plan managed peers against the incoming normalized override set.
There were two connected problems. The shared override producer passed pnpm-only selectors into npm. Separately, peer planning read the old on-disk overrides before synchronization applied the incoming set. A retired invalid selector could therefore make planning fail and silently preserve stale managed peer pins. The earlier PR description overstated this as an unconditional install abort: current code can instead fall back to existing pins. The new regression and real-npm proof cover that actual behavior.
The canonical producer now recursively removes pnpm parent-child selectors while retaining npm-compatible range keys, nested rules, dependency references, and aliases. Install and uninstall consume that result before planning. The change deletes the selector error classifier, two-kind omission state, retry loops, and compensating second synchronization. One bounded npm-alias retry remains for the distinct npm compatibility error.
Production LOC: +52/-113 (net -61). Tests: +122/-159 (net -37). Documentation: +1/-1. No new dependency, config key, schema, or operator action.
Verification
Real npm 11.17.0 and 12.0.2, using local package fixtures, an unreachable registry, and lifecycle scripts disabled: the pre-fix selector produces
EINVALIDTAGNAMEand stale-peer retention; the candidate completes planning/install/pruning with exit 0 and removes the stale peer.Independent first-sync/second-sync proof discovers the required peer once and converges without a redundant update.
All 187 focused producer/install/uninstall tests passed, including a fresh rerun after merging current main into this contributor branch (31 infra + 156 plugin tests; 13.45 seconds):
The complete local
check:changedgate passed on the byte-identical candidate repair. The refreshed branch's eight repaired file blobs match that candidate exactly; the focused rerun andgit diff --checkpassed on the refreshed branch.Structured Codex autoreview completed for both the full repair and the contributor fixup, with no findings at its default P0 threshold. Independent review checked owner/caller paths, npm contracts, and current-main applicability.
Compatibility and remaining scope
The npm-managed project omits pnpm-only selectors because npm cannot represent them. Other npm-compatible overrides remain. The host pnpm installation is unchanged. Documentation now states this boundary instead of promising that every host override applies to managed npm dependencies.
The broader fallback from an unrelated peer-planning failure to existing pins, and legacy shared-root uninstall recovery, are unchanged follow-ups. This does not claim to fix the separate startup convergence report #122321 or reproduce the entire historical beta installation/provider flow.
Review follow-through
The latest completed ClawSweeper review asked for a clean current-main result and refreshed producer/install/uninstall tests. Both are complete. The branch was updated by merging main, preserving the original contributor ancestry, then appending the reviewed correction. The correction retains
Co-authored-by: WangYan <[email protected]>. Hosted checks on the final published head remain required before landing.