Before declaring a task complete, run all three suites:
make test/unit(ormake test/unit-shortif no network) — package-level unit tests in the repo root.make test/mock— gomock-based interface tests undermock_tests/.make test/swagger— contract tests undertests/against a Prism mock server bound to:4010.
Never substitute make test/ci (which only runs build + unit-short + mock)
for the full set. Swagger contract coverage is mandatory.
The Prism mock server is launched via Docker (per tests/README.md:17):
docker run --rm -it -p 4010:4010 stoplight/prism:3 mock -h 0.0.0.0 https://bitbucket.org/api/swagger.jsonThen in a separate shell:
make test/swaggerIf docker run does not come up (connection refused, daemon errors), verify
that the Docker daemon (this repo's primary maintainer runs Rancher Desktop)
is up before retrying:
docker info >/dev/null 2>&1 || open -a "Rancher Desktop"Re-run the docker run command once docker info reports a healthy daemon.
The same step works for Docker Desktop or OrbStack — substitute the app name
in the open -a invocation.
Before merging any PR and before cutting a release with
gh release create ... --generate-notes, the full test set above
(unit + mock + swagger) must pass locally on the head commit. Do not
rely on a green CI alone — make test/ci skips swagger contract
coverage. Concretely:
- Check out the branch (or
masterfor a release tag) at the exact commit being merged or tagged. - Run unit, mock, and swagger as documented above. Start the Prism container first; do not skip swagger because Prism is not running.
- Only after all three are green:
gh pr merge --squash(per PR) orgh release create vX.Y.Z --generate-notes.
If a swagger run surfaces a regression that is in scope of the PR or release, fix it before merging or tagging. Pre-existing swagger failures unrelated to the change should be called out in the PR description, not silently shipped.
Follow ~/.claude/CLAUDE.md: chat replies in Japanese, code/identifiers in
English, LLM-facing artifacts (this file included) in English.