Version
codebase-memory-mcp v0.10.8
Platform
Linux x86_64 (reproduces with both fast and full indexing modes)
What happened
TypeScript / TSX awaited calls with explicit generic type arguments do not produce CALLS edges. For example, await parseJsonBody<T>() is omitted, while the equivalent non-generic await parseJsonBody() call is indexed.
This makes inbound call tracing incomplete without any parse error or warning.
Minimal reproduction
Create these two files in an otherwise empty directory.
route-utils.ts
export async function parseJsonBody<T>() { return {} as T; }
export async function plainLocal() { return await parseJsonBody(); }
export async function genericLocal() { return await parseJsonBody<{ message: string }>(); }
gateway.ts
import { parseJsonBody } from './route-utils';
type Payload = { message: string };
export async function plainImported() { return await parseJsonBody(); }
export async function genericImported() { return await parseJsonBody<{ message: string }>(); }
export async function genericPrimitive() { return await parseJsonBody<string>(); }
export async function genericNamed() { return await parseJsonBody<Payload>(); }
Index the directory, then call trace_path with:
{
"project": "awaited-generic-repro",
"function_name": "parseJsonBody",
"direction": "inbound",
"depth": 1,
"format": "json"
}
Actual result
Only these two callers are returned:
Expected result
All six callers should be returned:
plainLocal
genericLocal
plainImported
genericImported
genericPrimitive
genericNamed
The behavior is the same in .tsx files. The generic calls are valid TypeScript, and the generic type argument should not change the callee from parseJsonBody.
Notes
This appears to be an extraction issue around the AST shape of await f<T>(), rather than a resolver issue: the non-generic calls in the same files resolve correctly. Because the corrected extraction changes graph content while source files remain unchanged, an index semantic-version/cache invalidation may also be needed so existing indexes are rebuilt.
Confirmations
Version
codebase-memory-mcp v0.10.8
Platform
Linux x86_64 (reproduces with both
fastandfullindexing modes)What happened
TypeScript / TSX awaited calls with explicit generic type arguments do not produce
CALLSedges. For example,await parseJsonBody<T>()is omitted, while the equivalent non-genericawait parseJsonBody()call is indexed.This makes inbound call tracing incomplete without any parse error or warning.
Minimal reproduction
Create these two files in an otherwise empty directory.
route-utils.tsgateway.tsIndex the directory, then call
trace_pathwith:{ "project": "awaited-generic-repro", "function_name": "parseJsonBody", "direction": "inbound", "depth": 1, "format": "json" }Actual result
Only these two callers are returned:
plainLocalplainImportedExpected result
All six callers should be returned:
plainLocalgenericLocalplainImportedgenericImportedgenericPrimitivegenericNamedThe behavior is the same in
.tsxfiles. The generic calls are valid TypeScript, and the generic type argument should not change the callee fromparseJsonBody.Notes
This appears to be an extraction issue around the AST shape of
await f<T>(), rather than a resolver issue: the non-generic calls in the same files resolve correctly. Because the corrected extraction changes graph content while source files remain unchanged, an index semantic-version/cache invalidation may also be needed so existing indexes are rebuilt.Confirmations