You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase 1b added a fail-fast agentgateway health guard to pipelit's FastAPI lifespan (platform/main.py). The RQ worker bootstrap (platform/worker_class.py, PipelitWorker.__init__) did not get an equivalent guard — flagged during Phase 1b as a real design decision (sync/async boundary) rather than a trivial add.
This is fail-closed, not fail-open: there is no direct-provider path left, and create_llm_from_db / _create_llm_via_agentgateway raise if the gateway is disabled or unreachable (the latter health-checks per call). So the only cost is a job failing at runtime instead of the worker refusing to boot — a DX/ops papercut, not a security gap. Filed as a follow-up, not a blocker.
Scope
Add a startup health check in PipelitWorker.__init__ (or the worker entrypoint) mirroring the lifespan guard: when AGENTGATEWAY_ENABLED, assert check_agentgateway_health and fail fast with a clear, actionable message. Handle the sync/async boundary cleanly (the lifespan guard is async; the worker init is sync).
Acceptance
Starting the RQ worker with AGENTGATEWAY_ENABLED=true and the gateway down fails fast with an actionable message, instead of accepting jobs that will error at execution time.
With the gateway healthy (or the flag disabled), worker startup is unaffected.
Context
Phase 1b added a fail-fast agentgateway health guard to pipelit's FastAPI lifespan (
platform/main.py). The RQ worker bootstrap (platform/worker_class.py,PipelitWorker.__init__) did not get an equivalent guard — flagged during Phase 1b as a real design decision (sync/async boundary) rather than a trivial add.This is fail-closed, not fail-open: there is no direct-provider path left, and
create_llm_from_db/_create_llm_via_agentgatewayraise if the gateway is disabled or unreachable (the latter health-checks per call). So the only cost is a job failing at runtime instead of the worker refusing to boot — a DX/ops papercut, not a security gap. Filed as a follow-up, not a blocker.Scope
Add a startup health check in
PipelitWorker.__init__(or the worker entrypoint) mirroring the lifespan guard: whenAGENTGATEWAY_ENABLED, assertcheck_agentgateway_healthand fail fast with a clear, actionable message. Handle the sync/async boundary cleanly (the lifespan guard is async; the worker init is sync).Acceptance
AGENTGATEWAY_ENABLED=trueand the gateway down fails fast with an actionable message, instead of accepting jobs that will error at execution time.References
platform/worker_class.py(PipelitWorker.__init__)platform/services/agentgateway_client.py(check_agentgateway_health)platform/main.py(the lifespan guard to mirror)