100%

Hybrid edge provenance arbitration (scip > rust-analyzer-scip > tree-sitter)

Goal

Make provenance arbitration the load-bearing correctness boundary — compiler-precise edges supersede name-matched fallback for indexed languages, not left to prose.

Implementation Sketch

  • Provenance is a canonical tag on every CALLS edge (carried in row.props through the import_code_graph.py:327 edge-MERGE helper).
  • Precedence scip > rust-analyzer-scip > tree-sitter: for ori/rust, the tree-sitter name-matched pass (the current intel_repo/neo4j/extract_symbols.py CALLS/IMPORTS/IMPLEMENTS path at :611) must be suppressed for files an indexer covers, so duplicate-across-provenance == 0.
  • The arbitration runs at import time: an index.scip-covered file’s CALLS edges come ONLY from the SCIP importer; tree-sitter CALLS are emitted only for languages with no indexer.

Spec References

Edge-provenance arbitration contract (precedence + no-co-emit rule). intel_repo extractor CALLS path: extract_symbols.py CALLS/IMPORTS/IMPLEMENTS capture family.

Work Items

  • Tag every CALLS edge with provenance (scip | rust-analyzer-scip | tree-sitter) and arbitrate: where an indexer exists (ori, rust) the compiler-resolved edge wins outright and the name-matched tree-sitter edge MUST NOT be co-emitted; tree-sitter provenance stays nonzero only for non-indexer languages.

Test Coverage

  • L12 Production entry point — COVERED: both criteria assert the real-import provenance counts. L1..L11 N/A: Python/Neo4j import-layer arbitration, no Ori compiler pipeline layer applies; intel_repo pytest is the gate.