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
Node merge/dedup doesn't match a code entity to a planning-doc node describing the same file (different source_file) #3246
When a code file is both (a) AST-parsed directly and (b) described/referenced by
name in a semantic-extraction source (a markdown planning doc), the resulting two
nodes never merge — even after a full forced re-extract. They represent the same
underlying script but end up as two disconnected node identities in different
communities, which skews god-node / betweenness metrics.
Environment
OS: Windows
Invocation: /graphify slash command inside a claude (Claude Code) session
graphify version: <kör graphify --version och fyll i>
Repro
Corpus: a small repo containing
scripts/generate-testpilot-keys.mjs — a Node script (AST-parsed)
_PLANS/SLICE_2026-08-15_rotating-testpilot-keys.md — a markdown planning doc
that names and describes that exact script (semantic-extracted)
After extraction, graph.json contains two nodes for the same script:
No edge exists between these two node IDs anywhere in graph.json.
What I tried
/graphify . --force inside the IDE session (full re-extract, no cache reads) —
nodes still separate afterward, only the community labels changed.
graphify extract . --force from a plain terminal — fails with no LLM API key found, since the IDE-session model routing isn't available
outside /graphify. Didn't get to test --dedup-llm for the same reason
(would need a separate paid API key just to test).
Expected
The two nodes should either merge into one, or at minimum get an explicit references/describes edge between them, since they're the same script.
Suspected root cause
The merge/entity-resolution heuristic appears to key on exact source_file
match. When a semantic pass extracts an entity from a document that mentions
a code file, it seems to attribute source_file to the referring document
itself, not to the code file it's actually describing — so it never lines up
with the AST node's source_file and the "ghost duplicate" merge never fires.
This is a common pattern in doc-driven repos (a code file + a spec/plan doc
that names it), so it's likely not specific to this one corpus.
Activity