Skip to content

Add memory graph enrichment#33

Merged
brianmeyer merged 1 commit into
masterfrom
codex/rec-76-memory-graph-enrichment
May 17, 2026
Merged

Add memory graph enrichment#33
brianmeyer merged 1 commit into
masterfrom
codex/rec-76-memory-graph-enrichment

Conversation

@brianmeyer
Copy link
Copy Markdown
Owner

Summary

  • Add deterministic entity/relation extraction for indexed memory evidence
  • Persist graph side tables in LanceDB and clear stale graph rows on memory updates/deletes
  • Expose memory_graph_entities and memory_graph_related MCP tools with docs and tests

Validation

  • python3 -m pytest -q
  • bash tests/uat/test_mcp_server.sh
  • python3 -m compileall -q src tests
  • .venv/bin/python -m pip wheel . -w /tmp/recallforge-wheel-rec76
  • PYTHONPATH=/tmp/recallforge-twine python3 -m twine check /tmp/recallforge-wheel-rec76/recallforge-0.3.0-py3-none-any.whl

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@brianmeyer brianmeyer merged commit cf3c007 into master May 17, 2026
7 of 8 checks passed
@brianmeyer brianmeyer deleted the codex/rec-76-memory-graph-enrichment branch May 17, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant