Install editable with dev tools (same as CI):
pip install -e ".[dev]" # matches CI; add `tui` if you use `sage tui` locallyCI runs Ruff on src/sage and tests. Run locally before pushing:
ruff check src/sage tests
ruff format --check src/sage testsAuto-fix style:
ruff check src/sage tests --fix
ruff format src/sage testsConfig: pyproject.toml ([tool.ruff]).
CI runs mypy on an allowlisted set of modules (see the “Mypy” step in .github/workflows/ci.yml). If you touch those files, run the same command locally so CI stays green.
Run unit tests (default for every PR):
pytest tests/ -qLive / shipping bar (real Ollama, not stubs): see docs/LIVE_TESTING.md and run ./scripts/live_verify.sh locally. CI runs a live job that installs Ollama and executes pytest tests/integration -m ollama plus sage eval smoke.
Mocked greenfield wiring-only test: pytest tests/e2e/ — fast regression, not a substitute for live verification.
Run benchmark suite (Phase 4 contract):
sage benchQuick smoke run (with venv activated so sage is on PATH):
sage run "health check" --auto --silentIf sage is not installed on PATH, use python -m sage.cli.main … from the repo root with pip install -e ".[dev]" active.
Prefer adding unit tests that validate:
- events emitted to the session journal (via
log_event), - workflow routing correctness (HITL, scheduler termination),
- and deterministic fallbacks when Ollama is unavailable.
Files to look at:
src/sage/orchestrator/workflow.pysrc/sage/observability/trajectory_logger.pysrc/sage/benchmarks/runner.py
Users (and contributors) swap Ollama models via src/sage/config/models.yaml. See docs/models.md for recommended tiers and benchmark-only timeout variables (SAGE_BENCH*).
Strict FIFO event processing: docs/event_bus.md, implementation in src/sage/orchestrator/event_bus.py. Unit coverage: tests/test_event_bus_strict_unit.py.
- SAGE fine-tuned weights: ship as another Ollama tag (or HTTP adapter) and point
models.yamlat it — same plug-and-play mechanism as any user model. - Phase 5 offline RL: requires sufficient logged trajectories and training pipeline work; see
docs/research_notes.mdanddocs/getting_started.md.
- CI workflow:
.github/workflows/ci.yml - Docker simulator smoke:
.github/workflows/docker-sim-smoke.yml - Local reproducibility matrix:
docs/verification_matrix.md - Release process checklist:
docs/release_checklist.md