Files
msd-core/tests/loop-hooks-empty-points-e2e.test.cjs
Dennis Alexis Valin Dittrich 95529ef153 fix(#4291): isolate ship:pre and empty-points e2e CLI tests from real HOME (#4321)
* fix(#4291): isolate ship:pre and empty-points e2e CLI tests from real HOME

tests/loop-hooks-ship-pre-e2e.test.cjs's runTools() and
tests/loop-hooks-empty-points-e2e.test.cjs's spawnGsd() spawned gsd-tools
without sandboxing HOME, so a capability genuinely installed on the host
(e.g. beads, markdown-linting) leaked into the resolved registry and
inflated their exact-count/empty-array assertions. Mirrors the
installSpawnEnv() fix already applied to loop-hooks-verify-post-e2e.test.cjs
in #4204/#4293.

* fix(#4291): credit GSD_HOME blanking in spawnGsd docblock

installSpawnEnv() blanks GSD_HOME as well as sandboxing HOME, and
capability-loader's overlayRoots checks GSD_HOME before falling back to
os.homedir() — sandboxing HOME alone would leave that env var reaching
the real machine. The sibling loop-hooks-ship-pre-e2e.test.cjs docblock
already states both halves; this one credited only HOME.

Per trek-e's review on open-gsd/gsd-core#4321 (Nit, isolated adversarial
pass).

---------

Co-authored-by: Test <test@test.com>
Co-authored-by: Tom Boucher <trekkie@nomorestars.com>
2026-09-07 22:04:44 -04:00

42 KiB