Summary #
- Add
DefaultHealthTimeout(5s) andDefaultHealthCacheTTL(30s) toserver.Config, defaulting unset values inserver.Newand wiring them explicitly incmd/goosefoot/main.go. - Serialize
GET /healthbeet versionchecks behind a mutex, bounding subprocess execution withHealthTimeoutand caching healthy version strings forHealthCacheTTL. - Skip caching errors so
/healthrecovers immediately oncebeetis healthy while preventing concurrent check stampedes. - Add behavioral unit tests covering TTL cache hits, post-TTL refresh, error non-caching, and timeout context cancellation (
503 Service Unavailable).