small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
albedo robot-docs testing.md

# Test execution [test.sh](../test.sh) is the pre-commit gate. With no arguments it selects Python end-to-end scenarios affected by the change and runs Go end-to-end tests for CLI changes. `./test.sh --full` runs all end-to-end scenarios and the web check. Manual tests under `test/manual` are opt-in. Run repository scripts from the repository root inside `nix develop`. Run the daemon's `gleam test` from `apps/albedo`, or use `nix develop -c sh -c 'cd apps/albedo && gleam test'` from the root. The [kernel state upgrade scenario](../e2e/kernel_state_test.py) can run the replacement daemon’s kernel on a second CPython minor. Set `ALBEDO_TEST_UPGRADE_PYTHON` to its absolute interpreter path, with the locked kernel dependencies installed, when running the scenario or the full gate. Without that setting the test exercises different and missing writer tags on the development shell’s interpreter. ## Test tiers The [test policy](writing-tests.md) puts each check in the cheapest tier that can observe its defect. This table maps a tier to where it runs. | Tier | What it checks | Where it lives | Gate suite | | ------------------------------ | ------------------------------------------------ | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | 1. Pure logic | One function, by example or property | `apps/albedo/test`, each package's `test/`, Go `_test.go`, `native/render` | `gleam test`, `workspace packages`, `go test`, the `cargo test` before the suites | | 2. State machines in process | Operation sequences against a model | the same places | the same suites …