Repository navigation
fix(plugins): plugin install survives pnpm-only overrides - #116245
Conversation
57caad1 to
481a715
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 30, 2026, 1:30 AM ET / 05:30 UTC. ClawSweeper reviewWhat this changesThe PR changes managed npm-root plugin installation so host-npm parser failures from pnpm-only override selectors or npm aliases retry with only the incompatible override category removed. Merge readiness⛔ Blocked until real behavior proof is added - 4 items remain Keep this PR open. The proposed retry is a focused compatibility repair, but the protected Priority: P2 Review scores
Verification
How this fits togetherManaged npm-root installation writes a temporary package manifest for installing or updating plugins outside OpenClaw’s main dependency tree. The installer passes managed dependency overrides to npm, then retries when the host npm cannot parse syntax that pnpm accepts, affecting plugin install and update completion. flowchart LR
A[Plugin install or update request] --> B[Managed npm-root manifest]
B --> C[Managed dependency overrides]
C --> D[Host npm install]
D --> E{Parser rejects override syntax?}
E -->|No| F[Plugin installed or updated]
E -->|Yes| G[Classify incompatible override kind]
G --> H[Retry with only that kind omitted]
H --> D
Before merge
Agent review detailsSecurityNone. PR surfaceSource +53, Tests +56. Total +109 across 5 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the selective, bounded omission design, add a redacted real managed npm-root install or update transcript that starts with an affected override set and ends with successful installation, then obtain the required maintainer review before merge. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction is available in the reviewed evidence. The source and focused tests identify the parser-error classification path, so the failure is source-reproducible, but a current host-npm install/update transcript is still missing. Is this the best way to solve the issue? Unclear: selective omission is the maintainable direction because it avoids the former all-alias fallback, but the review could not independently inspect the full current-main callers and host-npm dependency contract due read-only command execution being unavailable. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 353c05d54745. 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
HistoryReview history (1 earlier review cycle)
|
|
Rank-up moves addressed on exact head
The protected-label proof request is therefore satisfied; no rank-up move is being skipped. |
|
Merged via squash.
|
* fix(plugins): preserve compatible npm overrides on retry * fix(plugins): keep npm compatibility type internal * fix(plugins): bound managed override retries
…16245) * fix(plugins): preserve compatible npm overrides on retry * fix(plugins): keep npm compatibility type internal * fix(plugins): bound managed override retries
* origin/main: (24 commits) fix(e2e): apply default service identity per flow (openclaw#116265) chore(android): record 2026.7.4 Play metadata fix(ci): accept one verified Telegram SUT launch (openclaw#116267) chore(android): prepare 2026.7.4 Play release fix(e2e): align service account state (openclaw#116254) refactor(qa): remove live-channel scenario registries and wrappers (openclaw#115752) fix(ci): let trusted Telegram QA stage runtime (openclaw#116252) fix(plugins): plugin install survives pnpm-only overrides (openclaw#116245) test(qa): recognize internal image completions (openclaw#116234) fix(test): review Codex runtime scan chunks (openclaw#116212) fix(systemd): clear start-limit latch before gateway start (openclaw#116178) fix(security): expose every executable call in plugin scans (openclaw#116222) chore(sdk): repin the API baseline after the resolver signature change test(e2e): delay the draft-proof final answer past the start gate fix(channels): resolve tool progress against the caller's stream mode fix(ci): satisfy docs formatting, lint, and the SDK API baseline test(e2e): add a progress-draft scenario to the mock provider docs(telegram): call out the changed default preview on upgrade refactor(channels): render the progress label as a block, not a line fix(channels): show tool lines under the progress status headline ...
What Problem This Solves
Fixes an issue where installing or updating a plugin through the managed npm root could fail when OpenClaw's pnpm workspace overrides contained pnpm-only parent-child selectors or npm alias values unsupported by the host npm version.
Why This Change Was Made
The installer now classifies the specific npm parser incompatibility and retries after removing only the unsupported override kind. Selector-key failures preserve valid npm aliases and semver ranges; alias-comparator failures preserve pnpm selector rules until npm itself rejects them. The fallback is bounded because each retry must add a previously unseen omission kind.
User Impact
Plugin installs and updates no longer fail solely because the host npm cannot parse OpenClaw's pnpm-native override syntax, while compatible dependency overrides remain enforced.
Evidence
30516598496passed all 69 jobs atb8b00650b396990e17c5edf6b25444a230b3b785.src/plugins/install.npm-spec.test.ts— 69/69 passed.src/infra/npm-managed-root.test.ts— 27/27 passed.node scripts/check-changed.mjs -- src/infra/npm-managed-root.ts src/plugins/install-managed-npm-state.ts src/plugins/install-managed-npm.ts src/plugins/install.npm-spec.test.ts— passed core/core-test typecheck, changed-file formatting/lint, plugin boundaries, dead-code and architecture guards.--mode branch --base origin/main) — clean, no accepted/actionable findings.npm-package-arg: versioned, unversioned, scoped parent-child selectors produce the coveredEINVALIDTAGNAME,EINVALIDPACKAGENAME, andOverride without nameforms;pkg@>1remains valid npm semver syntax.Real managed-install proof
Ran the actual CLI install path on an ephemeral Linux Blacksmith Testbox with npm 11.16.0 and an isolated temporary
OPENCLAW_STATE_DIR:The resulting managed-root manifest was inspected before cleanup:
{ "installedDependency": "2026.7.1", "selectorKeysRemaining": [], "preservedAliasOverrides": [ "node-domexception=npm:@nolyfill/[email protected]", "request-promise=npm:@cypress/[email protected]", "request=npm:@cypress/[email protected]" ], "managedOverrideCount": 31 }pnpm openclaw plugins list --jsonthen returned"id": "voice-call". The isolated state directory and Testbox were removed after the successful run.