Found during calibration iteration-4 diagnosis (evidence: .khive/workspaces/20260610/recall-calibration/memo.md §Iteration 4).
The comment at crates/khive-db/src/stores/vectors.rs:400-402 claims namespace/embedding_model filters are "pushed into the MATCH predicate." The actual SQL at lines 408-416 applies them as WHERE post-filters alongside MATCH — sqlite-vec computes GLOBAL ANN top-k first, then post-filters. With local namespace at 9.2% of vec entries (10,055/109,232), a global top-k can starve the local result set.
Status: latent — this is the FALLBACK path (triggered on ANN Err only); the production ANN path was active for all calibration specimens and is CLEARED. Prior record of a related concern at vectors.rs:414 (KNN IN-subquery non-monotonicity).
Fix: push filters into the vec query properly (partition key or pre-filtered rowid set with k-overfetch), make the comment true, add a starvation regression test (sparse namespace + adversarial global corpus). Not urgent; should ride with the next khive-db stores pass.
Found during calibration iteration-4 diagnosis (evidence:
.khive/workspaces/20260610/recall-calibration/memo.md§Iteration 4).The comment at
crates/khive-db/src/stores/vectors.rs:400-402claims namespace/embedding_model filters are "pushed into the MATCH predicate." The actual SQL at lines 408-416 applies them asWHEREpost-filters alongsideMATCH— sqlite-vec computes GLOBAL ANN top-k first, then post-filters. With local namespace at 9.2% of vec entries (10,055/109,232), a global top-k can starve the local result set.Status: latent — this is the FALLBACK path (triggered on ANN
Erronly); the production ANN path was active for all calibration specimens and is CLEARED. Prior record of a related concern at vectors.rs:414 (KNN IN-subquery non-monotonicity).Fix: push filters into the vec query properly (partition key or pre-filtered rowid set with k-overfetch), make the comment true, add a starvation regression test (sparse namespace + adversarial global corpus). Not urgent; should ride with the next khive-db stores pass.