Files
romm/AGENTS.md
Georges-Antoine Assi e122209253 docs(agents): never run the full backend suite locally
A bare `uv run pytest` over backend/ takes 20+ minutes and floods the
context of an agent that only changed a handful of modules, so AGENTS.md
now tells agents to select the tests affected by the diff and leave
full-suite coverage to CI.

The three places that documented the pytest command all offered "or all
with -vv" as an equally valid option, which undercut the new rule, so
they now point at affected files only. The `[path/file]` placeholder
became `<path/file>` in the same pass: square brackets read as an
optional argument, which invited the bare invocation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-03 12:15:28 -04:00

26 lines
1.1 KiB
Markdown

# Repository Instructions
Read and follow [CLAUDE.md](CLAUDE.md) for all repository instructions.
## Never run the full backend test suite locally
A bare `uv run pytest` (or `pytest -vv`) over `backend/` takes 20+ minutes and burns a
huge number of tokens on output. Don't do it, even to "double check" at the end.
Instead, select the tests affected by the change and run only those:
```bash
cd backend
uv run pytest tests/path/to/test_file.py # one file
uv run pytest tests/path/to/test_file.py::test_name # one test
uv run pytest tests/handler/ tests/endpoints/ # affected areas
uv run pytest -k "scan or queue" # by name pattern
```
Pick the targets from the diff: the test file mirroring each changed module
(`backend/<area>/x.py` → `backend/tests/<area>/test_x.py`), plus the tests of the
callers of anything whose signature or behavior you changed (`grep` for the symbol).
CI runs the whole suite on the PR (`pytest.yml`, MariaDB + PostgreSQL). That is the
place for full-suite coverage; local runs stay scoped.