Skip to content

Build from source

The gate needs Go, make, the tools that mise.toml pins, and the nsl machine lodge for the web UI. It needs no package manager beyond that, and no network access in its tests.

Build and check

mise install   # golangci-lint, buf, protoc-gen-go, svu, nfpm
make build     # frostmarksd and marksctl into build/
make check     # format, then verify
make ci        # what CI runs: verify, the generated code, race, cross-builds, the corrections check, the manifest diff and the web UI (nsl)
Target What it runs
make build go build of ./cmd/... into build/, with the version in the code
make verify go mod tidy -diff, go vet, a gofmt check, golangci-lint, buf lint, buf format --diff, go test ./...
make generate buf generate: the Go code, the Connect client, and hearth's manifest, permission checks, MCP tools and events
make gen-check regenerate into a temporary directory, then fail when the committed gen/ differs
make race the tests under the race detector
make cross build every package for linux/amd64 and arm64, and darwin/arm64. No windows build: the daemon serves a Unix socket
make corrections-base compare the corrections inbox with BASE
make manifest-check compare gen/manifest.json with the 1 at BASE, so a breaking change is caught in review; it skips when BASE is empty, and CI sets the pull request's base commit
make web-check in the nsl machine: Biome, tsc, the Vitest tests of web/, and a fresh run of web/src/gen compared with the tree
make web-build in the nsl machine: the web UI into web/dist
make web-generate in the nsl machine: web/src/gen from the proto, with the pinned protoc-gen-es
make deb DEB_VERSION=X.Y.Z the .deb into dist/, from a built web/dist, then make deb-check
make site build this site into site/dist, in strict mode

make ci does not build the site: its 7 prerequisites are verify, gen-check, race, cross, corrections-base, manifest-check and web-check. Node and pnpm run only in the nsl machine; CI, whose runner has Node, runs the same targets with IN_NSL='sh -c'.

The generated code

gen/ is committed: the messages, the Connect server and client, and hearth's 4 outputs. A change of proto/frostyard/frostmarks/v1/marks.proto, of third_party/ or of a plugin means make generate, and then a commit of gen/ beside the change. make gen-check fails when the 2 drift, so the review sees the generated difference.

The Connect plugin and hearth's 4 plugins run with go run of the versions that go.mod requires, so go.sum pins them, and protoc-gen-go is the binary that mise.toml pins. No plugin comes from a registry.

The docs

The maintainer contracts live in docs/: an ADR for a decision, a design for how the parts fit, a spec for an exact contract, and a plan for the order of work. make verify fails on a relative link whose file or heading is missing, and on a doc without a line in docs/README.md.

The documentation site

make site        # strict build into site/dist
make site-serve  # preview at http://127.0.0.1:8000/frostmarks/

The site needs the Python lock in site/requirements.txt and writes its virtual environment to build/site-venv. No gate builds the site, so a change that does not touch site/ needs no Python toolchain.

Write for users

Pages live in site/content/. A page explains what a user does, not how the code works: the maintainer contracts stay in docs/. A new command or option updates its page here in the same pull request.