Files
Dragan Spiridonov db99c17c7d feat(init): warn on stale ./vectors.db post hnswlib-node migration (#399)
Prior to ADR-090, NativeHnswBackend wrapped @ruvector/router's
VectorDb, whose constructor unconditionally wrote a `vectors.db`
redb file to the current working directory — outside .agentic-qe/,
in a non-SQLite format, never read by anything in production
(its HNSW search returned wrong answers anyway). Users who upgrade
from a pre-#399 version will have an orphaned multi-MB file in
their project root.

`aqe init` now detects `./vectors.db` in the project root and logs
a one-time warning identifying it as stale from the @ruvector/router
era and suggesting `rm vectors.db` for cleanup.

The phase does NOT auto-delete the file. Per CLAUDE.md data
protection rules, AQE never overwrites, replaces, recreates, or
removes any .db file without explicit user confirmation. Users who
want to clean up run `rm vectors.db` themselves.

Three new unit tests in `tests/unit/init/phases/database-phase.test.ts`:
  - asserts the warning fires when `./vectors.db` is present
  - asserts the warning does not fire when it is absent
  - asserts the phase never calls fs.unlinkSync or fs.rmSync,
    regardless of whether vectors.db exists (data protection guard)

Refs #399, ADR-090.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 18:23:09 +00:00
..
2026-04-05 18:51:49 +02:00
2026-04-05 18:51:49 +02:00
2026-04-05 18:51:49 +02:00
2026-04-05 18:51:49 +02:00