haiku.rag/haiku_rag_slim/haiku/rag
Yiorgis Gozadinos 522959d9b4
Check the code timeout before each document read
The VFS bridge suspends the Monty worker for the length of a read. Monty checks
its duration budget between interpreter steps, so it cannot check while a read
is in flight. Code that reads in a loop overran a 60s budget by minutes. A read
takes about 20ms on a 2789-document corpus, so a full scan spends about 55s in
reads alone.

Check the deadline before each read. Raising from inside the callback answers the
worker's suspension, which keeps the session usable.

Monty also spends max_duration_secs across the session rather than per call, and
the sandbox reuses the session so that variables persist. Budget it for
code_timeout * max_executions. At the old per-call value the first slow call
starved every later one.

Do not wrap feed_run in asyncio.wait_for. Cancelling during pure compute is
clean, but cancelling while a read waits for an answer wedges the session with a
protocol RuntimeError that escapes execute(). A call that computes without
reading stays bounded by the session budget alone.
2026-07-28 19:11:19 +03:00
..
capabilities Document that file objects cannot be iterated 2026-07-28 19:10:53 +03:00
chat Constrain the chat prompt container height 2026-07-25 14:40:40 +03:00
chunkers Fail docling-serve requests over to another instance with per-instance breaking 2026-07-08 11:03:44 +03:00
client Correct two justifications 2026-07-27 12:18:15 +03:00
config replace haiku.skills with native Pydantic AI capabilities 2026-07-24 15:26:17 +03:00
converters Prevent magic-byte sniffing from misrouting text conversion in docling-local 2026-07-15 19:20:54 +03:00
embeddings Pool HTTP clients for vLLM embedding and vLLM/Jina reranking 2026-07-09 10:32:44 +03:00
ingester Normalize pragma comments to the codebase's single-line form 2026-07-26 20:18:19 +03:00
inspector Surface database-open errors in the TUIs 2026-07-25 11:27:29 +03:00
providers Emit a docling_serve.request span per instance attempt 2026-07-10 11:16:27 +03:00
reranking Set explicit 120s timeout on the vllm reranker HTTP client 2026-07-24 12:34:31 +03:00
sandbox Check the code timeout before each document read 2026-07-28 19:11:19 +03:00
store Normalize pragma comments to the codebase's single-line form 2026-07-26 20:18:19 +03:00
tools Report tool failures with ToolFailed 2026-07-27 18:26:42 +03:00
__init__.py
app.py Accept images on CLI ask/analyze and MCP tools 2026-07-25 10:35:25 +03:00
circuit_breaker.py Move CircuitBreaker to a shared module 2026-07-08 11:03:30 +03:00
cli.py Accept images on CLI ask/analyze and MCP tools 2026-07-25 10:35:25 +03:00
context.py Remove unreachable code and fix two defects it surfaced 2026-07-26 18:45:48 +03:00
doctor.py Fix defects found reviewing the coverage work 2026-07-27 10:44:32 +03:00
logging.py
mcp.py Cover MCP, ingester and converter error paths 2026-07-26 19:14:26 +03:00
s3.py swap aioboto3 for obstore in the S3 client path 2026-05-11 11:29:42 +03:00
telemetry.py Route eval scripts through the shared telemetry configure 2026-07-10 11:38:33 +03:00
utils.py Map thinking onto Pydantic AI's unified setting 2026-07-27 18:26:42 +03:00