Testing

Every change ships with a test. The commands and test sets are in Testing. This page says what each kind of change needs.

Which test

You changedAdd
A routeA test in tests/golden.rs: the happy path, a missing token, a wrong scope
Something per accountA test in tests/accounts.rs that account B cannot see account A's data
A tool or pluginA case in the plugin's tests/*.json, and a golden test if the gate is involved
A risky tag or the gateA golden test that the act waits for approval
Outside content handlingAn injection case: a hidden order in the content does nothing
A prompt or guideA model test case (agent-core eval) on the smallest model
Scrubbing or loggingA unit test that the secret does not come out
A bugA test that fails before the fix and passes after
The app pageCheck it still calls NativeApp.pageReady() (App structure)

Good tests

Model tests

Prompts change what the model does, so test them with the model. Run on the smallest model you support, with real tool calls. If the small model gets it wrong, fix the guide or the code, not the test.

Gaps