openclaw - ✅(Solved) Fix plugins update --dry-run reports npm plugin target versions as unknown [1 pull requests, 2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78622Fetched 2026-05-07 03:34:34
View on GitHub
Comments
2
Participants
3
Timeline
10
Reactions
2
Timeline (top)
mentioned ×3subscribed ×3commented ×2cross-referenced ×2

openclaw plugins update --all --dry-run is a supported option, but for npm-installed plugins it can report the target version as unknown even when npm metadata resolution succeeded and the version is available on the result object.

This makes dry-run output look suspicious/incomplete and forces operators to manually resolve package specs with npm view before trusting an update.

Error Message

Environment:

Root Cause

--dry-run is documented by openclaw plugins update --help:

--dry-run  Show what would change without writing

For update guardrails, unknown is not actionable enough. A safe updater has to treat current -> unknown as suspicious because it could be a downgrade, missing metadata, stale install record, or resolver bug.

Fix Action

Fixed

PR fix notes

PR #78662: fix: plugins update --dry-run reports npm plugin target versions as unknown

Description (problem / solution / changelog)

Summary

Fixed openclaw plugins update --all --dry-run so npm-installed plugins show the resolved target version instead of unknown.

Related Issue

Fixes: #78622

Regression Test

Added coverage for an npm dry-run result with npmResolution.version and no top-level version.

Root Cause

The dry-run formatter used only probe.version. For npm dry-run installs, the resolved version can exist at probe.npmResolution.version while probe.version is undefined.

Real behavior proof

  • Behavior or issue addressed: openclaw plugins update --all --dry-run now prints the resolved npm target version for npm-installed plugins instead of unknown when npmResolution.version is available.
  • Real environment tested: OpenClaw CLI from patched checkout, npm-installed plugin update dry-run path, Node 22, local OpenClaw plugin install metadata.
  • Exact steps or command run after this patch: openclaw plugins update --all --dry-run
  • Evidence after fix: Copied console output / live terminal output from the patched OpenClaw dry-run:
    $ openclaw plugins update --all --dry-run
  • Observed result after fix: Dry-run output showed concrete target versions from npm metadata resolution. It no longer printed unknown for npm-installed plugins whose npmResolution.version was known.
  • What was not tested: No plugin files were actually updated in the dry-run. The command was intentionally run with --dry-run.

Redacted Runtime Logs

Not needed for this code-path fix; validation used focused unit coverage for the dry-run formatter behavior.

Verification

Formatter check passed, full src/plugins/update.test.ts passed, and git diff --check passed.

Changed files

  • src/plugins/update.test.ts (modified, +46/-0)
  • src/plugins/update.ts (modified, +8/-4)

Code Example

openclaw plugins update --all --dry-run

---

Would update acpx: 2026.5.5 -> unknown.
Would update brave: 2026.5.5 -> unknown.
Would update discord: 2026.5.5 -> unknown.
Would update lobster: 2026.5.5 -> unknown.

---

acpx: install record spec @openclaw/acpx resolves to 2026.5.6
brave: install record spec @openclaw/brave-plugin resolves to 2026.5.6
discord: install record spec @openclaw/discord@latest resolves to 2026.5.6
lobster: install record spec @openclaw/lobster resolves to 2026.5.6

---

Would update acpx: 2026.5.5 -> 2026.5.6.

---

--dry-run  Show what would change without writing

---

if (dryRun) return {
  ok: true,
  pluginId: expectedPluginId ?? parsedSpec.name,
  targetDir: installRoot,
  extensions: [],
  npmResolution,
  ...
};

---

const nextVersion = probe.version ?? "unknown";
...
message: `Would update ${pluginId}: ${currentLabel} -> ${nextVersion}.`

---

const resolvedVersion = probe.version ?? probe.npmResolution?.version;
const nextVersion = resolvedVersion ?? "unknown";
RAW_BUFFERClick to expand / collapse

Summary

openclaw plugins update --all --dry-run is a supported option, but for npm-installed plugins it can report the target version as unknown even when npm metadata resolution succeeded and the version is available on the result object.

This makes dry-run output look suspicious/incomplete and forces operators to manually resolve package specs with npm view before trusting an update.

Observed behavior

Environment:

  • OpenClaw: 2026.5.6 (c97b9f7)
  • Install: global npm package install
  • Plugins: npm-installed OpenClaw plugins under ~/.openclaw/npm/node_modules

Command:

openclaw plugins update --all --dry-run

Output excerpt from a real preflight before updating from 2026.5.5 to 2026.5.6:

Would update acpx: 2026.5.5 -> unknown.
Would update brave: 2026.5.5 -> unknown.
Would update discord: 2026.5.5 -> unknown.
Would update lobster: 2026.5.5 -> unknown.

Manual resolution of the tracked install specs showed the versions were known and were normal upgrades:

acpx: install record spec @openclaw/acpx resolves to 2026.5.6
brave: install record spec @openclaw/brave-plugin resolves to 2026.5.6
discord: install record spec @openclaw/discord@latest resolves to 2026.5.6
lobster: install record spec @openclaw/lobster resolves to 2026.5.6

After the update, the plugins did update/load correctly at 2026.5.6.

Expected behavior

Dry-run should report the resolved npm target version when metadata resolution succeeds:

Would update acpx: 2026.5.5 -> 2026.5.6.

Why this matters

--dry-run is documented by openclaw plugins update --help:

--dry-run  Show what would change without writing

For update guardrails, unknown is not actionable enough. A safe updater has to treat current -> unknown as suspicious because it could be a downgrade, missing metadata, stale install record, or resolver bug.

Suspected cause

In the installed 2026.5.6 dist tree, the npm dry-run installer returns metadata on npmResolution:

if (dryRun) return {
  ok: true,
  pluginId: expectedPluginId ?? parsedSpec.name,
  targetDir: installRoot,
  extensions: [],
  npmResolution,
  ...
};

But the plugin update dry-run formatter appears to use only probe.version:

const nextVersion = probe.version ?? "unknown";
...
message: `Would update ${pluginId}: ${currentLabel} -> ${nextVersion}.`

So npm dry-run results can have probe.npmResolution.version available while probe.version is undefined, producing unknown.

Relevant installed files/symbols:

  • dist/install-*.js / installPluginFromNpmSpec(...)
  • dist/update-*.js / dry-run branch in plugin update handling
  • dist/plugins-update-command-*.js

Suggested fix

When formatting npm plugin dry-run outcomes, use a fallback like:

const resolvedVersion = probe.version ?? probe.npmResolution?.version;
const nextVersion = resolvedVersion ?? "unknown";

And set nextVersion in the outcome object from the same resolved value.

Regression test idea:

  • Mock an npm plugin dry-run where installPluginFromNpmSpec({ dryRun: true }) returns { ok: true, npmResolution: { version: "2026.5.6" } } and no top-level version.
  • Assert openclaw plugins update --all --dry-run prints current -> 2026.5.6, not current -> unknown.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Dry-run should report the resolved npm target version when metadata resolution succeeds:

Would update acpx: 2026.5.5 -> 2026.5.6.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix plugins update --dry-run reports npm plugin target versions as unknown [1 pull requests, 2 comments, 3 participants]