Version: v0.8.1 (linux-amd64)
Summary
get_architecture reports a hotspot fan_in that does not match the node's real in-degree in the graph. For short identifiers shared across languages (e.g. commit, parse, add), the reported fan_in appears to aggregate by bare name rather than by resolved node — producing large over-counts, and attributing the count to a node that actually has in-degree 0.
Environment
- Mixed Python + TypeScript/JavaScript monorepo, indexed with
mode: full.
- Two distinct symbols named
commit: a JS arrow function commit (defined in a React page component) and a Python method Store.commit.
Observed
get_architecture →
hotspots: [{ name: "commit", qualified_name: "…/web/src/pages/Editor.commit", fan_in: 234 }, …]
But that JS commit has one local call-site, and querying the graph directly shows it has zero inbound edges:
query_graph: MATCH (n {name:'commit'})<-[r]-(c)
RETURN n.qualified_name, count(r)
→ only the Python Store.commit, in_degree 20.
The JS Editor.commit node returns nothing (in_degree 0).
So fan_in: 234 is not reproducible from CALLS/USAGE edges.
Hotspots whose names are class-qualified Python methods matched their real in-degree correctly (a function reported with fan_in: 46 had graph in_degree 46), so the inflation is specific to short bare names shared across the Python/JS boundary.
Expected
Hotspot fan_in should equal the node's resolved inbound CALLS/USAGE in-degree (the value query_graph / search_code already report per node), not a count aggregated by bare name.
Impact
get_architecture is the first-call "understand this codebase" tool; an inflated headline metric on the wrong node is misleading. The qualitative structure (clusters, layers, routes, languages) is accurate — only the hotspot fan_in figures are affected.
Possibly related to #558 (Class in_degree/out_degree = 0) — both are node-level degree-metric correctness issues.
Version: v0.8.1 (linux-amd64)
Summary
get_architecturereports a hotspotfan_inthat does not match the node's real in-degree in the graph. For short identifiers shared across languages (e.g.commit,parse,add), the reportedfan_inappears to aggregate by bare name rather than by resolved node — producing large over-counts, and attributing the count to a node that actually has in-degree 0.Environment
mode: full.commit: a JS arrow functioncommit(defined in a React page component) and a Python methodStore.commit.Observed
get_architecture→But that JS
commithas one local call-site, and querying the graph directly shows it has zero inbound edges:So
fan_in: 234is not reproducible from CALLS/USAGE edges.Hotspots whose names are class-qualified Python methods matched their real in-degree correctly (a function reported with
fan_in: 46had graph in_degree 46), so the inflation is specific to short bare names shared across the Python/JS boundary.Expected
Hotspot
fan_inshould equal the node's resolved inbound CALLS/USAGE in-degree (the valuequery_graph/search_codealready report per node), not a count aggregated by bare name.Impact
get_architectureis the first-call "understand this codebase" tool; an inflated headline metric on the wrong node is misleading. The qualitative structure (clusters, layers, routes, languages) is accurate — only the hotspotfan_infigures are affected.Possibly related to #558 (Class
in_degree/out_degree= 0) — both are node-level degree-metric correctness issues.