From CodeRabbit review on PR #1 (#1 (review)) — Stability, Trivial.
Both the vehicles and weather handlers call resolveRegion, which dereferences deps.Regions on every request. The loud-failure startup block in internal/httpapi/router.go (~148-161) only runs when deps.Auth != nil, so a configuration that sets Deps.Vehicles or Deps.Weather with a nil Deps.Regions passes startup and nil-dereferences on the first request.
buildDeps always sets Regions today, so this is a validation gap rather than a live defect. Extend the startup check to panic when Deps.Regions is nil while either service is wired.
From CodeRabbit review on PR #1 (#1 (review)) — Stability, Trivial.
Both the vehicles and weather handlers call
resolveRegion, which dereferencesdeps.Regionson every request. The loud-failure startup block ininternal/httpapi/router.go(~148-161) only runs whendeps.Auth != nil, so a configuration that setsDeps.VehiclesorDeps.Weatherwith a nilDeps.Regionspasses startup and nil-dereferences on the first request.buildDepsalways setsRegionstoday, so this is a validation gap rather than a live defect. Extend the startup check to panic whenDeps.Regionsis nil while either service is wired.