Run all CI validations locally before committing changes:
make validate-all
This runs the same checks as CI:
- go mod tidy — ensures
go.mod/go.sumare clean - Lint — runs
golangci-lint(see.golangci.ymlfor configuration) - Tests — runs all unit tests with race detection (
go test -race ./...) - ShellCheck — validates all shell scripts
If any step fails, fix the issue and re-run before committing.
- Go 1.25.6+
- golangci-lint v2.7.2+ — Install instructions
- ShellCheck —
brew install shellcheck(macOS) orapt-get install shellcheck(Linux)
When adding a new Go package that contains tests, include a
testmain_test.go file in the package directory to enable automatic
goroutine leak detection via go.uber.org/goleak. Match the package
declaration to the existing test files in that directory (use the external
package foo_test form if that is what the other test files use).
package <pkg> // or <pkg>_test — match the existing test files
import (
"testing"
"go.uber.org/goleak"
)
// TestMain runs goleak after the test suite to detect goroutine leaks.
func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}If the package already has a TestMain that does non-trivial setup (e.g.
starting a server), integrate goleak manually using the
setup → m.Run() → teardown → goleak.Find → os.Exit pattern instead
of calling goleak.VerifyTestMain.
- README.md — project overview, building from source, API examples, and Makefile usage
- METRICS.md — aggregated metrics endpoint documentation
- Model CLI README — CLI plugin (
docker model) documentation - Helm chart — Kubernetes deployment guide
- Model Specification — model packaging specification
- Docker Docs — official Docker Model Runner documentation