Context
PR #371 (cluster-21) scaffolded kkernel vector sweep but deferred the actual backend integration.
ADR-044 §5 specifies:
VectorStore::orphan_sweep(OrphanSweepConfig) called by the operator path
- Output schema:
OrphanSweepResult { scanned, deleted, would_delete, max_delete_hit }
--substrate flag for per-kind cleanup
Current state
kkernel vector sweep returns:
Error: vector sweep for engine 'default' is not yet implemented. VectorStore::orphan_sweep() is not wired...
This is intentional — the fake orphans_deleted: 0 was removed by the codex r1 fix.
Required work
- Wire
cmd_vector_sweep through KhiveRuntime → VectorStore::orphan_sweep()
- Align output with
OrphanSweepResult from ADR-044 §1 (scanned, deleted, would_delete, max_delete_hit)
- Add
--substrate flag (ADR-044 CLI surface)
- Handle
Unsupported from SqliteVecStore with a clear user-facing message
- Tests: integration test with a real SQLite DB verifying the sweep counts orphaned rows
Labels
adr-alignment, follow-up, adr-044
Context
PR #371 (cluster-21) scaffolded
kkernel vector sweepbut deferred the actual backend integration.ADR-044 §5 specifies:
VectorStore::orphan_sweep(OrphanSweepConfig)called by the operator pathOrphanSweepResult { scanned, deleted, would_delete, max_delete_hit }--substrateflag for per-kind cleanupCurrent state
kkernel vector sweepreturns:This is intentional — the fake
orphans_deleted: 0was removed by the codex r1 fix.Required work
cmd_vector_sweepthroughKhiveRuntime→VectorStore::orphan_sweep()OrphanSweepResultfrom ADR-044 §1 (scanned,deleted,would_delete,max_delete_hit)--substrateflag (ADR-044 CLI surface)UnsupportedfromSqliteVecStorewith a clear user-facing messageLabels
adr-alignment, follow-up, adr-044