fix(sqlite): batch vector completeness checks - #1640
Merged
Teingi merged 1 commit intoSep 18, 2026
Merged
Conversation
notepix
force-pushed
the
fix/sqlite-vector-completeness-n-plus-one
branch
from
September 17, 2026 16:22
297180d to
3fe8d7b
Compare
Teingi
reviewed
Sep 17, 2026
notepix
force-pushed
the
fix/sqlite-vector-completeness-n-plus-one
branch
from
September 17, 2026 18:02
3fe8d7b to
a86e178
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue or RFC does this PR close?
Closes #1631
Rationale for this change
SQLite Vector search performed N+1 physical-vector probes during completeness validation. The validation runs once while selecting the search mode and again immediately before SQLite vector search, causing SQL statement count to grow with the number of active Memory Entries.
What changes are included in this PR?
SQLiteMemoryVectorIndex.vector_complete()with a set-based SQLite query.Are there any user-facing changes?
No API, configuration, or persisted-schema changes.
SQLite Vector search uses fewer database round trips for Memories with many active Entries.
How was this change tested?
make check— passed.uv run python -m pytest tests/e2e/test_sqlite_vec.py -q— 8 passed.make unit-test— known failures were reproduced on clean6ffc5263master: 49 failed, 135 passed, 1 skipped.make e2e-test— known failures were reproduced on clean6ffc5263master: 15 failed, 13 passed.AI usage statement
OpenAI Codex (GPT-5.6 sol) assisted with regression-test design, reviewed the generated changes and PR content.