Skip to content

[P0] Repair HNSW without rebuilding embeddings and report zero embeddings truthfully #170

Description

@100yenadmin

Parent: #130

Goal

Add a fail-closed analyze --repair-vector maintenance mode that preserves every CodeEmbedding row, rebuilds only HNSW, validates vector search through the live eight-connection pool, then reconciles database-derived metadata and registry counts.

Required behavior

  • Refuse unsafe storage, locks, recovery state, dirty metadata, conflicting flags, or missing VECTOR support before mutation.
  • Preserve all embedding rows and exact identities.
  • Return not-indexed without mutation when the database contains zero embeddings.
  • Make registry doctor report zero embeddings as not-indexed rather than a broken vector index.
  • Validate missing, healthy, unqueryable, zero-embedding, extension-unavailable, recovery-state, and failed-rebuild paths.

Acceptance

OpenClaw repair completes on the installed release; embedding rows and counts are unchanged; two semantic MCP queries return vector-index with partial=false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Release-blocking priority zero workevidence-gateMust close with retained validation evidence

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions