Files
codebase-memory-mcp/tests
Martin Vogel 51c57c4e0c fix(pipeline): refuse same_module for import-bound or builtin JS/TS receivers
Strategy 2 (same_module) looks a member callee up a second time without
its receiver, so `axios.get(url)` in a file that defines its own `get`
became a 0.90 CALLS edge to that local function. The weak-member guard
deliberately keeps same_module, so this class was unguarded (#1128).

Restore the registry strategy chain to main (review of 2026-10-19,
item 1): the chain also resolves type references, field types,
reads/writes, SQL lineage and the cross-LSP pass for every language,
and the chain-level restriction broke the C typed-field and Python
external-import pipeline tests. Instead add a call-site suppressor,
wired identically in pass_calls.c and pass_parallel.c with the language
list inside the helper: for the JS/TS family and the <script> hosts it
drops the plain-CALLS fall-through only when the receiver-dropping
lookup produced the hit AND the receiver is bound to an ES import or a
CommonJS require of the file, to an AMD dependency, or is a builtin
global of the JS runtime (console, Math, JSON, Object, process, ...).
Every other receiver keeps its edge: object-literal methods and
functions assigned onto an object are stored at module level, so
`context.push()` reaching the module's `push` is usually right. A
whole-callee hit (`search.init()` -> <module>.search.init) keeps the
receiver in the match and is never refused. Service and route edges are
unaffected.

Measured with a fresh full index, sequential and parallel identical,
runs repeatable: vuejs/core same_module CALLS 1309 -> 1304, NodeBB
1721 -> 1680, no other strategy moves and no edge is added; every one
of the 49 removed call sites was read against the source and is a wrong
edge. helm (Go) is byte-identical.

The contributor's registry cases move to the guard as positive and
negative controls; pipeline tests cover JS, TS, TSX, ArkTS, Vue,
Svelte, Astro and HTML plus CommonJS and AMD, sequential and parallel,
and fail on main for every language.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-10 20:01:46 +01:00
..
2026-10-11 16:57:48 +02:00