You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] graph.json contains edges to undeclared nodes, so loaders materialise attribute-less phantom nodes (and merge-graphs fragments external modules per repo) #2873
graph.json contains edges whose endpoints are not in the nodes array. Every consumer that builds a graph from the file, including networkx, materialises those endpoints as nodes with no attributes, so the node set the file declares and the node set the file produces disagree.
Type and Community are blank because there is no node record to read them from, and graphify path will route through these endpoints as though they were ordinary nodes.
The cross-repo consequence
merge-graphs has to paper over this, and the way it does creates a second problem. Merging two repositories that both import typing and pathlib:
So the same standard-library module becomes four distinct nodes across two repositories, and a merged graph cannot answer "which repos depend on typing", which is the question a cross-repo merge exists to answer. Namespacing is right for repo-local ids; these are not repo-local, they are external identifiers that happen to have arrived through a repo-local path.
What I am not claiming
Not emitting nodes for external modules may well be deliberate, to keep the graph to code you own. If so, the issue is the edges rather than the missing nodes: an edge to a node that does not exist is not a neutral encoding of "this import goes outside the graph", because no consumer can distinguish it from a node the extractor forgot to write.
Checked and clean, for what it is worth
Two things I expected to find and did not, both worth recording:
Builds are deterministic. Two independent runs over the same tree produced identical node ids in identical order, identical edges in identical order, and identical top-level keys. The local-deterministic-parsing claim holds.
merge-graphs does not collide repo-local ids. Two unrelated repositories that both contain src/app/engine.py produce the same bare id src_app_engine, and the merge correctly namespaces them to repoA:: / repoB:: while preserving local_id and repo. 7 nodes in, 7 nodes out, nothing silently unified.
diagnose multigraph works. It found the same 8 same-endpoint edge pairs my own check did, including the imports_from / re_exports pairs on __init__.py.
Working on this on fix/2873-dangling-edge-endpoints. Turned out to be two parts: the extractor needed to mint stub nodes for edge endpoints it never declares (stdlib/third-party imports), and merge-graphs needed to leave those specifically unnamespaced so they unify across repos instead of fragmenting into repoA::typing/repoB::typing. Also caught a related clobbering bug in the merge step along the way. PR coming once tests are green.
Fixed in v0.9.63 (on PyPI): every graph.json edge endpoint is now a declared node — an import to an external module mints a typed external stub instead of a dangling endpoint, and a cross-repo merge unifies the same module into one global node. Thanks @AromalBiju1 for the detailed report and the fix attempt in #2878.
Activity
AromalBiju1 commentedon Aug 19, 2026
Working on this on fix/2873-dangling-edge-endpoints. Turned out to be two parts: the extractor needed to mint stub nodes for edge endpoints it never declares (stdlib/third-party imports), and merge-graphs needed to leave those specifically unnamespaced so they unify across repos instead of fragmenting into repoA::typing/repoB::typing. Also caught a related clobbering bug in the merge step along the way. PR coming once tests are green.
fix: prune_repo_from_graph now correctly handles multi-repo external …
fix(build): mint typed external stubs for undeclared import endpoints (…
safishamsi commentedon Sep 16, 2026
Fixed in v0.9.63 (on PyPI): every
graph.jsonedge endpoint is now a declared node — an import to an external module mints a typed external stub instead of a dangling endpoint, and a cross-repo merge unifies the same module into one global node. Thanks @AromalBiju1 for the detailed report and the fix attempt in #2878.fix(godot): land edges into a same-stem scene/script pair on the righ…
fix(cache): treat an AST hit whose import target is gone as a miss
fix(watch): drop an external import stub once no edge references it
fix(build): give --no-cluster graph.json the same endpoint rules as b…
fix(build): sweep source-less placeholders orphaned by re-extraction (#…
fix(build): resolve a raw graph's import endpoints through the alias …
chore: [HIMMEL-7394] sync to upstream 0.9.95 and carry the himmel del…
test(merge-graphs): cover the unified-external-nodes report line
merge-graphs: report unified external nodes instead of a silent drop
test(merge-graphs): cover the unified-external-nodes report line