mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-19 05:47:48 +00:00
6509d0ca6f
Two files that both import and use the same type as a bare name (e.g. `from pathlib import Path` used as a type hint in a.py and b.py) collapsed into one node, even with no project definition to anchor them. The referencing file is now recorded in an internal `origin_file` field and used as the disambiguation key when _disambiguate_colliding_node_ids splits same-id nodes — while source_file stays empty, so the corpus-level rewire still collapses these stubs onto a real project definition when one exists (the #1402 path is untouched). origin_file is read only inside disambiguation; the rewire and the Java/C# type resolvers key off source_file as before. Ported from PR #1479 by @jiangyq9 (squash-merged onto current v8; the branch's stale base made the raw diff appear to revert later features — the 3-way merge applies only the surgical origin_file change). Resolved a test-adjacency conflict with #1500 by keeping both cross-file tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>