Bug
dict.get("key") calls inside function bodies are parsed as Route nodes, inflating route counts with false positives.
Example
user_id = payload.get("sub") # → creates Route node "GET sub"
username = payload.get("username") # → creates Route node "GET username"
These appear in search_graph(label="Route") results alongside real FastAPI routes.
Impact
Running get_architecture(aspects=["routes"]) or querying Route nodes returns ~125 spurious nodes mixed with real endpoints, making route discovery unreliable without manual filtering.
Workaround
Filter by WHERE qualified_name =~ '.*routers.*' to restrict to actual router files.
Suggested Fix
Route detection should require the .get() call to be on an APIRouter or FastAPI instance (i.e. the receiver is typed as or assigned from APIRouter()), not arbitrary dict variables.
Bug
dict.get("key")calls inside function bodies are parsed as Route nodes, inflating route counts with false positives.Example
These appear in
search_graph(label="Route")results alongside real FastAPI routes.Impact
Running
get_architecture(aspects=["routes"])or querying Route nodes returns ~125 spurious nodes mixed with real endpoints, making route discovery unreliable without manual filtering.Workaround
Filter by
WHERE qualified_name =~ '.*routers.*'to restrict to actual router files.Suggested Fix
Route detection should require the
.get()call to be on anAPIRouterorFastAPIinstance (i.e. the receiver is typed as or assigned fromAPIRouter()), not arbitrary dict variables.