Dashboard › opencode-lore › Test database isolation and independent…
01a0a5d8-8c66-7158-ae59-4799ac5a4174| Project | Hits | Last recalled |
|---|---|---|
| opencode | 1 | 8d ago |
packages/core/test/setup.ts must assign a temporary LORE_DB_PATH; an unset test path should make db() throw rather than risk mutating the real Lore database. After every test, call silenceStderr(false) and invalidateProjectIdCache() so logging and cached mappings cannot leak between cases. Near-identical knowledge() fixtures must each receive an explicit independent crypto.randomUUID() and retain that ID for cleanup. Otherwise production fuzzy dedup may merge fixtures into one logical source, invalidating recall-anchor, transfer, and transaction assertions.