From ab07fa95654dee895d17646b26ea5159b51265bc Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 16 Aug 2026 18:38:31 +0200 Subject: [PATCH] docs(health): correct the probe-bound rationale for eight probes The comment still said five, and named only neo4j and qdrant as unbounded. Both were true one commit ago. Also states the property that makes adding probes safe: concurrent bounds do not sum, so wall time is one bound regardless of count. Co-Authored-By: Claude --- src/core/dependencies.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/dependencies.py b/src/core/dependencies.py index 6da54ee..5e9df33 100644 --- a/src/core/dependencies.py +++ b/src/core/dependencies.py @@ -568,12 +568,15 @@ async def shutdown_clients(): # Per-probe timeout for the concurrent health checks below, in seconds. # -# Bounded well under the container healthcheck's 10s timeout (see Dockerfile) -# so that five probes run concurrently under asyncio.gather cannot approach -# it even if all five hang. A probe that has no timeout of its own (neo4j, -# qdrant) otherwise falls back to its driver's default — 30s for both — which -# is what let a hung dependency (not a failing one) flip the container -# unhealthy. +# Bounded well under the container healthcheck's 10s timeout (see Dockerfile). +# Because every probe runs concurrently under one asyncio.gather, the wall time +# is one bound rather than the sum, so adding probes does not erode the margin — +# all eight can hang and the call still returns in ~2s. +# +# A probe with no bound of its own falls back to its client's default: 30s for +# the neo4j and qdrant drivers, 30s for the scheduler client, and none at all +# for system settings. Each is past the 10s budget on its own, which is what let +# a hung dependency — not a failing one — flip the container unhealthy. HEALTH_PROBE_TIMEOUT = 2.0