No per-call timeout on the MCP-to-daemon path, and no elapsed_ms for a tool call — a slow query is a silent hang with no operator surface #142
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#142
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, verified against the tree.
The gap
chan.exchange(&mut req).awaitatcrates/daemon/src/rpc_index.rs:324is unwrapped — no timeout.The timeouts that DO exist all cover something else:
None of them bounds a running query. A query that takes four minutes is indistinguishable from a dead daemon, from the client's side.
And the daemon logs
elapsed_msonly for index/checkpoint stages, never for a tool call — so an operator cannot learn which call was slow, even after the fact.Why it matters at scale
Measured warm on this repo's live index (227,012 refs, 30,760 edges):
project_overview'sfile_healthcore (crates/daemon/src/graph.rs:1686):SCAN r | SEARCH f USING INTEGER PRIMARY KEY | USE TEMP B-TREE FOR GROUP BY | USE TEMP B-TREE FOR ORDER BY, 0.19 / 0.14 / 0.20 s simplified; 223 ms with the realpools_cte, ~90% of the tool.resolution_gaps: 0.83 s — five to six fullrefsscans plus twopools_cteevaluations.path_glob/langare applied AFTER the join, so narrowing does not reduce the scan.LIMIT 50bounds the output, not the work. At this repo's size 0.2 s does not bite and the 20x extrapolation is not a benchmark — but the growth is certain,project_overviewis the call our own instructions mandate FIRST, and the missing timeout is what turns "slow" into "hung with no diagnosis".Ask
exchange, with a refusal that says which call and how long it waited — not a generic disconnect.elapsed_msfor tool calls in the daemon log.Related
project_overview240 ms → 31 ms and leftfile_healthin place. That is the remaining half.🤖 Generated with Claude Code
https://claude.ai/code/session_01K1zj5VcFJvJt3pQxe9259K