By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
The capstone is a production-readiness review of the Relay you built across this path. You are not adding features; you are proving the service is safe to operate and fixing what the review exposes. Work from evidence — commands, test output, profiles — not from intention. A review that says 'should be fine' is a review that has not been done.
The deliverable is a short written review plus the code changes it forces. For each area below, record the question, the evidence you gathered, and either a green mark or a linked issue with the fix. This is exactly the shape of a real pre-launch review, so treat it as a rehearsal: the writing matters as much as the code.
go list -deps; every arrow points toward the domain and cmd/ is thin.go test -race ./... is green; queue depth is bounded./v1 contract documented; error envelope consistent; request IDs on every response; strict decoding and body limits.rows.Close and rows.Err handled; pool limits set; migrations versioned.http.Server.Shutdown with a deadline; queue drained; http.ErrServerClosed treated as success.Run the same commands CI runs, in the same order. Failure at any step blocks the review. The commands below assume the layout from step 13; adapt the paths if your package names differ.
# 1. Everything the repository claims to be.
gofmt -l .
go vet ./...
go test ./... -race -count=1
# 2. Build the artifact exactly the way production will.
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath -ldflags="-s -w" -o dist/relayd ./cmd/relayd
# 3. Contract checks against a running process.
RELAY_ADDR=127.0.0.1:8080 RELAY_API_KEY=local-dev-key ./dist/relayd &
curl -fsS http://127.0.0.1:8080/healthz
curl -fsS http://127.0.0.1:8080/readyz
kill %1
# 4. Prove the shutdown path drains instead of cutting requests.
go test ./internal/httpapi -run TestGracefulShutdown -race -v -count=1| Area | Question the reviewer asks | Evidence to attach |
|---|---|---|
| Architecture | Can I explain every import arrow? | go list -deps output and the package diagram |
| Concurrency | Can every goroutine be cancelled? | -race run plus queue-depth metric |
| API | What happens on a bad body or method? | Test names for 400/405/500 paths |
| Storage | What happens if the database is down? | Startup ping failure or 503 test |
| Observability | Can I find one request end to end? | A request ID grepped through logs |
| Shutdown | Do in-flight requests finish? | The graceful-shutdown test output |
| Tests | What is the weakest proven behavior? | Coverage of the riskiest package |
| Deployment | Does the image run as non-root without a shell? | docker image inspect user field |
Key takeaways
The capstone is an evidence-based readiness review, not a rewrite.
Cover architecture, concurrency, API, storage, observability, shutdown, tests and deployment.
Run exactly the commands CI runs and attach their results to each claim.
Every review claim must be falsifiable with a command or a test.
Fix what the review finds and re-run the full gate before declaring the service production-ready.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.