Cross-file name resolution folded case for every language, so `from pathlib
import Path` resolved to a shell script's `export PATH=...` node — one variable
becoming the corpus's #1 god-node (266 false incoming edges on a real repo),
polluting god-node rankings, affected blast-radius, and clustering. Reported
with a precise diagnosis by @sheik-hiiobd.
Case is semantic in Python/Rust/Go/Java/C#/Kotlin/Swift/Ruby/C/C++/JS/TS: `Path`
(class), `PATH` (env var), `path` (variable) are distinct. Fix gates folding by
language at the two resolution sites the repro exercised:
- global cross-file CALL resolver: index by exact case; a folded index is built
only for case-insensitive-language nodes (PHP/SQL/Nim) and consulted only when
the calling file is such a language.
- type-reference STUB rewire (_rewire_unique_stub_nodes): match stubs to real
defs by exact case, with a folded fallback restricted to case-insensitive-
language definitions — so a case-sensitive `PATH` can never absorb a `Path`.
For case-sensitive languages this only ever removes false edges. Concept/doc
dedup (dedup.py, guarded to non-code nodes) is intentionally left folding.
Regression tests: Python `Path` no longer hits shell `PATH`; a case-differing
cross-file ref doesn't resolve; exact-case resolution still works; PHP fold
preserved. Full suite 2777.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>