openclaw - ✅(Solved) Fix update: global install verify false-positive on dist/extensions/*/.openclaw-install-stage artifacts [2 pull requests, 1 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#71752Fetched 2026-04-26 05:08:50
View on GitHub
Comments
0
Participants
1
Timeline
18
Reactions
0
Participants
Timeline (top)
referenced ×16cross-referenced ×2

openclaw update can fail at global install verify with unexpected packaged dist file .../.openclaw-install-stage/... even when the package update itself succeeds.

Error Message

  • Update output shows Update Result: ERROR

Root Cause

  • Produces false update failures
  • Reduces trust in updater health checks
  • Can trigger unnecessary rollback/troubleshooting

Fix Action

Fixed

PR fix notes

PR #71774: fix(update): skip .openclaw-install-stage* dirs in dist verifier (#71752)

Description (problem / solution / changelog)

Closes #71752.

Bug

Reporter saw `openclaw update` end with "Update Result: ERROR" / "global install verify" failing on paths like:

``` unexpected packaged dist file dist/extensions/brave/.openclaw-install-stage/node_modules/typebox/build/compile/code.mjs unexpected packaged dist file dist/extensions/brave/.openclaw-install-stage/node_modules/typebox/build/compile/code.d.mts ```

These are bundled-runtime-deps install staging dirs, created on the fly during plugin activation by:

  • `src/plugins/bundled-runtime-deps.ts` — `PLUGIN_ROOT_INSTALL_STAGE_DIR = ".openclaw-install-stage"`
  • `src/infra/install-package-dir.ts` — mkdtemp-based `.openclaw-install-stage-<rand>`

The dist verifier already omits sibling `.openclaw-runtime-deps-*` staging dirs (`OMITTED_DIST_SUBTREE_PATTERNS` line 29) but missed these install-stage variants.

Fix

Add a single regex pattern to `OMITTED_DIST_SUBTREE_PATTERNS` that matches both staging-dir flavors:

```ts /^dist\/extensions\/[^/]+\/\.openclaw-install-stage(?:-[^/]+)?(?:\/|$)/u ```

  • Bare `.openclaw-install-stage` (PLUGIN_ROOT_INSTALL_STAGE_DIR)
  • Suffixed `.openclaw-install-stage-AbC123` (mkdtemp variant)

Strict superset of existing behavior: only adds two more dir-shape exclusions to the verifier traversal, no other inventory paths affected.

Test

New test seeds artifacts under both variants:

  • `dist/extensions/brave/.openclaw-install-stage/node_modules/typebox/.../code.mjs` (bare)
  • `dist/extensions/browser/.openclaw-install-stage-AbC123/node_modules/playwright-core/package.json` (suffixed)

Asserts `collectPackageDistInventoryErrors` returns `[]`.

5/5 tests pass in `package-dist-inventory.test.ts`. Lint clean.

🤖 generated with assistance from Claude Code Co-authored-by: HCL [email protected]

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • scripts/openclaw-cross-os-release-checks.ts (modified, +3/-1)
  • src/infra/package-dist-inventory.test.ts (modified, +144/-0)
  • src/infra/package-dist-inventory.ts (modified, +75/-0)
  • test/scripts/openclaw-cross-os-release-checks.test.ts (modified, +25/-0)

PR #71772: fix(update): omit install-stage dist inventory paths

Description (problem / solution / changelog)

Summary

openclaw update can fail when the package dist inventory walks a bundled extension install staging tree that contains package-manager .bin symlinks, e.g.:

dist/extensions/amazon-bedrock-mantle/.openclaw-install-stage/node_modules/.bin/anthropic-ai-sdk

This PR:

  • Omits dist/extensions/*/.openclaw-install-stage/... from package dist inventory collection, matching other temporary bundled-extension runtime-dependency subtrees.
  • Adds a regression test covering the staged .bin symlink while preserving fail-closed symlink rejection for normal packaged dist entries.
  • Adds a changelog note for the updater fix.

Test plan

  • pnpm vitest run src/infra/package-dist-inventory.test.ts
  • pnpm exec oxlint --tsconfig tsconfig.oxlint.core.json src/infra/package-dist-inventory.ts src/infra/package-dist-inventory.test.ts

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/infra/package-dist-inventory.test.ts (modified, +12/-0)
  • src/infra/package-dist-inventory.ts (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Summary

openclaw update can fail at global install verify with unexpected packaged dist file .../.openclaw-install-stage/... even when the package update itself succeeds.

Observed Behavior

  • Update output shows Update Result: ERROR
  • Failed step: global install verify
  • Example errors:
    • unexpected packaged dist file dist/extensions/brave/.openclaw-install-stage/node_modules/typebox/build/compile/code.d.mts
    • unexpected packaged dist file dist/extensions/brave/.openclaw-install-stage/node_modules/typebox/build/compile/code.mjs
    • unexpected packaged dist file dist/extensions/brave/.openclaw-install-stage/node_modules/typebox/build/compile/compile.d.mts

Expected Behavior

Temporary staged install paths under bundled extension dist roots should not be treated as packaged-dist drift.

Minimal Repro

  1. Ensure global install exists at /home/<user>/.local/lib/node_modules/openclaw (or equivalent global root).
  2. Create staged artifact under a bundled extension path, for example:
    • dist/extensions/brave/.openclaw-install-stage/node_modules/typebox/build/compile/code.mjs
  3. Run update verification flow (openclaw update or internal verify call).
  4. Observe false-positive unexpected packaged dist file .../.openclaw-install-stage/....

Root Cause Hypothesis

Packaged dist inventory traversal/verification omits some runtime staging subtrees but does not consistently omit .openclaw-install-stage and .openclaw-install-stage-* under dist/extensions/<plugin>/.

Proposed Fix

Add omission patterns for:

  • dist/extensions/<plugin>/.openclaw-install-stage/**
  • dist/extensions/<plugin>/.openclaw-install-stage-*/**

Apply the omission consistently in:

  • packaged dist inventory verification traversal
  • postinstall dist pruning traversal

Why This Matters

  • Produces false update failures
  • Reduces trust in updater health checks
  • Can trigger unnecessary rollback/troubleshooting

Additional Note

This is separate from the cwd-related uv_cwd ENOENT failure mode when update is executed from a directory that is replaced during install.

extent analysis

TL;DR

To fix the openclaw update failure at global install verify, add omission patterns for .openclaw-install-stage and .openclaw-install-stage-* under dist/extensions/<plugin>/ in the packaged dist inventory verification traversal.

Guidance

  • Verify that the issue is indeed caused by the omission of .openclaw-install-stage and .openclaw-install-stage-* in the packaged dist inventory verification traversal by checking the update output for unexpected packaged dist file errors.
  • Apply the proposed fix by adding the omission patterns dist/extensions/<plugin>/.openclaw-install-stage/** and dist/extensions/<plugin>/.openclaw-install-stage-*/** to the packaged dist inventory verification traversal and postinstall dist pruning traversal.
  • Test the update verification flow after applying the fix to ensure that the false-positive errors are resolved.
  • Review the update output to confirm that the global install verify step completes successfully.

Example

No code snippet is provided as the issue does not require a code change, but rather a configuration update to the omission patterns.

Notes

The proposed fix assumes that the issue is indeed caused by the omission of .openclaw-install-stage and .openclaw-install-stage-* in the packaged dist inventory verification traversal. If the issue persists after applying the fix, further investigation may be necessary.

Recommendation

Apply the workaround by adding the proposed omission patterns to the packaged dist inventory verification traversal and postinstall dist pruning traversal, as this should resolve the false-positive errors and allow the openclaw update to complete successfully.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING