Repository navigation
Description
Observed on the live deployment
POST /api/knowledge_base/search stalled and returned nothing at all — no
response body, no HTTP status, curl --max-time 180 elapsed at real 3m0.009s. The
backend log shows the request entering and never leaving:
15:06:29,205 api.knowledge_search - INFO - Search: 'RTRIP...' (limit=5, mode=hybrid)
15:06:29,619 npu_semantic_search - INFO - Enhanced search: 'RTRIP...' (top_k=7)
... nothing further for this request
No completion line, no exception, no timeout — in either backend.log or
backend-error.log. The caller waits forever and the server never says why.
The contrast, in the same log window
A different route reported exactly what should happen:
15:06:51,637 utils.error_boundaries.decorators - WARNING -
Request deadline exceeded: get_call_graph did not complete within 120.0s (#14015)
So the mechanism exists and works. get_call_graph is covered; the knowledge routes
are not:
# tools/lint/check_route_deadlines.py:42
COVERED_PACKAGES = ("autobot-backend/api/codebase_analytics/endpoints",)One package. The guard that enforces "every covered route carries a deadline"
covers codebase_analytics/endpoints and nothing else, so api/knowledge_search.py
and api/knowledge.py are outside it by construction — not by an exemption anyone
recorded.
What the stall cost, and why a deadline is the fix rather than the cause
The stall was transient: the same query later returned HTTP 200 in 29.6s. Concurrent
work explains the pressure — duplicate_detector: Using LSH for similarity search on 127313 blocks and get_call_graph blowing its own deadline at that minute.
So the defect is not that it was slow once. It is that a slow path with no deadline is
indistinguishable, from the caller and from the log, from a path that will never
answer. The covered route told an operator what happened in one line; the uncovered
one produced silence for three minutes.
Also measured, and relevant to whatever budget is chosen
Both successful searches took 29.6s and 32.3s against a corpus of one visible
fact — fixed overhead, not corpus size. A deadline set from today's observed times
would be set against a nearly-empty visible corpus, which #17625 will change.
Acceptance criteria
- The knowledge routes carry a deadline, and exceeding it produces a response and
a log line rather than silence. -
COVERED_PACKAGESeither covers them or records why a package is excluded. A
one-entry tuple with no stated boundary reads as "this is the only package that
needs deadlines", which is not a decision anyone made. - The guard fails when a route in a covered package has no deadline —
mutation-proved by removing one. - The budget is chosen after blocker(kb): 6,741 documentation chunks and 11,241 code chunks are vectorised and chat's retrieval path queries neither #17625, because the visible corpus is about to grow
by three orders of magnitude and a budget measured against one fact is not a
budget.
Related
#14015 (the deadline mechanism), #17625 (the retrieval blocker measured in the same
session).
Activity
github-actions commentedon Nov 2, 2026
needs-structure: this issue is missing:M<n> - ...:v0.9.4 - backend and APIis not a goal milestonephase:M<n>.<k>label whose<n>matches the goal milestone: found noneThe label clears on the next issue event once all three are present (#19522).