Health check and readiness endpoints for web services — liveness probes,
97
99%
Does it follow best practices?
Impact
94%
3.61xAverage score across 4 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent proactively adds health check endpoints when building a Go microservice for containerized deployment. The task mentions Docker and auto-scaling but never asks for health endpoints.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Liveness endpoint exists",
"description": "A GET /health endpoint exists that returns 200 with a JSON body containing a status field. It does NOT check external dependencies like the database.",
"max_score": 15
},
{
"name": "Readiness endpoint exists",
"description": "A GET /ready endpoint exists that checks the database connection (e.g. db.Ping()) and returns 200 when healthy or 503 when the database is unreachable.",
"max_score": 15
},
{
"name": "Readiness returns dependency detail",
"description": "The readiness endpoint response includes per-dependency check results in JSON (e.g. checks map with database status) rather than just a bare status code.",
"max_score": 10
},
{
"name": "Liveness does not check database",
"description": "The /health (liveness) endpoint does NOT call db.Ping() or perform any database/external queries. It returns 200 as long as the process is running.",
"max_score": 12
},
{
"name": "Graceful shutdown",
"description": "The server handles OS signals (SIGTERM/SIGINT) and calls server.Shutdown(ctx) with a context deadline to drain in-flight requests before exiting.",
"max_score": 12
},
{
"name": "Dockerfile HEALTHCHECK instruction",
"description": "The Dockerfile includes a HEALTHCHECK instruction that probes the /health endpoint.",
"max_score": 10
},
{
"name": "503 for unhealthy readiness",
"description": "When the database is unreachable, the readiness endpoint returns 503 (Service Unavailable).",
"max_score": 8
},
{
"name": "CRUD endpoints functional",
"description": "All five CRUD endpoints are implemented with appropriate HTTP methods and status codes using Go 1.22+ method routing.",
"max_score": 10
},
{
"name": "SKU uniqueness enforced",
"description": "SKU uniqueness is enforced via a UNIQUE constraint in the SQLite schema.",
"max_score": 8
}
]
}