The ContradictionDetector in server/contradiction.py (LLM judges keep-old / keep-new / merge) is instantiated in server.py (contradiction_detector = ContradictionDetector(...)) but the /add route never calls it. Today the only fact resolution is mem0 built-in.
Wire it behind a config flag (default off so behavior does not change silently): when on, /add runs check_and_handle before storing and acts on the decision (store / skip / merge). Add a test with a mocked detector.
Acceptance: with the flag on, adding a contradicting fact supersedes or merges the old one; with it off, behavior is unchanged; covered by a test.
The
ContradictionDetectorinserver/contradiction.py(LLM judges keep-old / keep-new / merge) is instantiated inserver.py(contradiction_detector = ContradictionDetector(...)) but the/addroute never calls it. Today the only fact resolution is mem0 built-in.Wire it behind a config flag (default off so behavior does not change silently): when on,
/addrunscheck_and_handlebefore storing and acts on the decision (store / skip / merge). Add a test with a mocked detector.Acceptance: with the flag on, adding a contradicting fact supersedes or merges the old one; with it off, behavior is unchanged; covered by a test.