Testing — radioactive-ralph¶
Strategy¶
Three layers, each with a distinct purpose:
Layer |
Scope |
Gating |
Count today |
|---|---|---|---|
Unit |
Package-local logic and schema rules |
Always on |
Extensive |
Integration (offline) |
End-to-end CLI and subsystem flows with fake processes and fixtures |
Always on |
Present in |
Live/manual |
Real |
Manual |
Not part of default CI |
Run the checks¶
go test ./...
golangci-lint run
govulncheck ./...
python3 -m tox -e docs
The docs tox environment handles the Sphinx dependencies and the Go API prebuild in one shot:
python3 -m tox -e docs
What CI validates¶
Check |
Purpose |
|---|---|
|
Unit and integration coverage across the Go codebase |
|
Lint hygiene |
|
Dependency and call-site vulnerability scan |
|
API markdown generation, docs validation, and Sphinx build |
Conventions¶
Keep Go files under the repo’s 300-line discipline where practical.
Mock at the boundary: subprocesses, IPC, filesystem, or external CLIs.
Prefer deterministic fixtures for
claude -pbehavior via cassette replay.Use package-level tests to enforce variant invariants, schema correctness, and migration behavior.
Coverage target¶
High confidence over vanity percentages. The important gates are variant-profile invariants, plan-store correctness, and safe supervisor behavior.
Integration test gating¶
Manual live checks require:
claudeCLI onPATH, authenticatedghCLI onPATH, authenticateda disposable repo or sandbox branch
Default CI stays hermetic and does not depend on a live Claude account.
Test plan (post-M1 rewrite)¶
internal/dbmigration and spend accountinginternal/variantsafety floors and model/tool invariantscmd/radioactive_ralphcommand wiringdocs generation and Sphinx publication