Problem
The runPostNativePrototypeMethods post-pass in native-orchestrator.ts pre-filters files to only those that match the func-prop regex (fn.method = function(){} or arrow form). This means the WASM re-parse only covers definition files.
A file that only calls f.method() without also defining any \w+.\w+ = function pattern is absent from wasmResults and its call edges to newly-inserted func-prop nodes are never emitted.
Concrete example:
lib.js defines f.method = function(){} → f.method node is inserted
app.js only calls f.method() → this edge is silently dropped
The comment at the top of the loop says "Resolve call edges in every file — not just those that define new func-prop methods", which contradicts the implementation.
Fix options
- Extend the WASM parse to include ALL JS/TS files (higher cost but correct)
- After inserting new nodes, query the DB for raw call sites that match the receiver name/method name pattern of newly-inserted nodes (DB-based, no re-parse needed)
Impact
Low-frequency in practice: most codebases that use fn.method = function(){} tend to define and call in the same file or module. But multi-file patterns are a legitimate use case.
Context
Identified in Greptile review of PR #1331, comment #1331 (comment)
Problem
The
runPostNativePrototypeMethodspost-pass innative-orchestrator.tspre-filters files to only those that match the func-prop regex (fn.method = function(){}or arrow form). This means the WASM re-parse only covers definition files.A file that only calls
f.method()without also defining any\w+.\w+ = functionpattern is absent fromwasmResultsand its call edges to newly-inserted func-prop nodes are never emitted.Concrete example:
lib.jsdefinesf.method = function(){}→ f.method node is insertedapp.jsonly callsf.method()→ this edge is silently droppedThe comment at the top of the loop says "Resolve call edges in every file — not just those that define new func-prop methods", which contradicts the implementation.
Fix options
Impact
Low-frequency in practice: most codebases that use
fn.method = function(){}tend to define and call in the same file or module. But multi-file patterns are a legitimate use case.Context
Identified in Greptile review of PR #1331, comment #1331 (comment)