voyage/tests/helpers/no-session-id.mjs
Kjell Tore Guttormsen d8527976ef
fix(tests): the suite no longer hands the session id to the lock CLI
npm test now preloads tests/helpers/no-session-id.mjs, which deletes CLAUDE_CODE_SESSION_ID before any test file loads, and the 18 files that spread process.env into a child use childEnv() instead (23 sites). A live session's stop guard is no longer pointed at a temp-repo lock (S133).

engines stays >=18: --import exists from Node 18.18/20.6, and the quoted test glob already needs Node 21 (criteria-runner NODE_GLOB_MAJOR), so the real floor does not move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:09:14 +02:00

6 lines
393 B
JavaScript

// tests/helpers/no-session-id.mjs
// Preloaded by `npm test` (node --import). The lock CLI (lib/util/test-lock.mjs)
// writes a session pointer keyed by CLAUDE_CODE_SESSION_ID, and the stop guard
// reads it; a suite run inside a Claude Code session must not write one for
// that live session (S133). The id is removed before any test file starts.
delete process.env.CLAUDE_CODE_SESSION_ID;