Files

1.9 KiB

Always invoke tests via uv run python scripts/run_tests_batched.py — never uv run pytest directly

What it says

Tier 2 autonomous execution (and any other automation that wants parallel runs, tier filtering, and a summary table) MUST invoke the project's batched test runner: uv run python scripts/run_tests_batched.py. Direct uv run pytest calls are forbidden for the same reasons raw git checkout is forbidden — they bypass the layer that the project's live_gui tests depend on.

Why

The batched runner provides:

  • Tier-based filtering (--tier tier3, --tier tier4). Tests are organized into tiers so a per-task verification only runs the tier relevant to the change.
  • Parallelization via xdist — the runner wires pytest-xdist so independent test files execute concurrently.
  • A summary table at the end (per-tier pass/fail/skip counts) that direct pytest does not produce.

Direct pytest is slow and bypasses the tiering that the live_gui tests (session-scoped subprocess tests) depend on for batch-isolation correctness.

Targeted vs full tier

Prefer targeted tier runs:

uv run python scripts/run_tests_batched.py --tier tier3
uv run python scripts/run_tests_batched.py --filter test_<specific_file>

The full 11-tier batch is for the USER to run after merge review, not for per-task verification. Running the full batch every time wastes 20+ minutes and the output is too large to be useful in context.

Output redirection (HARD RULE)

NEVER filter test output. Do NOT pipe through Select-Object, | Select -First N, | Select -Last N, head, tail, or any truncation filter. ALWAYS redirect to a log file:

uv run python scripts/run_tests_batched.py > tests/artifacts/tier2_state/<track>/test_run_<phase>_<task>.log 2>&1

Then read the log file with manual-slop_read_file or grep to find the relevant sections. The log file is your full record; you can search it without re-running.