Files
docker-agent/examples/rag
Arnaud Héritier 3c61c72c1c feat(rag): decouple indexing from caller timeout via indexing_timeout config
Extend the detachment pattern already used for the RAG file watcher
(context.WithoutCancel) to manager.Initialize, so the 30s toolset-start
wait budget (tools.DefaultStartTimeout, shared by all toolset types for
#4001 wedged-toolset detection) no longer aborts in-flight indexing.
When the caller gives up waiting, indexing keeps running in the
background under the single-flight lock and a later turn picks up the
toolset once it finishes.

Indexing itself is now bounded by a new indexing_timeout config
(pkg/config/latest.RAGConfig, default 30m, "0s" = unbounded) instead
of the caller's ctx, so a hung provider connection cannot pin the
indexing lock forever.

Regression tests prove the #4062 backoff-gate invariants hold: a 429
returned by detached indexing still arms the gate, while an
indexing_timeout deadline (context.DeadlineExceeded, non-retryable)
does not.

Part of #4073, depends on #4158 (atomic per-file persistence).
2026-09-04 13:46:03 +00:00
..
2025-11-19 11:06:12 +01:00