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]: graphify update false positive on semantic nodes deduplicated into canonical AST twins #4389
I have checked the Troubleshooting section in the README
What happened?
When updating an existing graph via graphify update ., build_from_json() dedupes semantic nodes that share (source_file, label) with a canonical AST node (per #1145 (extended): non-AST nodes sharing (source_file, label) with an AST node have their ghost IDs removed from the graph, and their edges are rewired to the canonical node).
However, the shrink guard _lost_saved_semantic_nodes(saved_nodes, new_nodes, deleted_sources) checks whether any saved semantic node is missing from new_nodes only by looking up node_id in new_ids and legacy stem renames (_renamed_present). Because the ghost ID was intentionally pruned during deduplication, _lost_saved_semantic_nodes() falsely classifies the deduplicated node as "lost".
The shrink guard then aborts the update with:
[graphify] WARNING: Refusing to overwrite — saved semantic node(s) are missing from the new graph: src/models/user.ts:User.
Nothing to update or rebuild failed
requiring --force even though no symbols were lost.
Steps to reproduce
Build a graph where a symbol has a semantic node (e.g. id: "src/models/user.ts:User", label: "User", source_file: "src/models/user.ts", _origin: "semantic").
Run graphify update . to perform an AST-only code rebuild.
The AST extractor emits the canonical AST node for User (_origin: "ast").
build_from_json() collapses the semantic ghost node into the AST canonical node.
_check_shrink() runs _lost_saved_semantic_nodes(), which reports src/models/user.ts:User as lost and aborts with exit code 1.
Error output or graph output
[graphify] WARNING: Refusing to overwrite — saved semantic node(s) are missing from the new graph: src/models/user.ts:User.
Nothing to update or rebuild failed
Activity
github-actions commentedon Oct 12, 2026
Thanks for opening this issue, @AndresDiagoM. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
test(build): cover AST-twin shrink-guard fix end to end; sync alias d…
test(build): cover AST-twin shrink-guard fix end to end; sync alias d…
safishamsi commentedon Oct 12, 2026
Fixed in v0.9.88 (
graphifyy 0.9.88on PyPI) via #4391.