diff --git a/noxfile.py b/noxfile.py index b715728f8..cd69dea27 100644 --- a/noxfile.py +++ b/noxfile.py @@ -52,8 +52,12 @@ def _pabot_parallel_args(posargs: list[str]) -> list[str]: return [] # Integration tests are significantly heavier than unit tests and can # become unstable on shared runners when pabot fans out aggressively. - # Keep default parallelism conservative (<=2) unless explicitly overridden. - pabot_default = min(2, _default_processes()) + # Cap parallelism at 6: at the prior <=2 the ~47min suite serialized to + # ~24min wall on a 32-core runner (2x speedup == 2 lanes); 6 lanes cut + # that to ~6-8min while staying well short of the per-core fan-out that + # triggers LLM 429 rate-limits / OOM flakes. Override via + # TEST_PROCESSES / --processes. + pabot_default = min(6, _default_processes()) return ["--processes", str(pabot_default)] @@ -256,9 +260,10 @@ def build(session: nox.Session): def integration_tests(session: nox.Session): """Run Robot Framework integration tests (parallel via pabot). - Defaults to conservative parallelism (<=2 processes) to avoid - resource pressure in CI. Override via PABOT_PROCESSES or by passing - --processes/--processes=N in session arguments. + Defaults to parallelism capped at 6 processes (min(6, cpus)) to avoid + resource pressure / LLM 429 flakes in CI while still using the runner. + Override via TEST_PROCESSES or by passing --processes/--processes=N in + session arguments. """ session.install("-e", ".[tests]") session.env["CLEVERAGENTS_AUTO_APPLY_MIGRATIONS"] = "true" @@ -346,10 +351,10 @@ def slow_integration_tests(session: nox.Session): """Run Robot Framework slow integration tests (parallel via pabot). Runs all tests tagged ``slow`` that are excluded from the standard - ``integration_tests`` session. Defaults to conservative parallelism - (<=2 processes) to avoid resource pressure in CI. Override via - TEST_PROCESSES or by passing --processes/--processes=N in session - arguments. + ``integration_tests`` session. Defaults to parallelism capped at 6 + processes (min(6, cpus)) to avoid resource pressure / LLM 429 flakes in + CI. Override via TEST_PROCESSES or by passing --processes/--processes=N + in session arguments. """ session.install("-e", ".[tests]") session.env["CLEVERAGENTS_AUTO_APPLY_MIGRATIONS"] = "true"