pa-02 — Execution
Prerequisites
- Go ≥ 1.25 (stdlib only, offline).
One-shot
cd pa-02-api-design && bash scripts/verify.sh
Per-language workflow (Go)
cd pa-02-api-design/src/go
go test -race -count=1 ./... # compat rules, idempotency, cursors
go run ./cmd/apidemo
Package map
| File | What |
|---|---|
apicontract/compat.go | protobuf-style schema compatibility check + HasBreaking CI gate |
apicontract/idempotency.go | idempotency-key store (run-once, no-cache-on-failure, TTL) |
apicontract/cursor.go | opaque, tamper-evident pagination cursors |
cmd/apidemo | a compat check, idempotent retries, and a cursor round-trip + tamper |
See GUIDE.md for the deep dive.