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
JS/TS extractor: instance-method calls (this.x.y() / obj.method()) never produce calls/indirect_call edges to the method node #2023
In a JavaScript/Electron codebase, method nodes (labels like .searchHybrid())
only ever receive a method edge from their defining class. Call sites that
invoke the method through an instance (this.vectorStore.searchHybrid(...), store.searchHybrid(...)) generate no calls or indirect_call edge to the
method node, so reverse queries ("what calls searchHybrid") return nothing even
when real callers exist.
Repo: Electron app, CommonJS require, ~23k nodes / ~47k links after graphify . --update --code-only
Reproduction
Graph built at current HEAD. desktop/src/main/ai/VectorStore.js defines
class VectorStore with method searchHybrid. Real call sites exist, e.g. desktop/src/swarms/agentTools.js:
node desktop_src_main_ai_vectorstore_vectorstore_searchhybrid label ".searchHybrid()"
incoming edges: [ method: VectorStore ] <-- only the class edge
No calls/indirect_call edge from agentTools.js (or any other caller)
targets the method node. By contrast, plain cross-file function calls resolve
fine (e.g. startServer() → connectDatabase() gets a calls edge).
Same-file indirect_call edges do exist for some dynamic patterns, so the
extractor clearly emits the relation type — it just never links
instance-method invocations to the .method() node.
Expected
An indirect_call (even low-confidence) edge from the calling
function/method node to the best-matching .method() node — e.g. matched by
method name, optionally disambiguated by the receiver's inferred type or
import graph. Even a name-only heuristic with a low confidence_score would
make "what calls X" queries useful for methods, which in an OO codebase is
most of the interesting call graph.
Why it matters
Downstream consumers answering "what calls X" from the graph must silently
fall back to text/vector search whenever X is a method, which is the common
case in class-based codebases.
Activity