Tooling
Make targets, fuzzing, OpenAPI generation, the typed client, docs site and CI.
Signet ships a Makefile that installs Go tools into GOPATH/bin automatically.
Make targets
| Target | What it runs |
|---|---|
make test | go test -race ./... |
make integration | Race-enabled PostgreSQL and SQLite integration tests. |
make examples | Builds all five example modules. |
make fuzz | Runs every fuzz target for 10 seconds. |
make cover | Race tests with a coverage profile. |
make lint | golangci-lint run ./... |
make vet | go vet ./... |
make vuln | govulncheck ./... |
make fmt / make fmt-check | Format with gofmt/goimports, or verify formatting. |
make tidy | go mod tidy |
make check | fmt-check, vet, lint, race tests and vulnerability scan. |
make generate-spec | Regenerate api/signet.openapi.json from the contract. |
make generate-types | Regenerate the TypeScript schema from the spec. |
make generate | Both of the above. |
make generate-check | Regenerate and fail if committed artifacts are stale. |
make docs-site | Check docs coverage, sync the spec, typecheck and build the site. |
Run make check before opening a pull request.
Fuzz targets
make fuzz runs five targets in tests/: FuzzArgonVerifier,
FuzzSessionTokenSignOut, FuzzJSONRequestBodies, FuzzOAuthState and FuzzCSRFToken.
They exercise untrusted parsers through the public seam. CI includes a bounded fuzz run.
Conformance suite
store/conformance ships the shared test suites a Store implementation must pass: Run(t, factory)
for the core Store, RunOrganizations(t, factory) for the optional OrganizationStore
(membership-scoped List, ErrNotFound on role misses, idempotent removal) and
RunAdminUsers(t, factory) for the optional AdminUserStore. Run them against your own store —
the contract semantics are described in Storage.
OpenAPI and the typed client
The declarative contract in the HTTP API layer generates the OpenAPI 3.1 document. The
chain is: contract → cmd/signet-openapi → api/signet.openapi.json → embedded copy and
TypeScript schema. make generate-check regenerates and diffs both artifacts, restoring
the originals on failure; CI enforces it. The generated @shakibdshy/signet-auth-client package
provides typed methods and a typed error union. See Frontend client.
Documentation site
docs-site/ is a self-contained Fumadocs/Next.js app with its own lockfile:
cd docs-site
npm install
npm run docs:check # coverage guard — also runs in CI on Go changes
npm run sync:spec # copy the latest generated spec into the site
npm run types:check
npm run build
npm run dev # http://localhost:3000/docsThe coverage guard fails if a public symbol or endpoint is missing from the guides, or if a guide references an error that no longer exists. Its CI job also triggers on root Go files, so an undocumented new method cannot merge.
signet.DocsHandler() is the server-side alternative: mount it to serve /openapi.json
and a Scalar viewer from your own backend. See Sessions and cookies.
OCR review plugin
The repository includes a project-local OpenCodeReview plugin. After installing the ocr
CLI and restarting OpenCode, /ocr-review reviews changes and /ocr-health checks the
configured model. Credentials stay in the OCR CLI configuration, not in git.
CI
.github/workflows/ci.yml gates every push and pull request on two Ubuntu legs — a full
primary leg on Go 1.27 (tidy/format checks, vet, lint, race tests with coverage, example
builds, bounded fuzzing and govulncheck) and a slim Go 1.26 floor leg (build and test only) —
plus the artifacts job that verifies the generated OpenAPI and TypeScript files are current,
checks docs coverage and builds the site. macOS runs as a platform sweep weekly and whenever
a v* release tag is pushed, not on every push. Markdown-only changes skip CI, in-progress
runs are superseded, every job is capped at 15 minutes, and the npm packages publish when a
client-v* tag is pushed.