mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-15 11:57:12 +00:00
0aeda15c10
A class defined once but referenced via type annotations in N other files appeared as 1+N nodes — the extras carrying the referencing file's path (with extension) baked into the id (e.g. pkg_a_py_thing). ensure_named_node's cross-file fallback called add_node, which stamps the referencing file as source_file; that sourced stub then collided in _disambiguate_colliding_node_ids (baking the .py path into the id) and _rewire_unique_stub_nodes skipped it (a node with a source_file is treated as a real definition, not a stub). The fallback now emits a SOURCELESS stub (mirroring the inheritance-base path), so disambiguation ignores it and the rewire collapses it onto the canonical definition. The helper is duplicated across all six language extractors, so the fix is applied to all six. Genuinely-defined duplicates (same name, different files) still stay separate — only cross-file references collapse. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>