mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-04 18:30:09 +00:00
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).