Testing and verification gates
Testing philosophy, fast vs race gates, mutation testing of safety guards, and Lima VM integration.
Verification in exocomp is grounded in execution. No change lands without demonstrated test output.
The testing gates
1. Fast commit gate (make check)
Runs automatically via git pre-commit hook or manually:
make check
Executes:
gofmtformatting checkgo vetstatic analysisgolangci-lint(if installed)go mod tidy -diffcheck- Fast unit tests:
go test -short ./...
2. Full race gate (make check-race)
Runs in CI and gates all worktree merges to main:
make check-race
Runs the entire test suite with Go's race detector (go test -race ./...).
3. Documentation-expression guard (inside make check)
internal/docexpr reads every --expr value quoted in docs/ and compiles it
against the same reactive/policy environment its verb uses, so a guide's CEL
example cannot drift from the code it documents. An unknown event field, a
status compared to a value the pipeline never emits, or an expression that no
longer compiles fails TestDocsExamples in the fast gate. It reuses the real
compilers, so what it accepts is exactly what rule add and policy add accept.
Mutation testing of safety guards
Invariant 5 dictates that guardrails live in the execution queue, not configuration.
To prevent tests from passing vacuously:
- Every safety guard test must carry a mutation check.
- A test asserting that destructive actions or unauthenticated tokens are rejected must fail if the security check in the code under test is commented out.
Infrastructure testing with Lima Linux VMs
Mocking remote SSH and Ansible runs in unit tests cannot prove behavior on real Linux kernels.
The repository includes Fedora Lima VM templates under test/lima/:
# Provision a dummy managed node
limactl start test/lima/fedora.yaml
# Run integration tests against real SSH/Ansible targets
go test -tags=integration ./test/lima/...
This validates:
- Real SSH fleet key authentication and
known_hostsfingerprinting. - Rootless Ansible execution with
nonosandbox enforcement. - Per-source venv isolation and Python interpreter resolution.
Connections
Local graphLinked from
- Knowledge base evolution logOverview2026-10-11“testing.md”
- exocomp knowledge baseOverview3. Contributor guide (front and center)“Testing and verification gates”
- Contributor guideContributionDeveloper guides“Testing and verification gates”