fix(memory): pass provider to EntityResolver in extract_and_store#1836
Merged
fix(memory): pass provider to EntityResolver in extract_and_store#1836
Conversation
) EntityResolver was built with .with_embedding_store() but without .with_provider(), so store_entity_embedding() never called embed() and qdrant_point_id remained NULL in SQLite, leaving zeph_graph_entities collection empty. Add .with_provider(&provider) to the EntityResolver builder when an embedding_store is present. provider.clone() is added before passing it to GraphExtractor so ownership can be retained for the resolver. Add two regression tests covering both the fixed path (embedding stored, qdrant_point_id set) and the no-embedding-store path (entities upserted, qdrant_point_id None).
9304813 to
d08b5eb
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.
Summary
EntityResolverinextract_and_store()was constructed with.with_embedding_store()but without.with_provider(), sostore_entity_embedding()never calledembed()andqdrant_point_idremainedNULLin SQLite — leavingzeph_graph_entitiescollection permanently empty.with_provider(&provider)to theEntityResolverbuilder whenembedding_storeis present; addprovider.clone()before passing toGraphExtractorto retain ownershipqdrant_point_idis set when both provider and embedding_store are supplied, one verifying the no-embedding-store path is unaffectedFixes #1829.
Test plan
cargo +nightly fmt --check— passescargo clippy --workspace --features full -- -D warnings— passes (0 warnings)cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins— 5795 passed, 12 skippedextract_and_store_sets_qdrant_point_id_when_embedding_store_providedassertsqdrant_point_id.is_some()after extractionextract_and_store_without_embedding_store_still_upserts_entitiesassertsqdrant_point_id.is_none()when no embedding_store passed