TEST-INFRA: [ci-pipeline-design] Use 'ruff format --check' in CI #1787

Open
opened 2026-04-02 23:49:49 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: chore/ci-ruff-format-check
  • Commit Message: chore(ci): use ruff format --check in CI pipeline
  • Milestone: v3.2.0
  • Parent Epic: #1678

Background and Context

The format nox session currently modifies files in place. In a CI environment, it is preferable to check for formatting issues without modifying files. Running ruff format in write mode during CI can mask formatting violations by silently fixing them rather than failing the build. The format session should be run with the --check flag in the CI workflow so that any unformatted file causes the pipeline to fail, enforcing formatting discipline at the point of contribution.

Expected Behavior

The CI pipeline runs ruff format --check (via nox -s format -- --check) and fails if any file is not correctly formatted, rather than silently reformatting files.

Acceptance Criteria

  • The CI workflow invokes the format nox session with the --check flag.
  • The CI job fails if any file does not pass the formatting check.
  • No files are modified in place by the CI pipeline during the format check.

Subtasks

  • Modify the CI workflow to run nox -s format -- --check.
  • Ensure that the CI job fails if the formatting check does not pass.
  • Verify the nox format session correctly passes --check through to ruff format.
  • Run nox (all default sessions), fix any errors.

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, 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.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • The CI pipeline runs ruff format --check.
  • The CI pipeline fails if any file is not correctly formatted.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `chore/ci-ruff-format-check` - **Commit Message**: `chore(ci): use ruff format --check in CI pipeline` - **Milestone**: v3.2.0 - **Parent Epic**: #1678 ## Background and Context The `format` nox session currently modifies files in place. In a CI environment, it is preferable to check for formatting issues without modifying files. Running `ruff format` in write mode during CI can mask formatting violations by silently fixing them rather than failing the build. The `format` session should be run with the `--check` flag in the CI workflow so that any unformatted file causes the pipeline to fail, enforcing formatting discipline at the point of contribution. ## Expected Behavior The CI pipeline runs `ruff format --check` (via `nox -s format -- --check`) and fails if any file is not correctly formatted, rather than silently reformatting files. ## Acceptance Criteria - The CI workflow invokes the `format` nox session with the `--check` flag. - The CI job fails if any file does not pass the formatting check. - No files are modified in place by the CI pipeline during the format check. ## Subtasks - [ ] Modify the CI workflow to run `nox -s format -- --check`. - [ ] Ensure that the CI job fails if the formatting check does not pass. - [ ] Verify the nox `format` session correctly passes `--check` through to `ruff format`. - [ ] Run `nox` (all default sessions), fix any errors. ## 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, 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. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - The CI pipeline runs `ruff format --check`. - The CI pipeline fails if any file is not correctly formatted. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-02 23:51:39 +00:00
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#1787
No description provided.