Files
codebase-memory-mcp/internal
Andrew Hundt d3c5530a3f fix(rust): keep cfg call edges module-local
Rust cfg-gated definitions append predicate text to qualified names, but cbm_registry_add at src/pipeline/registry.c:495 indexed the suffixed tail instead of the supplied source name. Local twins therefore disappeared from has_permission lookup and an unrelated cross-module symbol became a false unique_name target.

Add cbm_rust_cfg_qualified_name at internal/cbm/extract_defs.c:1912 and use it from both definition extraction and compute_func_qn at internal/cbm/extract_unified.c:442. The helper scans only adjacent Rust attribute spans, allocates no duplicate decorator array, and makes call-source QNs match cfg-qualified Function nodes instead of falling back to File nodes. Index registry candidates by the supplied semantic name while retaining exact QNs as identities.

Guard the resolver collision in tests/test_registry.c:891 and cfg caller identity in tests/repro/repro_issue495.c:212. Verified with ASan/UBSan: registry 60/60, extraction 276/276, parallel 36/36, incremental 162/162 with 15,328-node and 89,030-edge incremental/full parity; scripts/check-source-safety.sh passed.

Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
2026-07-16 04:52:38 -04:00
..