Problem
--out /nonexistent-dir/out.json throws a raw ENOENT stack, unlike the guarded read path.
Where
bin/tokencut.mjs (writeFileSync with no try/catch).
Acceptance
Add a failing test first running --compact --out <missing-dir>/f.json, expecting a non-zero exit with a one-line could not write stderr and no stack. Then fix.
Problem
--out /nonexistent-dir/out.jsonthrows a rawENOENTstack, unlike the guarded read path.Where
bin/tokencut.mjs(writeFileSyncwith no try/catch).Acceptance
Add a failing test first running
--compact --out <missing-dir>/f.json, expecting a non-zero exit with a one-linecould not writestderr and no stack. Then fix.