TEST-INFRA: [ci-execution-time] Optimize default nox run #2282

Closed
opened 2026-04-03 12:48:31 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: chore/ci-nox-parallel-sessions
  • Commit Message: chore(ci): explore parallel execution of independent nox sessions
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The default nox run executes all sessions sequentially. As the project grows, this leads to increasingly long CI execution times because independent quality-gate sessions (linting, formatting, type checking) must wait for each other even though they have no data dependencies.

Current Behavior

Running nox (the default session set) executes every session one after another in a single sequential pipeline. Sessions such as lint, format, and typecheck are entirely independent of each other — none of them produces output that another consumes — yet they are forced to run serially, adding unnecessary wall-clock time to every CI run.

Expected Behavior

Independent nox sessions that do not share inputs or outputs should be able to run in parallel, reducing the total wall-clock time of the default nox run. For example, lint, format, and typecheck are strong candidates for parallel execution since they all operate on the same static source tree and produce no side-effects that affect one another.

Acceptance Criteria

  • An investigation is completed to identify which nox sessions are safe to run in parallel (no shared mutable state, no ordering dependencies).
  • A parallelisation strategy is proposed and documented (e.g., using nox --sessions ... & in CI, a nox plugin, or a CI matrix).
  • At minimum, lint, format, and typecheck are confirmed as parallelisable and the chosen mechanism is implemented.
  • The default nox run continues to pass all sessions and coverage remains ≥ 97%.
  • CI wall-clock time for the quality-gate phase is measurably reduced.

Supporting Information

Subtasks

  • Audit all default nox sessions and classify each as parallelisable or sequential (with rationale)
  • Choose and document the parallelisation mechanism (CI matrix, background jobs, nox plugin, etc.)
  • Implement parallel execution for lint, format, and typecheck sessions
  • Verify no session produces side-effects that break other sessions when run concurrently
  • Update features/ci_workflow_validation.feature if the CI workflow file is modified
  • Run nox (all default sessions), fix any errors
  • Verify coverage ≥ 97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (chore(ci): explore parallel execution of independent nox sessions), followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (chore/ci-nox-parallel-sessions).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage ≥ 97%.

Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: ca-new-issue-creator

## Metadata - **Branch**: `chore/ci-nox-parallel-sessions` - **Commit Message**: `chore(ci): explore parallel execution of independent nox sessions` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The default `nox` run executes all sessions sequentially. As the project grows, this leads to increasingly long CI execution times because independent quality-gate sessions (linting, formatting, type checking) must wait for each other even though they have no data dependencies. ## Current Behavior Running `nox` (the default session set) executes every session one after another in a single sequential pipeline. Sessions such as `lint`, `format`, and `typecheck` are entirely independent of each other — none of them produces output that another consumes — yet they are forced to run serially, adding unnecessary wall-clock time to every CI run. ## Expected Behavior Independent nox sessions that do not share inputs or outputs should be able to run in parallel, reducing the total wall-clock time of the default `nox` run. For example, `lint`, `format`, and `typecheck` are strong candidates for parallel execution since they all operate on the same static source tree and produce no side-effects that affect one another. ## Acceptance Criteria - [ ] An investigation is completed to identify which nox sessions are safe to run in parallel (no shared mutable state, no ordering dependencies). - [ ] A parallelisation strategy is proposed and documented (e.g., using `nox --sessions ... &` in CI, a nox plugin, or a CI matrix). - [ ] At minimum, `lint`, `format`, and `typecheck` are confirmed as parallelisable and the chosen mechanism is implemented. - [ ] The default `nox` run continues to pass all sessions and coverage remains ≥ 97%. - [ ] CI wall-clock time for the quality-gate phase is measurably reduced. ## Supporting Information - Related Epic: #1678 — CI Execution Time Optimization - Sibling issues exploring other CI time optimisations: #2263, #2274, #2277, #2278 - Nox documentation on session selection: https://nox.thea.codes/en/stable/config.html ## Subtasks - [ ] Audit all default nox sessions and classify each as parallelisable or sequential (with rationale) - [ ] Choose and document the parallelisation mechanism (CI matrix, background jobs, nox plugin, etc.) - [ ] Implement parallel execution for `lint`, `format`, and `typecheck` sessions - [ ] Verify no session produces side-effects that break other sessions when run concurrently - [ ] Update `features/ci_workflow_validation.feature` if the CI workflow file is modified - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage ≥ 97% via `nox -s coverage_report` ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`chore(ci): explore parallel execution of independent nox sessions`), followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`chore/ci-nox-parallel-sessions`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage ≥ 97%. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-03 12:49:10 +00:00
Author
Owner

Closing as duplicate of #2245. Both issues describe the same work: exploring parallel execution of independent nox sessions. They share the same branch name (chore/ci-nox-parallel-sessions) and the same commit message (chore(ci): explore parallel execution of independent nox sessions). Issue #2245 was created first.

Please track this work in #2245.


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Closing as duplicate of #2245. Both issues describe the same work: exploring parallel execution of independent nox sessions. They share the same branch name (`chore/ci-nox-parallel-sessions`) and the same commit message (`chore(ci): explore parallel execution of independent nox sessions`). Issue #2245 was created first. Please track this work in #2245. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
freemo reopened this issue 2026-04-03 12:51:56 +00:00
Author
Owner

Closing as duplicate of #2293.

This issue ("Optimize default nox run") covers the same scope as #2293 ("Parallelize Nox Sessions in CI"). Consolidating to avoid duplicate work.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Closing as duplicate of #2293. This issue ("Optimize default nox run") covers the same scope as #2293 ("Parallelize Nox Sessions in CI"). Consolidating to avoid duplicate work. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

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