Version
codebase-memory-mcp 0.9.0
Platform
Linux (x64)
Install channel
GitHub release archive / install.sh / install.ps1
Binary variant
ui
What happened, and what did you expect?
trace_path(mode=calls, direction=inbound) (and mode=data_flow, which inherits the same CALLS edges) returns an empty callers list for a function that IS called from another file, when the call site uses the simplest possible import shape: a plain from module import func (no alias, no as) followed by a bare, no-suffix call func(x). Confirmed via get_code_snippet(..., include_neighbors=true) too — the node itself reports "callers": 0.
Reproduced on a real ~240k-node Django monorepo with two independent, unrelated function pairs (different source/target modules each time), so it doesn't look like an isolated fluke. Reindexed from scratch (deleted the cached .db, full re-parse, node/edge counts changed confirming a genuine rebuild) — the gap persisted, so it's not a stale-index artifact.
Reproduction
Minimal repro
pkg/callee.py:
def target_fn(x):
return x + 1
pkg/caller.py:
from pkg.callee import target_fn
def wrapper(x):
return target_fn(x)
Steps
1. index_repository(repo_path=..., mode="full")
2. trace_path(function_name="target_fn", direction="inbound", mode="calls")
Expected: callers: [{"name": "wrapper", ...}]
Actual: callers: []
Why this doesn't look like the known issues
Checked #1000 (closed, "import-map direct-hit swallows call suffixes — django loses ~11K CALLS/TESTS edges") — that bug is about imported_symbol.method() calls where a suffix (.method) gets swallowed and mis-resolves to the base node. This repro has no suffix at all — target_fn is called directly, not as an attribute of anything. The issue's own description says the no-alias/no-suffix case (their "bare_alias" test) stays green both before and after the #1000 fix, and the registry suite is 56/56 — so this looks like a distinct, uncovered gap in resolve_import_map (or wherever plain same-name bare imports get resolved), not a regression of #979/#875/#1000.
Impact: any "who calls X" / dead-code / impact-analysis query silently under-reports calleron import style, with no warning that the result may be incomplete.
### Logs
```text
Diagnostics trajectory (memory / performance / leak issues)
Project scale (if relevant)
No response
Confirmations
- I searched existing issues and this is not a duplicate.
- My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.
Version
codebase-memory-mcp 0.9.0
Platform
Linux (x64)
Install channel
GitHub release archive / install.sh / install.ps1
Binary variant
ui
What happened, and what did you expect?
trace_path(mode=calls, direction=inbound) (and mode=data_flow, which inherits the same CALLS edges) returns an empty callers list for a function that IS called from another file, when the call site uses the simplest possible import shape: a plain from module import func (no alias, no as) followed by a bare, no-suffix call func(x). Confirmed via get_code_snippet(..., include_neighbors=true) too — the node itself reports "callers": 0.
Reproduced on a real ~240k-node Django monorepo with two independent, unrelated function pairs (different source/target modules each time), so it doesn't look like an isolated fluke. Reindexed from scratch (deleted the cached .db, full re-parse, node/edge counts changed confirming a genuine rebuild) — the gap persisted, so it's not a stale-index artifact.
Reproduction
Minimal repro
pkg/callee.py:
Diagnostics trajectory (memory / performance / leak issues)
Project scale (if relevant)
No response
Confirmations