[AUTO-INF-3] Enforce 32-process parallelism in CI nox test jobs #9683

Open
opened 2026-04-15 03:12:40 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit message: chore(ci): enforce 32-way parallelism for nox test jobs
  • Branch name: chore/enforce-32-proc-nox-tests

Background and Context

The CleverAgents CONTRIBUTING.md Testing Infrastructure Requirements state that all automated test suites must execute with 32 parallel processes ("Coverage threshold: 97%; 32 parallel processes for test execution"). However, the current CI and nightly workflows rely on the _default_processes() helper in noxfile.py, which only uses the host CPU count unless TEST_PROCESSES or explicit --processes flags are provided. On shared Forgejo runners the Linux containers expose two virtual CPUs, so nox -s unit_tests and nox -s integration_tests fan out to just two workers instead of the required thirty-two.

Examples:

  • .forgejo/workflows/ci.yml unit test job runs nox -s unit_tests with no TEST_PROCESSES override, so _behave_parallel_args inserts --processes 2.
  • .forgejo/workflows/ci.yml integration job likewise omits TEST_PROCESSES / --processes, so the Robot Framework pabot runner launches with --processes 2.
  • .forgejo/workflows/nightly-quality.yml repeats the same pattern when invoking the nightly suite.

Because the CI configuration never sets the mandated 32-way parallelism, coverage and timing statistics collected in automation do not reflect the production configuration expected in the milestones. Bugs that only appear under high parallel fan-out (for example database isolation issues, Alembic template reuse, or pabot resource contention) can slip through until late-stage validation.

Expected Behavior

  • All CI and scheduled workflows set TEST_PROCESSES=32 (and PABOT_PROCESSES=32 where needed) before invoking the nox unit_tests and integration_tests sessions.
  • The nox helpers continue to allow developers to override the value locally, but automation enforces the documented 32-process standard.
  • Parallel-related regressions (deadlocks, template database race conditions, Robot Framework resource contention) surface during standard CI runs instead of only in production-scale rehearsals.

Acceptance Criteria

  • .forgejo/workflows/ci.yml exports 32-way parallelism for the unit_tests and integration_tests jobs (environment variables or explicit --processes 32 arguments).
  • .forgejo/workflows/nightly-quality.yml runs the Behave and Robot suites with 32 processes.
  • Documentation (CONTRIBUTING.md or developer docs) clarifies that CI enforces the 32-process baseline and how to override locally when hardware differs.
  • Resulting CI run shows the Behave runner reporting --processes 32 and pabot launching 32 workers.

Subtasks

  • Update CI workflow jobs to set TEST_PROCESSES=32 (and PABOT_PROCESSES=32 if needed) before calling the nox sessions.
  • Update the nightly-quality workflow with the same overrides.
  • Add a short note in CONTRIBUTING.md (Testing Infrastructure Requirements) linking to the CI configuration so the requirement is discoverable.
  • Run the updated workflows (or dry-run locally) to confirm 32 parallel workers are spawned.
  • Open a PR with the adjustments.

Definition of Done

This issue is complete when the main branch CI and nightly workflows reliably execute unit_tests and integration_tests with 32 workers, the supporting documentation is updated, and the change is merged with all quality gates passing.

Duplicate Check

  • Open issues search TEST_PROCESSES: no matching issues.
  • Open issues search parallel processes: only planning or architecture tickets (for example #9638, #9555) unrelated to test infrastructure.
  • Closed issues search TEST_PROCESSES: no matches.
  • Existing [AUTO-INF-3] issue (#9541) targets Behave database fixture consolidation, not CI parallelism.
  • Coverage threshold regression is already tracked by #9597; this proposal focuses solely on enforcing the documented 32-process concurrency requirement.

Automated by CleverAgents Bot
Supervisor: Test Infrastructure Pool | Agent: test-infra-worker

## Metadata - **Commit message:** `chore(ci): enforce 32-way parallelism for nox test jobs` - **Branch name:** `chore/enforce-32-proc-nox-tests` ## Background and Context The CleverAgents CONTRIBUTING.md Testing Infrastructure Requirements state that all automated test suites must execute with 32 parallel processes ("Coverage threshold: 97%; 32 parallel processes for test execution"). However, the current CI and nightly workflows rely on the `_default_processes()` helper in `noxfile.py`, which only uses the host CPU count unless `TEST_PROCESSES` or explicit `--processes` flags are provided. On shared Forgejo runners the Linux containers expose two virtual CPUs, so `nox -s unit_tests` and `nox -s integration_tests` fan out to just two workers instead of the required thirty-two. Examples: - `.forgejo/workflows/ci.yml` unit test job runs `nox -s unit_tests` with no `TEST_PROCESSES` override, so `_behave_parallel_args` inserts `--processes 2`. - `.forgejo/workflows/ci.yml` integration job likewise omits `TEST_PROCESSES` / `--processes`, so the Robot Framework pabot runner launches with `--processes 2`. - `.forgejo/workflows/nightly-quality.yml` repeats the same pattern when invoking the nightly suite. Because the CI configuration never sets the mandated 32-way parallelism, coverage and timing statistics collected in automation do not reflect the production configuration expected in the milestones. Bugs that only appear under high parallel fan-out (for example database isolation issues, Alembic template reuse, or pabot resource contention) can slip through until late-stage validation. ## Expected Behavior - All CI and scheduled workflows set `TEST_PROCESSES=32` (and `PABOT_PROCESSES=32` where needed) before invoking the nox `unit_tests` and `integration_tests` sessions. - The nox helpers continue to allow developers to override the value locally, but automation enforces the documented 32-process standard. - Parallel-related regressions (deadlocks, template database race conditions, Robot Framework resource contention) surface during standard CI runs instead of only in production-scale rehearsals. ## Acceptance Criteria - [ ] `.forgejo/workflows/ci.yml` exports 32-way parallelism for the `unit_tests` and `integration_tests` jobs (environment variables or explicit `--processes 32` arguments). - [ ] `.forgejo/workflows/nightly-quality.yml` runs the Behave and Robot suites with 32 processes. - [ ] Documentation (`CONTRIBUTING.md` or developer docs) clarifies that CI enforces the 32-process baseline and how to override locally when hardware differs. - [ ] Resulting CI run shows the Behave runner reporting `--processes 32` and pabot launching 32 workers. ## Subtasks - [ ] Update CI workflow jobs to set `TEST_PROCESSES=32` (and `PABOT_PROCESSES=32` if needed) before calling the nox sessions. - [ ] Update the nightly-quality workflow with the same overrides. - [ ] Add a short note in `CONTRIBUTING.md` (Testing Infrastructure Requirements) linking to the CI configuration so the requirement is discoverable. - [ ] Run the updated workflows (or dry-run locally) to confirm 32 parallel workers are spawned. - [ ] Open a PR with the adjustments. ## Definition of Done This issue is complete when the main branch CI and nightly workflows reliably execute `unit_tests` and `integration_tests` with 32 workers, the supporting documentation is updated, and the change is merged with all quality gates passing. ### Duplicate Check - Open issues search `TEST_PROCESSES`: no matching issues. - Open issues search `parallel processes`: only planning or architecture tickets (for example #9638, #9555) unrelated to test infrastructure. - Closed issues search `TEST_PROCESSES`: no matches. - Existing `[AUTO-INF-3]` issue (#9541) targets Behave database fixture consolidation, not CI parallelism. - Coverage threshold regression is already tracked by #9597; this proposal focuses solely on enforcing the documented 32-process concurrency requirement. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure Pool | Agent: test-infra-worker
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#9683
No description provided.