Files
openclaw/scripts/pr-lib
Peter Steinberger 77b9385340 fix: tests in nested git worktrees load bundled plugins from the enclosing checkout (#100053)
* fix(infra): stop package-root walks at node_modules boundaries

Nested git worktrees (.worktrees/<pr>, .claude/worktrees/*) have no local
node_modules, so vitest workers run with argv1 inside the enclosing
checkout's node_modules. resolveOpenClawPackageRoot* walked up past that
boundary, resolved the enclosing checkout as the openclaw package root,
and bundled plugin discovery loaded the ancestor's stale extension
manifests, failing ~12 test shards and the scripts/pr prepare-run test
gate whenever the primary checkout sat on a different branch.

A package.json above a node_modules directory belongs to the workspace
that installed the tooling, never to the package owning the running code,
so the ancestor walk now stops there. Installed layouts
(node_modules/openclaw, .bin shims, global installs) match at or below
the boundary and are unaffected.

* fix(scripts): pin bundled plugin discovery in nested PR worktree gates

scripts/pr gates run pnpm test inside .worktrees/<pr>, which resolves
vitest tooling from the primary checkout's node_modules. PR branches that
predate the openclaw-root node_modules-boundary fix would still discover
the primary checkout's stale bundled plugin manifests, so pin
OPENCLAW_BUNDLED_PLUGINS_DIR to the worktree's own extensions before the
build/check/test gates.
2026-07-04 14:36:53 -04:00
..
2026-06-23 21:49:36 +08:00
2026-06-24 09:28:03 +08:00
2026-06-18 03:11:20 +08:00