find_callers returns a first page of pure noise on high-ref names, and the filter its own description prescribes does not exist #141
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#141
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by a production-readiness review against the live v0.26.1 daemon on this repo. This is on the most-used tool, needs no upgrade, no large repo and no unusual environment.
Measured, live
find_callersonReadPool::get(crates/daemon/src/read_pool.rs:77), defaultlimit: 50,exclude_tests: true:All 50 rows are
EXTRACT_DIAGNOSTICS.get(i),SYMBOL_KINDS.get(..),cols.get(&end). Not one is a call to the symbol asked about. The 360 real callers live incrates/daemon/and sort aftercrates/abi/andcrates/cli/because the query isORDER BY f.path, r.start_line(crates/daemon/src/local_index.rs:3039) — resolution-blind ordering.The interface gap
The shipped description (
crates/mcp-server/src/server.rs:9101) says:FindCallersArgs(server.rs:3066) hassymbol_id,exclude_tests,limit,cursor,project,response_format. There is no such parameter.find_referenceshas none either. The server computespage_resolvedatserver.rs:7406— it knows the page is useless — and offers no way to ask for the useful rows.This is the #138 shape at the API level: the description names an action the interface cannot perform.
Why it is worse than it looks
Three of the ten symbols
project_overviewputs intop_referenced_symbolsare in this class (get388,len255,path211). The orientation tool actively steers agents into it. It costs ~2,400 tokens to return zero information, which inverts the product's core claim —rg 'pool\.get('is strictly better here. And an agent under budget pressure reads snippets, notresolutionfields.Calibration — the tool is not broadly broken
On distinctive names it is clean:
tool_body233 refs / 0 fallback;classify_walked6/6 resolved with a correctin_testsplit. The defect is scoped to short stdlib-colliding names — which is precisely the set with the highest ref counts, i.e. the ones people ask about.Two things to fix, and they are separable
resolutionfilter the description promises, or change the description. Adding it is right —page_resolvedis already computed.ORDER BY f.pathis resolution-blind. Resolved rows should not sort after name-fallback noise on the first page. Whatever is chosen must keep the cursor stable (see #127).Do not fix this by dropping
name_fallbackrows — they are honest and some are wanted. The defect is that the caller cannot express which set they want.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01K1zj5VcFJvJt3pQxe9259K