Skip to content

fix(memory): pass provider to EntityResolver in extract_and_store#1836

Merged
bug-ops merged 1 commit intomainfrom
1829-entity-embeddings-never-stored
Mar 15, 2026
Merged

fix(memory): pass provider to EntityResolver in extract_and_store#1836
bug-ops merged 1 commit intomainfrom
1829-entity-embeddings-never-stored

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 15, 2026

Summary

  • EntityResolver in extract_and_store() was constructed 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 permanently empty
  • Fix: add .with_provider(&provider) to the EntityResolver builder when embedding_store is present; add provider.clone() before passing to GraphExtractor to retain ownership
  • Two regression tests added: one verifying qdrant_point_id is set when both provider and embedding_store are supplied, one verifying the no-embedding-store path is unaffected

Fixes #1829.

Test plan

  • cargo +nightly fmt --check — passes
  • cargo 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 skipped
  • New test extract_and_store_sets_qdrant_point_id_when_embedding_store_provided asserts qdrant_point_id.is_some() after extraction
  • New test extract_and_store_without_embedding_store_still_upserts_entities asserts qdrant_point_id.is_none() when no embedding_store passed

@github-actions github-actions bot added documentation Improvements or additions to documentation bug Something isn't working memory zeph-memory crate (SQLite) rust Rust code changes size/M Medium PR (51-200 lines) labels Mar 15, 2026
)

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).
@bug-ops bug-ops force-pushed the 1829-entity-embeddings-never-stored branch from 9304813 to d08b5eb Compare March 15, 2026 15:39
@bug-ops bug-ops enabled auto-merge (squash) March 15, 2026 15:39
@bug-ops bug-ops merged commit f67bfb0 into main Mar 15, 2026
15 checks passed
@bug-ops bug-ops deleted the 1829-entity-embeddings-never-stored branch March 15, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(memory): entity embeddings never stored in Qdrant — EntityResolver built without provider in extract_and_store

1 participant