GitNexus/gitnexus/test/unit/lbug
samuel mbabhazi f4ee515a6f
feat(lbug): report every undeclared relation pair in one failure (#3803)
* feat(lbug): report every undeclared relation pair in one failure

An edge whose FROM→TO label pair is missing from the relation DDL aborted
the emit at the first one, so N missing pairs took N runs to find (#2793
needed four reproduction repos). checkDeclaredPair now records the pair in
an UndeclaredPairCollector and the caller skips the edge; RelPairRouter.close,
GraphEmitSink.finalize and PdgEmitSink.finalize throw one
UndeclaredRelationPairError listing every pair with its first edge and edge
count. One pair keeps the existing message. The CLI adds labelPairs.

This also makes the --pdg path fail at all: PdgEmitSink.addRelationship threw
inside the PDG emit loop's per-file try/catch, which only warns, so an
undeclared PDG pair cost that file's CFG and the run still succeeded.

The docblock now gives graph completeness as the reason to fail rather than
degrade, and notes that the argument is relation-type-scoped.

Closes #2797

* fix: clarify repeated-pair ignore guidance

Keep the first edge as each pair’s example, but warn that other files
may need exclusion when the pair occurs more than once.

Refs #3803

---------

Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
2026-11-03 12:14:15 +00:00
..
graph-emit-sink.test.ts feat(lbug): report every undeclared relation pair in one failure (#3803) 2026-11-03 12:14:15 +00:00
pdg-emit-sink.test.ts feat(lbug): report every undeclared relation pair in one failure (#3803) 2026-11-03 12:14:15 +00:00