Add memory graph enrichment#33
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 43f30bafd6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self._embeddings_table.delete(_safe_filter("hash_seq", hash_seq)) | ||
| except Exception as e: | ||
| logger.debug(f"insert_embedding: no existing embedding to delete for {hash_seq}: {e}") | ||
| self.delete_graph_entries(hash_seq=hash_seq) |
There was a problem hiding this comment.
Scope graph-row deletion to the current memory
Deleting graph rows by hash_seq alone removes entity/relation rows for all memories that contain the same chunk text (hash_seq is derived from content_hash + seq, not path/namespace). When a second memory with identical chunk content is indexed, this call can erase the first memory’s graph evidence, so memory_graph_entities/memory_graph_related will silently lose valid links for the earlier memory. Include the current collection/path (and namespace fields) in this delete to avoid cross-memory data loss.
Useful? React with 👍 / 👎.
Summary
memory_graph_entitiesandmemory_graph_relatedMCP tools with docs and testsValidation