mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-09-14 14:01:28 +08:00
7dd4b52529
The agentdb / @ruvector/rvf native bindings write `ruvector.db` (and friends) to the package cwd as a side-effect. There is no source reference to `ruvector.db` in `src/**`, so this is test pollution, not a runtime dependency. ADR-125 Phase 7 closes the boundary: Additions: - `v3/@claude-flow/memory/.gitignore` — package-local gitignore so the package is self-contained. Lists `ruvector.db`, `*.rvf`, `*.redb`, test artifacts, and build output. (The repo root already ignores `*.db`; this file makes the policy explicit at the package level.) - `v3/@claude-flow/memory/vitest.setup.ts` — wipes known leak files (`ruvector.db`, `test-database-provider.rvf`, `agentdb.rvf.lock`) and any stray `*.db`/`*.rvf`/`*.redb` from the package root before AND after every test run. - Wired into `vitest.config.ts` via `setupFiles: ['./vitest.setup.ts']`. - `scripts/smoke-memory-no-stray-db.mjs` — CI guard that runs `npm test` in the package and fails if any *.db / *.rvf / *.redb file appears in `git status --porcelain` afterwards. The smoke is intentionally diff-based (compares before / after status) so it doesn't fail on pre-existing untracked files unrelated to the test run. Verified locally: smoke exits 0, `git status` clean after test run, 378 tests passing. Refs: ADR-125 Phase 7 Closes: part of #2061 Co-Authored-By: RuFlo <ruv@ruv.net>
17 lines
489 B
TypeScript
17 lines
489 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
include: ['src/**/*.test.ts'],
|
|
exclude: ['node_modules', 'dist'],
|
|
testTimeout: 15000,
|
|
hookTimeout: 10000,
|
|
globals: false,
|
|
typecheck: { enabled: false },
|
|
// ADR-125 Phase 7 — wipe ruvector.db / *.rvf / *.redb stray artifacts
|
|
// before and after each test run so no DB file leaks into git status.
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
},
|
|
});
|