Skip to content

[c21 follow-up] vector sweep: backend orphan-sweep impl (ADR-044) #381

@ohdearquant

Description

@ohdearquant

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

  1. Wire cmd_vector_sweep through KhiveRuntimeVectorStore::orphan_sweep()
  2. Align output with OrphanSweepResult from ADR-044 §1 (scanned, deleted, would_delete, max_delete_hit)
  3. Add --substrate flag (ADR-044 CLI surface)
  4. Handle Unsupported from SqliteVecStore with a clear user-facing message
  5. Tests: integration test with a real SQLite DB verifying the sweep counts orphaned rows

Labels

adr-alignment, follow-up, adr-044

Metadata

Metadata

Assignees

No one assigned

    Labels

    adr-alignmentADR v1 series alignment work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions