@@ -145,6 +145,8 @@ dump the full environment, and mask any credential-shaped value before logging
145145This project is managed with [ ` uv ` ] ( https://docs.astral.sh/uv/ ) (see ` uv.lock `
146146and ` pyproject.toml ` ). All test and verification invocations must be prefixed with ` uv run ` .
147147Never 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+
148150When running tests in parallel with ` pytest-xdist ` (` -n auto ` ), always launch
149151the 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
155157uv run pytest tests/test_tls_enforcement.py -v
156158uv run pytest --cov=src --cov-report=term-missing
157159uv run python proof/model.py
160+ ```
161+
162+ Incorrect (do not suggest):
163+ ``` bash
158164pytest
159165python -m pytest
160166pytest -n auto # Missing --dist=loadfile and uv run prefix
161167python 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)
334360bash scripts/port_forward_dev.sh
335361
0 commit comments