LearnNewsExamplesServices
Frontmatter
id9746
titleIsolate AI unit test artifacts to local tmp directory
stateClosed
labels
bugai
assigneestobiu
createdAtApr 6, 2026, 9:58 PM
updatedAtApr 6, 2026, 10:00 PM
githubUrlhttps://github.com/neomjs/neo/issues/9746
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 6, 2026, 10:00 PM

Isolate AI unit test artifacts to local tmp directory

Closedbugai
tobiu
tobiu commented on Apr 6, 2026, 9:58 PM

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

  1. Refactor test suite aiConfig overrides (e.g., testDbPath, mockFsRoot, handoffFilePath) to map exclusively to <rootDir>/tmp/.
  2. Introduce inline logical checks during test setup (beforeAll/beforeEach) to automatically fs.mkdirSync the tmp folder if it doesn't already exist.
  3. Ensure the isolated tests cleanly self-destruct their specific SQLite files inside tmp during afterAll checks.
tobiu added the bug label on Apr 6, 2026, 9:58 PM
tobiu added the ai label on Apr 6, 2026, 9:58 PM
tobiu referenced in commit 1383373 - "test: Isolate REM pipeline test data to local workspace tmp directory to prevent mock pollution (#9746)" on Apr 6, 2026, 9:59 PM
tobiu assigned to @tobiu on Apr 6, 2026, 10:00 PM
tobiu
tobiu Apr 6, 2026, 10:00 PM

Resolved in commit 1383373ca. Test pollution fixed by directing all unit tests to local workspace /tmp.

tobiu closed this issue on Apr 6, 2026, 10:00 PM
tobiu referenced in commit dc3ef79 - "chore: align WrapperIdCheck and sandman_handoff metrics with test isolation updates (#9746)" on Apr 6, 2026, 10:02 PM