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

  1. Extract normalized fact key/value pair.
  2. Lookup current fact slot by entity+key.
  3. Insert new fact as current slot entry.
  4. Mark prior current fact as invalidated with superseded-by reference.
  5. Append both records to fact history.

Example

Preference change
t1: preferred_drink = coffee   -> current

t2: preferred_drink = tea      -> becomes current
    coffee fact marked invalidated(superseded_by=t2)