Context. MemGraphRAG centers a detect→resolve co-evolution loop. Fathom has no detection of mutually-exclusive / temporal / granularity conflicts. This issue adds the detection half as deterministic forward-chaining rules (resolution is tracked separately; see the epic). Related: #73 (conflict-resolution strategy configuration) — that is resolution-strategy config; this is rule-based detection.
Proposal. Ship a conflict-detection rule pack.
- Detection rules whose LHS matches two facts with the same
(head, relation) but tails enumerated in a mutual_exclusion template → assert a conflict fact.
- Temporal conflicts via existing
changed_within; granularity via a HierarchyDefinition lattice (models.py:333, ordered levels).
Where.
- New pack under
src/fathom/rule_packs/ with mutual_exclusion + conflict templates and detection rules.
Engine.subscribe :763 → FactManager.add_listener (facts.py:57) is for notifying an external agent that new facts arrived — NOT for running detection.
Critical correction (do NOT implement detection in a subscribe callback). assert_fact (facts.py:110) only validates+asserts and does not call evaluate(); subscribe callbacks fire synchronously inside the assert, so re-asserting a conflict from within a listener is re-entrant and fragile. Detection must be pure forward-chaining rules; the host calls evaluate() after asserts.
Acceptance criteria.
Risk. Semantic / near-duplicate detection needs embeddings fathom lacks — a pure-symbolic detector only catches exact / lattice / temporal conflicts (boundary doc tracks this).
Source: arXiv:2606.00610v1 — "MemGraphRAG: Memory-based Multi-Agent System for Graph Retrieval-Augmented Generation". Distilled from arXiv-research/2606.00610v1/analysis.md; file refs verified against current main by the analysis pass.
Context. MemGraphRAG centers a detect→resolve co-evolution loop. Fathom has no detection of mutually-exclusive / temporal / granularity conflicts. This issue adds the detection half as deterministic forward-chaining rules (resolution is tracked separately; see the epic). Related: #73 (conflict-resolution strategy configuration) — that is resolution-strategy config; this is rule-based detection.
Proposal. Ship a conflict-detection rule pack.
(head, relation)but tails enumerated in amutual_exclusiontemplate → assert aconflictfact.changed_within; granularity via aHierarchyDefinitionlattice (models.py:333, orderedlevels).Where.
src/fathom/rule_packs/withmutual_exclusion+conflicttemplates and detection rules.Engine.subscribe:763 →FactManager.add_listener(facts.py:57) is for notifying an external agent that new facts arrived — NOT for running detection.Critical correction (do NOT implement detection in a subscribe callback).
assert_fact(facts.py:110) only validates+asserts and does not callevaluate(); subscribe callbacks fire synchronously inside the assert, so re-asserting aconflictfrom within a listener is re-entrant and fragile. Detection must be pure forward-chaining rules; the host callsevaluate()after asserts.Acceptance criteria.
conflictfor same-(head,relation) divergent-tail facts listed inmutual_exclusion.Risk. Semantic / near-duplicate detection needs embeddings fathom lacks — a pure-symbolic detector only catches exact / lattice / temporal conflicts (boundary doc tracks this).
Source: arXiv:2606.00610v1 — "MemGraphRAG: Memory-based Multi-Agent System for Graph Retrieval-Augmented Generation". Distilled from
arXiv-research/2606.00610v1/analysis.md; file refs verified against currentmainby the analysis pass.