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.
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
Acceptance
OpenClaw repair completes on the installed release; embedding rows and counts are unchanged; two semantic MCP queries return vector-index with partial=false.