Description
Currently, Playwright unit tests for the AI memory-core components (DreamService, FileSystemIngestor, GraphService, etc.) are leaking artifacts such as SQLite test databases and mock markdown files into the os.tmpdir() and occasionally the true repository root if path resolution fails.
This is causing file pollution during local test executions and potential test-suite fragility.
Required Changes
- Refactor test suite
aiConfig overrides (e.g., testDbPath, mockFsRoot, handoffFilePath) to map exclusively to <rootDir>/tmp/.
- Introduce inline logical checks during test setup (
beforeAll/beforeEach) to automatically fs.mkdirSync the tmp folder if it doesn't already exist.
- Ensure the isolated tests cleanly self-destruct their specific SQLite files inside
tmp during afterAll checks.
Description
Currently, Playwright unit tests for the AI memory-core components (
DreamService,FileSystemIngestor,GraphService, etc.) are leaking artifacts such as SQLite test databases and mock markdown files into theos.tmpdir()and occasionally the true repository root if path resolution fails.This is causing file pollution during local test executions and potential test-suite fragility.
Required Changes
aiConfigoverrides (e.g.,testDbPath,mockFsRoot,handoffFilePath) to map exclusively to<rootDir>/tmp/.beforeAll/beforeEach) to automaticallyfs.mkdirSyncthetmpfolder if it doesn't already exist.tmpduringafterAllchecks.