Skip to content

fix(memory): reject relations with missing entities#4458

Open
gingerninja85 wants to merge 1 commit into
modelcontextprotocol:mainfrom
gingerninja85:fix/memory-reject-dangling-relations
Open

fix(memory): reject relations with missing entities#4458
gingerninja85 wants to merge 1 commit into
modelcontextprotocol:mainfrom
gingerninja85:fix/memory-reject-dangling-relations

Conversation

@gingerninja85

Copy link
Copy Markdown

Summary

  • validate that both endpoints exist before creating memory graph relations
  • reject missing from or to entities with the same error style used by addObservations
  • add regression tests that ensure dangling relations are not persisted

Fixes #4457

Test Plan

  • cd src/memory && npm test
  • cd src/memory && npm run build

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.

memory: create_relations accepts relations to non-existent entities (dangling relations, silent graph corruption)

1 participant