Repository navigation
Description
Summary
openclaw update --tag <version> --dry-run reports the update is safe and ready to apply when a fresh stable version exists on GitHub releases but has not yet propagated to the npm registry. The subsequent apply (without --dry-run) then fails with npm ETARGET. This is a confusing UX gap during the npm propagation window after a release.
Reproduction (production observation)
OpenClaw stable v2026.5.26 published to GitHub at 2026-05-27T11:27:24Z (commit 10ad3aa).
At ~12:14Z (~47 min later), npm registry had not yet propagated:
$ npm view openclaw@2026.5.26 version
npm error code E404
npm error 404 No match found for version 2026.5.26
npm view openclaw dist-tags showed latest=2026.5.22, beta=2026.5.26-beta.2 — no 2026.5.26 stable on npm yet.
openclaw update --channel stable --tag 2026.5.26 --dry-run --json during this window resolved cleanly:
targetVersion: "2026.5.26"current: "2026.5.24-beta.2"downgradeRisk: false- No warnings, output indicated the update path was clean
Running the apply (--channel stable --tag 2026.5.26 --yes --no-restart --json — same flags, no --dry-run) failed before mutation:
npm error code ETARGET
npm error notarget No matching version found for openclaw@2026.5.26.
Installed bytes remained at 2026.5.24-beta.2, no restart happened, safe-fail behavior was correct. But the dry-run had given a green light.
The version was eventually propagated to npm at 13:21Z (1h54m after GitHub release). The same --channel stable --tag 2026.5.26 apply then succeeded cleanly, landing 2026.5.26 (commit 10ad3aa), gateway restarted, validator clean, all post-update gates passed.
Expected behavior
Dry-run should fail at the same gate apply fails, or at minimum surface a warning when the target version is not yet present on the npm registry's latest dist-tag, so the user knows the apply will fail until propagation completes.
Suggested options
- Dry-run probes npm
latestdist-tag for the target version — fail closed if not yet present (or warn explicitly that "registry has not yet propagated this version; apply will fail until npm publishes") - Document the propagation-lag scenario in the Update docs so users running
update --tag <new-stable>within ~2h of a GitHub release know to wait - Have apply automatically fall back to the GitHub package-spec install path when npm ETARGET fires for the requested
--tag, since--tagalready supports GitHub specs perupdate.mddocs and the source-of-truth GitHub release is unambiguous
Impact
- Time wasted: ~15-25 min on the failed apply + diagnostic before realizing it was a propagation timing issue
- User confusion: dry-run green light → apply red, contradictory signals from the same tool with the same flags
- Workaround in docs (
--tag github:openclaw/openclaw#v2026.5.26) is technically accepted but flagstargetVersion=nullin dry-run output, losing the standard version-resolution preview
Environment
- OpenClaw
2026.5.24-beta.2upgrading to2026.5.26(stable channel) - Linux Ubuntu VPS, global npm install via
~/.npm-global - No data loss, no rollback, update eventually succeeded after npm propagation
Filed as UX improvement for future stable releases.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 27, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 1, 2026, 3:51 AM ET / 07:51 UTC.
Summary
Current
mainnow rejects an uninspectable exact npm target before either dry-run output or installation, addressing the reported green-preview/ETARGETmismatch. This issue must remain open while its formally linked implementation PR is reconciled with that behavior; likely related person: Peter Steinberger (medium confidence).Reproducibility: yes. from current source: an exact semver tag becomes the target version, then the updater inspects that exact package target and exits before dry-run output when npm metadata cannot be read or does not match.
Next step
Do not queue a duplicate repair while #88683 remains the formally linked implementation candidate; reconcile that PR with current main first.
Review details
Best possible solution:
Reconcile #88683 against the current exact-target preflight, retaining only any proven unique coverage or behavior; once that PR is merged or closed, close this issue as addressed on current main.
Do we have a high-confidence way to reproduce the issue?
Yes, from current source: an exact semver tag becomes the target version, then the updater inspects that exact package target and exits before dry-run output when npm metadata cannot be read or does not match.
Is this the best way to solve the issue?
Yes for the central issue: current main uses one exact package-target preflight before both preview and installation rather than adding a dry-run-only warning or fallback path. The linked PR still needs comparison to establish whether it has any unique remaining value.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 07b7d6446ca1.
Label changes
Label changes:
maturity:stable: The primary owner is the CLI updater; the maturity shortlist classifies CLI Updates and Upgrades as M4 Stable.clawsweeper:needs-maintainer-review: Current issue advisory state no longer selects this label.Label justifications:
P2: The reported contradiction affects a bounded package-update workflow and safely fails before mutation, so it is a normal-priority reliability defect.impact:other: The concrete impact is misleading package-update planning and operator diagnostics rather than data, message, session, auth, or crash behavior.maturity:stable: The primary owner is the CLI updater; the maturity shortlist classifies CLI Updates and Upgrades as M4 Stable.Evidence reviewed
What I checked:
src/cli/update-cli/update-command.ts:393, 07b7d6446ca1)npm view <exact-spec> ... --json --globalthrough the resolved package-manager command and returns a nonzero lookup as an error, matching the install surface rather than assuming npm availability. (src/infra/update-check-package-target.ts:145, 07b7d6446ca1)src/cli/update-cli.test.ts:2993, 07b7d6446ca1)src/cli/update-cli/update-command.ts:393, 0d91b07f5bea)Likely related people:
src/cli/update-cli/update-command.ts,src/infra/update-check-package-target.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.WarrenJones commentedon May 27, 2026
steipete commentedon Aug 1, 2026
Thank you, @islandpreneur007, for the clear report. This failure mode is now fixed on current main by #110271, commit a89f01abf4e680df33fda6ab0862660d123d5068.
The updater now validates the exact requested package/version through its existing owning package manager and configured registry before the shared dry-run/apply split. This also honors custom/private registries, and missing or uninspectable targets fail closed before any installation or service mutation.
I verified the actual current production updater against an isolated local npm registry in all four cases:
openclaw@2099.1.1: dry-run exits 1 without claiming success; apply exits 1 without reaching installation or mutating services.openclaw@2026.5.26: dry-run prints a successful preview; apply passes preflight and reaches the installation boundary.The real exact package-owner command was
npm view openclaw@<version> version engines.node openclaw.schemaVersions --json --global. Closing as completed because the fix is already merged. Thanks again for identifying the original misleading-preview bug.islandpreneur007 commentedon Aug 1, 2026
Thanks for the thorough writeup and for testing all four cases against a local registry — the fail-closed-before-mutation framing is exactly right.
Confirming it shipped: the validation is present in
2026.7.2-beta.5(ee929db). The bundled updater carries theschemaVersions/engines.nodemetadata query along with the fail-closed paths (npm view produced incomplete package metadata (missing: …),npm view produced invalid JSON), so consumers on the current beta line already have it.Happy for this to stay closed.