Truth Management
Fact Supersession
Fact supersession marks older conflicting facts as invalid so latest truth wins.
Current fact slots
Facts are grouped by logical key (for example `preferred_drink`). The current slot points to the newest valid memory ID for that key and entity.
Historical facts are preserved in history tables for audits, but invalidated facts are excluded from normal retrieval results.
Update behavior
- Extract normalized fact key/value pair.
- Lookup current fact slot by entity+key.
- Insert new fact as current slot entry.
- Mark prior current fact as invalidated with superseded-by reference.
- Append both records to fact history.
Example
t1: preferred_drink = coffee -> current
t2: preferred_drink = tea -> becomes current
coffee fact marked invalidated(superseded_by=t2)