Repository navigation
fix: discard stale raw vectors when overwriting snapshots - #87
Merged
Merged
Conversation
Pringled
requested changes
Nov 27, 2026
Contributor
Author
|
Updated as requested: remove the entire library-owned |
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Member
|
@N7766 thanks for making the changes, LGTM |
Pringled
approved these changes
Nov 27, 2026
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.
Fixes #86.
Overwriting a snapshot saved with
store_vectors=Trueusing an instance withstore_vectors=Falsecurrently leaves the old raw vectors attached to the new items. Remove the library-ownedstore/directory when the new instance has no vector store. The original load check and overwrite documentation remain unchanged.Following review, regression coverage is one test in
tests/test_vicinity.py: save stored vectors, overwrite without them, reload, and verify current items/query results with raw-vector access unavailable.Validation (Python 3.11.13, NumPy 2.0.2):
2fd706dbecause the old vector store is loaded; passes with this fix.pytest tests/test_vicinity.py -k 'BASIC or overwrite_without_vector_store' -q: 16 passed.tests/test_utils.py: 6 passed.git diff --check: passed.The full multi-backend suite and upstream CI were not run locally. Tests use local synthetic arrays; no model or embedding service was called. Prepared with Codex assistance.