Runbook: Tests Failing
Trigger
make testfails.make verifyfails on test stage.- CI pipeline reports failing tests.
Fast triage
- Run full suite:
make test. - Run failing file/node only:
make test-one path=tests/.... - Check static checks:
make lint-check,make type-check.
Most common causes
- API shape changed; tests still expect old fields or payloads.
- Fixtures are out of date after schema or model changes.
- Local DB was not migrated before tests.
- Flaky order or shared state between tests.
Recovery steps
- Ensure DB state is up to date:
make migrate. - Re-run targeted test:
make test-one path=.... - Fix fixture/data setup in
tests/conftest.pyif schema changed. - Align assertions with current error contract (
code,key,source). - Re-run full suite:
make test.
Exit criteria
make testpasses locally.make verifypasses.- Any changed behavior is reflected in docs/examples.
Follow-up
- If the fix changes policy (contracts, versioning, test rules), add or update an ADR.
- If it is a new failure pattern, add a short note to this runbook.
Page history
| Date | Change | Author |
|---|---|---|
| Added Page history section (repository baseline). | Ivan Boyarkin |