This was generated by AI during triage.
Summary
In an indexed TypeScript/Vitest project, direct calls from test cases to a production function are visible in the test source returned by node, but the corresponding test CALLS/coverage edges are absent. As a result, explore reports no covering tests found for a function that is directly exercised by several indexed tests, and callers(include_tests=true) omits those callers.
This is a silent false-negative in the test-provenance contract, not a missing or skipped test file.
Environment
- codebase-memory-mcp
1.0.0-rc.1
- macOS 26.5.1, arm64
- Full index; coverage metadata is complete and current for all files in the reproduction
- TypeScript source with Vitest tests and a barrel export
Reproduction shape
Production function:
// src/store/root-lease.ts
export async function inspectRootLease(root: string) {
// implementation
}
The function is re-exported from src/store/index.ts. The test imports through that barrel:
// tests/store/lease-handoff.test.ts
import { inspectRootLease } from "../../src/store/index.js";
import { describe, expect, it } from "vitest";
describe("multi-agent lease handoff", () => {
it("recognizes an exited owner", async () => {
await expect(inspectRootLease(root)).resolves.toMatchObject({
state: "recoverable",
});
});
});
In the real indexed file, inspectRootLease is called five times across four it(...) cases.
After indexing:
node(file="tests/store/lease-handoff.test.ts") returns the complete test source, including direct calls.
search_graph finds the test module and marks it is_test=true.
explore(symbols=["inspectRootLease"]) reports no covering tests found.
callers(symbol="inspectRootLease", include_tests=true, depth=3) returns only one production caller and no test caller:
{
"symbol": "inspectRootLease",
"callers": [
{
"name": "acquireRootLeaseWithRecovery",
"file_path": "src/store/root-lease.ts",
"hop": 1
}
],
"total_matched": 1
}
The indexed test-file node exposes only the module and helper functions; the Vitest it(...) callbacks that contain the calls are not represented as test callers.
Expected behavior
- A direct call from an indexed test case must produce a test-provenance edge to the production function, whether the import is direct or through a barrel.
callers(include_tests=true) must return a test-owned caller or file-level test provenance for this case.
explore must not claim no covering tests found when indexed test source directly exercises the symbol.
- If test linkage is incomplete, the response should report coverage as unknown/partial rather than a definitive negative.
Acceptance criteria
Related issues
Summary
In an indexed TypeScript/Vitest project, direct calls from test cases to a production function are visible in the test source returned by
node, but the corresponding testCALLS/coverage edges are absent. As a result,explorereportsno covering tests foundfor a function that is directly exercised by several indexed tests, andcallers(include_tests=true)omits those callers.This is a silent false-negative in the test-provenance contract, not a missing or skipped test file.
Environment
1.0.0-rc.1Reproduction shape
Production function:
The function is re-exported from
src/store/index.ts. The test imports through that barrel:In the real indexed file,
inspectRootLeaseis called five times across fourit(...)cases.After indexing:
node(file="tests/store/lease-handoff.test.ts")returns the complete test source, including direct calls.search_graphfinds the test module and marks itis_test=true.explore(symbols=["inspectRootLease"])reportsno covering tests found.callers(symbol="inspectRootLease", include_tests=true, depth=3)returns only one production caller and no test caller:{ "symbol": "inspectRootLease", "callers": [ { "name": "acquireRootLeaseWithRecovery", "file_path": "src/store/root-lease.ts", "hop": 1 } ], "total_matched": 1 }The indexed test-file node exposes only the module and helper functions; the Vitest
it(...)callbacks that contain the calls are not represented as test callers.Expected behavior
callers(include_tests=true)must return a test-owned caller or file-level test provenance for this case.exploremust not claimno covering tests foundwhen indexed test source directly exercises the symbol.Acceptance criteria
it(...)callbacks.CALLS,TESTS, orTESTS_FILEprovenance without collapsing the test cases.callers(include_tests=true)exposes the test relationship.exploreno longer emitsno covering tests foundfor the exercised function.Related issues
from module import funcbare-call gap; this reproduction is TypeScript/Vitest with a barrel import and missing test provenance.1.0.0-rc.1reproduction.