Imported from zxcFedka/GAICA_bot (
autonomy/tests/AGENTS.md). Install upstream withnpx skills add zxcFedka/GAICA_bot --skill tests. Copyright stays with the author.
AGENTS.md — autonomy/tests/
Unit and narrow integration tests for the autonomy loop components.
Existing tests
| Test | Covers |
|---|---|
test_orchestrator.py |
Orchestrator happy-path flow, generation failure handling |
test_policy.py |
Direct tier-gate decisions and promotion/rejection branches |
test_evaluator.py |
Evaluator helpers and canonical gaica_eval_v1 aggregation |
test_storage.py |
SQLite candidate/evaluation/champion round-trip |
test_selector.py |
Optuna trial completion/failure reporting |
test_runtime_adapter.py |
Runtime CLI execution, parsing, timeout recovery |
test_context_assembly.py |
Context bundle generation and on-demand references |
test_config.py |
Profile inheritance for local / codex_local / nightly |
test_git_export.py |
Worktree commit path and no-op export on unchanged code |
test_build_dashboard.py |
Dashboard report/html build from stored loop state |
test_console_logging.py |
Rotating autonomy log/error log emission |
test_refinement.py |
Refinement loop: quick eval, feedback build, ref file writes |
Rules
- Run:
python -m pytest autonomy/tests/ -v - Tests must not require real LLM calls — use mock runtime
- Tests must not require a running gaica_sandbox — mock evaluator results
- Prefer module-scoped tests; allow narrow integration tests where contracts cross module boundaries
- Keep policy, evaluator schema, runtime session contract, and config-profile invariants under direct tests
