mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-25 16:33:14 +00:00
fixed-privacy-key.ts writes <home>/.config/codeburn/privacy-key unconditionally. Under vitest that is the throwaway sandbox env-isolation.ts mints, and harmless. Imported from anywhere else — tsx, a stray node -e, a REPL — homedir() is the developer's real home and the write silently replaces their key, re-keying every resource fingerprint and orphaning whatever was already synced. privacy-key.ts refuses to cause that on its own; a test helper must not cause it either. The sandbox has a recognizable shape (a mkdtemp dir under tmpdir() named codeburn-test-env-*), so the guard needs no new marker: anything else throws with the reason. |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| package.json | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||