From fac5603dafd466b86f8457f2f5c8d2667c97a4d8 Mon Sep 17 00:00:00 2001 From: pancake Date: Mon, 8 Jun 2026 12:14:06 +0200 Subject: [PATCH] fix: health check always returning not ready --- pkg/gateway/gateway.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/gateway/gateway.go b/pkg/gateway/gateway.go index 9b1586f60..c95f586d7 100644 --- a/pkg/gateway/gateway.go +++ b/pkg/gateway/gateway.go @@ -222,6 +222,11 @@ func Run(debug bool, homePath, configPath string, allowEmptyStartup bool) (runEr if err != nil { return err } + // All services (channels + shared HTTP server) are up; mark the health + // server ready so GET /ready reports "ready". The health endpoints are + // mounted on the shared gateway mux, so Health.Server.Start() (which would + // otherwise set this) is never called — we flip the flag explicitly here. + runningServices.HealthServer.SetReady(true) publishGatewayEvent(agentLoop, runtimeevents.KindGatewayReady, startedAt, nil) closeListeners = false