Describe the bug
Fact, Topic and NamedEntity all derive their key as hash(value) with no type discriminator (internal/graph/entity.go:36-98). remember 'billing' topic:billing gives the fact and the topic the same key, so the topic id resolves to the fact's own node and the IsAbout edge becomes self-referential.
To Reproduce
- POST {"query": "remember 'billing' topic:billing"}.
- Inspect the graph: one node where two (fact + topic) should exist; the relationship references it circularly.
Expected behavior
Node identity is (type, value) — e.g. domain-separate the hash with a type byte.
Screenshots
N/A
Additional context
Cheap to fix now; becomes a data-migration hazard the moment persistence lands. Also inflates cross-type dedupe in subtle ways (any fact whose full text equals an entity name collides with it).
Describe the bug
Fact, Topic and NamedEntity all derive their key as hash(value) with no type discriminator (internal/graph/entity.go:36-98). remember 'billing' topic:billing gives the fact and the topic the same key, so the topic id resolves to the fact's own node and the IsAbout edge becomes self-referential.
To Reproduce
Expected behavior
Node identity is (type, value) — e.g. domain-separate the hash with a type byte.
Screenshots
N/A
Additional context
Cheap to fix now; becomes a data-migration hazard the moment persistence lands. Also inflates cross-type dedupe in subtle ways (any fact whose full text equals an entity name collides with it).