Skip to content

fix: speed up openclaw-runtime postinstall with caching#318

Merged
lefarcen merged 2 commits intomainfrom
fix/openclaw-runtime-postinstall-cache
Mar 21, 2026
Merged

fix: speed up openclaw-runtime postinstall with caching#318
lefarcen merged 2 commits intomainfrom
fix/openclaw-runtime-postinstall-cache

Conversation

@mrcfps
Copy link
Copy Markdown
Contributor

@mrcfps mrcfps commented Mar 20, 2026

Summary

  • speed up openclaw-runtime installs by adding a cached postinstall flow that skips reinstalling when tracked runtime install inputs have not changed
  • keep first-time installs faster by preferring lockfile-driven install behavior, while falling back from npm ci to npm install --prefer-offline when the runtime lockfile is not strict enough for CI npm
  • parallelize runtime pruning, share the runtime exists() helper, and add focused tests for cache fingerprint changes including missing tracked files

Notes

  • cache invalidation now includes the Node.js version, so upgrading Node forces a runtime reinstall automatically
  • removing the old unconditional preinstall clean is intentional: pnpm install no longer self-heals a corrupted openclaw-runtime/node_modules, and pnpm openclaw-runtime:reinstall remains the manual recovery path
  • parallel pruning assumes pruneTargets does not contain overlapping parent/child paths

Verification

  • pnpm lint
  • pnpm vitest run tests/openclaw-runtime/postinstall-cache.test.ts
  • PR CI is green

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@lefarcen lefarcen merged commit b1c3f83 into main Mar 21, 2026
6 checks passed
@mrcfps mrcfps deleted the fix/openclaw-runtime-postinstall-cache branch March 21, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants