✨ feat(server): add /api/healthz endpoint with rich health info
Adds a Kubernetes-style healthz endpoint returning status, version, uptime_seconds and timestamp. Non-breaking — /api/health is preserved. - New route: GET /api/healthz - New handler: handleHealthz with HealthzResponse struct - New unit test: pkg/server/healthz_test.go (passes locally) - New BDD scenario: features/health/health.feature - BDD steps: pkg/bdd/steps/health_steps.go, common_steps.go Note: BDD tests require Postgres and will be validated by CI. 🤖 Co-Authored-By: Mistral Vibe (devstral-2 / mistral-medium-3.5) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,4 +7,12 @@ Feature: Health Endpoint
|
||||
Scenario: Health check returns healthy status
|
||||
Given the server is running
|
||||
When I request the health endpoint
|
||||
Then the response should be "{\"status\":\"healthy\"}"
|
||||
Then the response should be "{\"status\":\"healthy\"}"
|
||||
|
||||
@basic @critical
|
||||
Scenario: Healthz endpoint returns rich health info
|
||||
Given the server is running
|
||||
When I request the healthz endpoint
|
||||
Then the response status code should be 200
|
||||
And the response should be JSON with fields "status, version, uptime_seconds, timestamp"
|
||||
And the "status" field should equal "healthy"
|
||||
Reference in New Issue
Block a user