fix(test): strip every inherited CODEMAN_* var and move quick-start off 3099 (#479)

Split out of #476. A Docker Compose deployment exports CODEMAN_CASES_PATH,
which bypasses the temp HOME, so route tests wrote into the real case root.


Claude-Session: https://claude.ai/code/session_01GuHtuPiHXdykq9T6rKQJ9n

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Devvyn
2026-09-24 01:35:23 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 120d780267
commit dd230b0b6e
4 changed files with 17 additions and 3 deletions
+9
View File
@@ -35,6 +35,12 @@ process.env.HOME = testHome;
process.env.USERPROFILE = testHome;
process.env.VITEST = 'true';
for (const key of Object.keys(process.env)) {
if (key.startsWith('CODEMAN_')) delete process.env[key];
}
// Explicitly document the most consequential inherited settings below. The
// loop above intentionally also catches future container/deployment variables.
delete process.env.CODEMAN_PASSWORD;
delete process.env.CODEMAN_USERNAME;
// Gesture availability changes renderIndexHtml output (injects the
@@ -84,6 +90,9 @@ delete process.env.CLAUDE_CONFIG_DIR;
delete process.env.CODEMAN_INSTANCE;
delete process.env.CODEMAN_DATA_DIR;
delete process.env.CODEMAN_TMUX_SOCKET;
// Docker Compose binds cases outside HOME. Leaving this set makes route tests
// write into the deployment's real case root instead of their temp HOME.
delete process.env.CODEMAN_CASES_PATH;
afterEach(() => {
vi.clearAllMocks();