Skip to content

Commit 68de9aa

Browse files
committed
docs(tests): add targeted test command matrix to AGENTS.md
1 parent 9e56940 commit 68de9aa

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ dump the full environment, and mask any credential-shaped value before logging
145145
This project is managed with [`uv`](https://docs.astral.sh/uv/) (see `uv.lock`
146146
and `pyproject.toml`). All test and verification invocations must be prefixed with `uv run`.
147147
Never invoke `pytest`, `python`, or `python -m pytest` directly without the `uv run`
148+
prefix — doing so bypasses the project's locked, reproducible virtual environment.
149+
148150
When running tests in parallel with `pytest-xdist` (`-n auto`), always launch
149151
the test suite with `--dist=loadfile` to ensure proper test file isolation across workers.
150152

@@ -155,12 +157,18 @@ uv run pytest tests/ -m "local or unit" -n auto --dist=loadfile --tb=short
155157
uv run pytest tests/test_tls_enforcement.py -v
156158
uv run pytest --cov=src --cov-report=term-missing
157159
uv run python proof/model.py
160+
```
161+
162+
Incorrect (do not suggest):
163+
```bash
158164
pytest
159165
python -m pytest
160166
pytest -n auto # Missing --dist=loadfile and uv run prefix
161167
python proof/model.py
162168
```
163169

170+
This applies to all agents, contributors, and CI documentation examples.
171+
164172
---
165173

166174
## Deployment Rules
@@ -330,6 +338,24 @@ Always launch the test suite with `--dist=loadfile` to ensure proper test file i
330338
| Scope / Purpose | Canonical Command |
331339
|---|---|
332340
| **Single test file** | `uv run pytest tests/test_tls_enforcement.py -v` |
341+
| **Specific test method** | `uv run pytest tests/test_tls_enforcement.py::TestTlsProtocolStandards::test_default_client_context_minimum_version -v` |
342+
| **Adversarial / Red-team unit tests** | `uv run pytest tests/red_team/ -m "red_team and not integration" -v` |
343+
| **US Federal region posture** | `CAGE_DEPLOYMENT_REGION=US_FED uv run pytest tests/ -m us_fed -v` |
344+
| **EU ECB region posture** | `CAGE_DEPLOYMENT_REGION=EU_ECB uv run pytest tests/ -m eu_ecb -v` |
345+
| **APAC MAS region posture** | `CAGE_DEPLOYMENT_REGION=APAC_MAS uv run pytest tests/ -m apac_mas -v` |
346+
| **No-Direct-Bind BFS model proof** | `uv run python proof/model.py && uv run pytest tests/test_no_direct_bind_proof.py -v` |
347+
| **Distributed CBF formal proof** | `uv run python -m proof.distributed_cbf_model && uv run pytest proof/distributed_cbf_model.py -v` |
348+
| **Static analysis & formatting** | `uv run ruff check . && uv run ruff format --check .` |
349+
| **Type checking** | `uv run mypy src/` |
350+
| **Bandit SAST security scan** | `uv run bandit -r src/ -c pyproject.toml -ll` |
351+
| **STPA artifact freshness** | `uv run python scripts/check_stpa_freshness.py --verbose` |
352+
| **Langfuse posture validation** | `uv run python scripts/verify_langfuse_posture.py --dry-run --posture development` |
353+
354+
### Full Integration Suite Against Live GKE
355+
356+
The canonical way to run the full integration test suite against the live GKE dev cluster:
357+
358+
```bash
333359
# 1. Establish port-forwards to live GKE dev cluster (keep running in background)
334360
bash scripts/port_forward_dev.sh
335361

0 commit comments

Comments
 (0)