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>