Skip to content

Rule pack: conflict detection (mutual_exclusion / temporal / granularity) over the fact layer #146

Description

@se-jo-ma

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.

  • Pack asserts conflict for same-(head,relation) divergent-tail facts listed in mutual_exclusion.
  • Temporal + granularity (HierarchyDefinition) conflict rules included.
  • No re-entrant subscribe-callback assertions; detection is host-evaluated.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priority: load-bearing gap or correctnessenhancementNew feature or requestrule-packRelated to OWASP/NIST/HIPAA/CMMC rule packssize/L<1 week: cross-cutting feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions