Contributing
For people writing code for SHC itself. Audience: SHC contributors.
For operating a deployed SHC, see ../guide/. For authoring
apps on top of SHC, see ../app-development/. For
architectural internals, see ../architecture/.
Start here
Section titled “Start here”- Engineering standards — the overall bar
Standards
Section titled “Standards”- Coding style — Go style, naming, formatting
- Commenting — when and how to comment
- Conventions — project-wide idioms
- API design — router structure, request/response types
- Error handling — coded errors (X######CCCC), POSIX exits, HTTP mapping
- Validation — input validation (validator/v10 + DecodeAndValidate)
- Testing — unit/integration/e2e expectations
- Tech stack notes — Go 1.25, cobra, chi, sqlite/rqlite, etc.
Backend
Section titled “Backend”Frontend
Section titled “Frontend”Testing
Section titled “Testing”- Overview — the test pyramid
- Writing tests — what to test and where
- Manual single-node
- Manual multi-node
- Multinode harness
- Proxmox test harness
Before you push: make ci/checks
Section titled “Before you push: make ci/checks”The GitLab pipeline builds and publishes. It does not verify. Every correctness gate that used to run there now runs here, in one command:
make ci/checksThat runs, in order:
| Gate | What it proves |
|---|---|
ci/checks/leak | No estate or customer identifier reaches the published docs |
client/check | The committed pkg/apiclient matches the live route registry |
docs/check | Every generated reference page matches its source registry |
docs/lint | Vale consistency gate over the published docs corpus |
test/rqlited-live | The live-rqlited suites actually ran — no silent skips (Linux only) |
Run a single gate by name when iterating (make docs/check). The target
refuses to start when any of its tooling is missing rather than skipping
a gate quietly; the failure message names what to install.
make lint (formatting, golangci-lint, template validation, and the
architecture fitness rules) and make test are the other half of the
local bar. They were never part of the pipeline either.
What the pipeline still gates, because it belongs to the build rather than to the codebase: the packaging checks on the binaries and debs it is about to publish, and the leak scan over the publishable corpus.
Regenerating reference docs
Section titled “Regenerating reference docs”Three reference pages are generated from the live registries so they cannot drift from the code — the error codes, the HTTP route table, and the event topics:
make docs/generate # regenerate all threemake docs/check # fail if the committed output is staleRegenerate (and commit the output) after adding, removing, or renaming an error code, an HTTP route, or an event type.
| Reference page | Source of truth | Upkeep |
|---|---|---|
docs/reference/errors.md | Per-module errors.go X####CCCC factories | generated (scripts/gen-errors-md.go) |
docs/reference/api/routes.md | Per-module router registrations | generated (scripts/gen-routes-md.go) |
docs/reference/events.md | Per-module event-type registrations | generated (scripts/gen-events-md.go) |
docs/reference/cli/*.md | Per-module commands/ cobra commands | maintained by hand |
docs/reference/api/*.md (per-module notes) | Per-module router.go | maintained by hand |
docs/reference/configuration/config-keys.md | core/config/default.yaml | maintained by hand |
docs/guide/apps/README.md | apps/*/app.yaml | maintained by hand |
docs/architecture/modules/*.md (stubs) | modules/*/ (ce) + modules/*/ | maintained by hand |