Version
codebase-memory-mcp 0.8.1
Platform
macOS (Apple Silicon)
What happened, and what did you expect?
search_graph returns Class nodes with in_degree: 0 and out_degree: 0 even when real INHERITS edges exist for those nodes in the graph.
Example — AbstractAttachmentDto has 8 subclasses, but search_graph reports in_degree: 0:
search_graph(name_pattern=".*AbstractAttachmentDto.*")
→ { "name": "AbstractAttachmentDto", "label": "Class", "in_degree": 0, "out_degree": 0 }
Confirmed via Cypher that the edges actually exist:
MATCH (child)-[:INHERITS]->(parent)
WHERE parent.name = 'AbstractAttachmentDto'
RETURN child.name
→ Returns 8 rows correctly.
Also confirmed that the degree properties are stored as 0 on the node itself, not computed live:
MATCH (n:Class {name: 'AbstractAttachmentDto'})
RETURN n.in_degree, n.out_degree
→ 0, 0
Root cause hypothesis
The in_degree/out_degree properties appear to be written onto nodes during indexing (not computed dynamically from the graph). It looks like these counts are not being updated for Class nodes after INHERITS edges are resolved, leaving them at their initial value of 0.
Impact
search_graph returns misleading connectivity data for all classes
- Any
min_degree filter to find well-connected or abstract classes will silently exclude everything
- Agents fall back to grep because
search_graph results look like isolated/unused nodes
Workaround
Use query_graph with a Cypher traversal directly — the edges are correct, only the stored property is wrong:
MATCH (child)-[:INHERITS]->(parent {name: 'MyAbstractClass'})
RETURN child.name, child.file_path
Confirmations
Version
codebase-memory-mcp 0.8.1
Platform
macOS (Apple Silicon)
What happened, and what did you expect?
search_graphreturnsClassnodes within_degree: 0andout_degree: 0even when realINHERITSedges exist for those nodes in the graph.Example —
AbstractAttachmentDtohas 8 subclasses, butsearch_graphreportsin_degree: 0:Confirmed via Cypher that the edges actually exist:
→ Returns 8 rows correctly.
Also confirmed that the degree properties are stored as
0on the node itself, not computed live:→ 0, 0
Root cause hypothesis
The
in_degree/out_degreeproperties appear to be written onto nodes during indexing (not computed dynamically from the graph). It looks like these counts are not being updated forClassnodes afterINHERITSedges are resolved, leaving them at their initial value of0.Impact
search_graphreturns misleading connectivity data for all classesmin_degreefilter to find well-connected or abstract classes will silently exclude everythingsearch_graphresults look like isolated/unused nodesWorkaround
Use
query_graphwith a Cypher traversal directly — the edges are correct, only the stored property is wrong:Confirmations