Dashboard › opencode-lore › Test database isolation and independent…
01a0b3d5-1892-7be8-b661-ac34f1ba1838| Project | Hits | Last recalled |
|---|---|---|
| opencode | 1 | 9d ago |
packages/core/test/setup.ts must assign a temporary LORE_DB_PATH; unset paths must make db() throw rather than touch production. Trap: run-level cleanup and singleton reset look sufficient, but aborted shards can leave temp roots while silenced stderr and per-connection path→project-ID caches leak across tests. Fix: reset silenceStderr(false) and invalidateProjectIdCache() after every test, verify no /tmp/opencode/lore-test-* residue, and give near-identical knowledge fixtures independent UUIDs so fuzzy dedup cannot merge them.