Problem
symbols_referenced hardcodes kind: 'variable' for all imports (src/core.ts, line 86):
symbolsReferenced.push({ name, file: resolvedFile, kind: 'variable' });
But the actual symbol could be a function, type, interface, etc. The detection engine in symbolMatches() (src/graph/detect.ts, line 38-39) requires exact kind equality:
return stored.name === target.name && stored.file === target.file && stored.kind === target.kind;
So a reference to a function is stored as kind: 'variable' and never matches a deleted kind: 'function'.
Fix
In symbolMatches(), when comparing against symbols_referenced entries, match on name + file only, ignoring kind. References inherently don't know the kind at parse time.
Alternatively, look up the actual kind from the target file at store time — but that's more complex and slower.
Severity
This is a pre-existing bug that affects every import reference. The only reason existing tests pass is that the test fixtures use the same kind for both added and referenced symbols.
Problem
symbols_referencedhardcodeskind: 'variable'for all imports (src/core.ts, line 86):But the actual symbol could be a
function,type,interface, etc. The detection engine insymbolMatches()(src/graph/detect.ts, line 38-39) requires exact kind equality:So a reference to a function is stored as
kind: 'variable'and never matches a deletedkind: 'function'.Fix
In
symbolMatches(), when comparing againstsymbols_referencedentries, match onname + fileonly, ignoringkind. References inherently don't know the kind at parse time.Alternatively, look up the actual kind from the target file at store time — but that's more complex and slower.
Severity
This is a pre-existing bug that affects every import reference. The only reason existing tests pass is that the test fixtures use the same kind for both added and referenced symbols.