ouroboros/scripts
Anton Razzhigaev 915f93604d Add scripts/run_tests.py, the one fast local test battery
The documented local command (`make test`, CONTRIBUTING §4, README) was
`pytest tests/ -q --tb=short`: the whole default suite (23k tests) in a
single process, behind a stale "smoke tests" comment. An Ouroboros task
followed it, hit its 1200 s timeout and withheld its PR. The correct
recipe — a parallel `not serial` xdist pass, then the serial pass — lived
only inside the hermetic commit gate.

scripts/run_tests.py is the single entry point for every actor. A bare
call always runs the FULL battery: the node lane (a missing or too-old
node is a red NOT_RUN, never a silent skip), then every default-lane
test in ONE xdist run under `--dist loadgroup --serial-shards=N`.
tests/conftest.py gains that option: each serial FILE is pinned to one of
N file-sharded groups (one per four workers, at most four; four cores
keep a single group), so serial tests overlap the parallel ones while a
serial file still never splits across workers or runs beside another
file of its shard; other tests keep the scope loadscope uses. The option
defaults to 0 and is inert for CI and the commit gate, which keep the
two-pass split and stay the authority. `--sequential` keeps the gate's
marker split and xdist flags in two passes; extra arguments forward a
focused run. Marker exclusions and xdist flags are imported from
ouroboros.preflight_runner, never restated.

Measured on an 18-core Mac shared with other agents: the two-pass
battery took 649 s (parallel 203 s + serial 446 s); the one-run battery
took 217–287 s with identical verdicts (22 950 passed).

Also: `make test` now calls the script; CONTRIBUTING, README, the Build
& CI chapter, the architecture map and one sentence of prompts/SYSTEM.md
point at it and say which opt-in lanes it leaves out and what to record
when a full run could not finish; tests/test_plan_author_presentation.py
resolves node through ouroboros.preflight_node like the rest of the
suite instead of a bare PATH `node`; tests/test_run_tests_script.py pins
the recipe parity, the bounded shard count, bare call = full battery,
node NOT_RUN = red, and the grouping semantics.

Not changed: the commit gate and .github/workflows/ci.yml; the three
gate self-tests that wait out real 30/20 s timeouts (their slack exists
for nested-xdist startup on slow runners); no version carrier.

Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
2026-09-19 02:13:01 +03:00
..
betterleaks_platform_smoke.py feat: add secret-safe skill publishing 2026-08-21 03:46:17 +03:00
build_android_release.py feat(android): carry the experimental host onto the current core 2026-09-13 22:40:38 +03:00
build_appimage.sh fix(packaging): harden AppImage runtime lifecycle 2026-08-11 04:21:16 +03:00
build_linux_packages.sh fix(release): bind the systemd unit to package proof 2026-08-13 01:19:14 +03:00
build_repo_bundle.py fix: harden cross-platform release packaging 2026-08-11 17:18:31 +03:00
carrier_rebase_helper.py v7next F2.4: return the D34 carrier engine and re-split the update planner 2026-08-31 10:38:34 +00:00
check_domains.py Retire completed campaign artifacts and keep repository reports explicit 2026-09-18 01:07:51 +03:00
claudexor_platform_smoke.py Keep managed smoke fixtures within Unix socket path limits 2026-09-10 08:00:11 +03:00
cleanup_test_pollution.py v5.15.0-rc.8: quality dx closed-loop skills wave on top of rc.7 2026-05-11 03:32:41 +03:00
contributor_review_evidence.py fix(review): prepare and recover authoritative review candidates 2026-09-06 12:31:01 +00:00
domain_graph.py Retire completed campaign artifacts and keep repository reports explicit 2026-09-18 01:07:51 +03:00
domain_report.py Retire completed campaign artifacts and keep repository reports explicit 2026-09-18 01:07:51 +03:00
download_node_standalone.ps1 rc(reliability): close subagent crash/ghost/spinner classes; provider-agnostic review; bundled node 2026-05-29 22:48:13 +03:00
download_node_standalone.sh rc(reliability): close subagent crash/ghost/spinner classes; provider-agnostic review; bundled node 2026-05-29 22:48:13 +03:00
download_python_standalone.ps1 fix(deps): complete uv migration contracts 2026-08-11 06:34:54 +03:00
download_python_standalone.sh build(deps): manage Python dependencies with uv 2026-08-11 05:28:21 +03:00
download_ripgrep_standalone.ps1 fix(ci): release-lane smoke paths and ripgrep pin parsing 2026-08-05 00:13:49 +03:00
download_ripgrep_standalone.sh feat(code-intelligence): add query_code and clearer evolution settings 2026-06-09 07:46:59 +03:00
fetch_claudexor_runtime.py Managed Claudexor runtime delivery: exact pin, single Connect, staged updates 2026-08-06 15:15:09 +03:00
pyi_rth_pythonnet.py chore(build): import build artifacts from main + adapt spec for Phase 5 skills 2026-04-22 14:31:53 +03:00
rc_audit.py Retire completed campaign artifacts and keep repository reports explicit 2026-09-18 01:07:51 +03:00
regenerate_inventories.py Retire completed campaign artifacts and keep repository reports explicit 2026-09-18 01:07:51 +03:00
regenerate_size_ratchet.py Move size-gate enforcement to official CI; local surfaces warn 2026-08-21 04:46:25 +00:00
release_proof.py Qualify experimental Android delivery without blocking desktop releases 2026-09-18 02:10:23 +03:00
run_external_review.py fix(review): align contribution sizing and diagnostics with retrieval 2026-09-18 01:35:59 +03:00
run_plan_review.py Resolve only declared file targets as the plan's constitutional fact 2026-09-15 17:08:58 +03:00
run_tests.py Add scripts/run_tests.py, the one fast local test battery 2026-09-19 02:13:01 +03:00
smoke_linux_packages.sh feat: add secret-safe skill publishing 2026-08-21 03:46:17 +03:00
validate_scope_receipt.py fix: preserve review evidence and tool delivery semantics 2026-09-09 15:18:56 +03:00