#5221·cognee

Contradiction detection triggers ladybug assertion (csr_node_group.cpp:434 UNREACHABLE_CODE) in add_edges

Author: noamsiegelCreated Sep 26, 2026Updated Sep 30, 2026

What happened

With CONTRADICTION_DETECTION=true, the contradiction step in cognify fails in the graph adapter with a ladybug assertion. It happened in 13 of about 20 remember batches of roughly 20 text documents each, while importing ~400 documents into one dataset.

Query execution failed: Assertion failed in file "/__w/ladybug/ladybug/src/storage/table/csr_node_group.cpp" on line 434: UNREACHABLE_CODE
Failed to add edges in batch: Assertion failed in file ".../csr_node_group.cpp" on line 434: UNREACHABLE_CODE
Contradiction detection skipped due to an error: ...

The traceback goes through tasks/graph/detect_contradictions.py:235 into infrastructure/databases/graph/ladybug/adapter.py:2122 add_edges and adapter.py:735 query.

The pipeline itself reports completed and the contradiction edges are dropped. Because an assertion fires inside the storage layer, I turned the feature off rather than risk graph integrity.

Environment

  • cognee/cognee:1.6.1 Docker image (arm64), default graph provider (ladybug), LanceDB, SQLite
  • ENABLE_BACKEND_ACCESS_CONTROL=true, CACHING=true
  • Writes via POST /api/v1/remember, one request at a time (run_in_background=false, self_improvement=false), 20 files per request, all into one dataset

Also observed

Most detected contradictions were entity-type conflicts rather than factual ones, for example 'qm is a person' contradicts 'qm is a feature' at confidence 1.00. There were 307 of these across the import.