You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
grep and callers have no test handling — #37 reached ask and blast only (5 of 8 grep hits in a small repro are test lines; ~80% of a real answer) #425
#37 (exclude or down-weight test files) is closed as completed, and in 0.18.0 the installed code shows where it landed: ask applies TEST_RANK_PENALTY unless the query asks for tests, and blast lists testModules apart from modules. grep and callers have neither. Test files come back alongside production code, unlabelled, and neither command has a flag to leave them out.
--in <path> narrows to a prefix but cannot exclude, so it does not help in the common TypeScript layout where a test sits next to the file it tests (service.ts + service.test.ts).
On a production TypeScript backend, about 80% of one grep answer (~4,300 tokens) was test lines — the answer the agent needed was the remaining 20%.
// src/home.tsimport{AuthService,formatName}from"./service";exportclassHome{auth: AuthService=newAuthService();title(): string{returnformatName(" home ");}ready(): boolean{returnthis.auth.signedIn();}}
// src/service.test.tsimport{formatName}from"./service";describe("formatName",()=>{it("trims",()=>{expect(formatName(" a ")).toBe("a");});it("keeps inner spaces",()=>{expect(formatName(" a b ")).toBe("a b");});it("handles empty",()=>{expect(formatName("")).toBe("");});});
graft callers formatName — the test file is listed as a caller, same shape as production
formatName · function · src/service.ts:L5-L5
calls ← title (src/home.ts:L6-L6)
6: title(): string { return formatName(" home "); }
calls ← service.test.ts (src/service.test.ts:L1-L8)
1: import { formatName } from "./service";
graft grep formatName — 5 of 8 hits are in the test file
labelling test hits and test callers (calls ← service.test.ts [test]) and listing them after production ones — the way blast already separates testModules.
The detection already exists (isTestPath in ask), so this looks like wiring rather than new logic.
Picked this up. isTestPath moved to the search layer (grep/callers/ask now share one predicate), both commands label test hits [test] and list them after production, and both gain --no-tests — excluded files don't count into "searched N indexed files" either. Threaded through the workspace federation, and the MCP tools render through the same formatters so they pick it up for free. Draft: #862. The repro from this issue passes: grep NEEDLE with the twin-plus-test fixture labels the test group and --no-tests leaves only src/service.ts.
Activity
hr1juldey commentedon Nov 18, 2026
Picked this up.
isTestPathmoved to the search layer (grep/callers/ask now share one predicate), both commands label test hits[test]and list them after production, and both gain--no-tests— excluded files don't count into "searched N indexed files" either. Threaded through the workspace federation, and the MCP tools render through the same formatters so they pick it up for free. Draft: #862. The repro from this issue passes:grep NEEDLEwith the twin-plus-test fixture labels the test group and--no-testsleaves onlysrc/service.ts.fix(search): grep and callers get the test handling trailhq#37 gave a…
fix(search): grep and callers get the test handling trailhq#37 gave a…