mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-09-30 12:39:42 +02:00
session-routes-workspace-hooks.test.ts wrote its h1/box/10.0.0.5 host fixture into getDataDir()/remote-hosts.json. getDataDir() resolves via homedir() → ~/.codeman (INSTANCE_SUFFIX='' by default), and overriding HOME in test/setup.ts does NOT change os.homedir() on Linux — so every full-suite run silently overwrote the PRODUCTION remote-hosts.json, wiping user-defined remote hosts, emptying the launch-case dropdown and breaking remote session creation (found live 2026-08-29). The vitest v4 test.env config key is ignored (probe confirmed the worker still saw CODEMAN_DATA_DIR=undefined), so the reliable fix is stubbing the env inside the test: the fixture write now goes to a throwaway /tmp dir via vi.stubEnv + finally unstub. Verified: prod remote-hosts.json hash is identical before and after the suite run.