[AUTO-INF-4] Fix nox configuration for lint session #8305

Closed
opened 2026-04-13 08:19:29 +00:00 by HAL9000 · 1 comment
Owner

Summary

  • nox -s lint currently fails during environment creation because the session pins Ruff to >=0.15,<0.16, a version range that has never been published to PyPI.
  • The same invalid constraint appears in pyproject.toml under the dev optional dependency group, so every developer invoking pip install .[dev] hits the same resolver error.
  • Because the session never finishes the install step, the actual lint command (ruff check …) never runs, leaving CI without lint coverage.

Analysis

  • Ruff jumped from the 0.0.x series to 0.1.0 and later minor releases (0.5.x, 0.6.x, …); there was never a 0.15.0 release. Pip interprets the constraint >=0.15,<0.16 as >=0.15.0,<0.16.0 and fails with No matching distribution found for ruff>=0.15,<0.16.
  • The failure is reproducible both inside the Nox session (session.install) and when installing the project’s dev extras. Because nox.options.error_on_external_run = True, the session exits immediately after the failed install, so linting is effectively disabled in automation.
  • Aligning the version range with an actually published Ruff release (e.g. the current 0.5.x line) resolves the installation error and restores lint coverage.

Proposed Fix

# noxfile.py
@nox.session(python=DEFAULT_PYTHON, reuse_venv=True, venv_backend="uv")
def lint(session: nox.Session) -> None:
    """Check code formatting and linting."""
    session.install("ruff>=0.5.0,<0.6.0")
    session.run("ruff", "check", "src", "scripts", "examples", "features", "robot")
# pyproject.toml
[project.optional-dependencies]
dev = [
    # Code formatting and linting
    "ruff>=0.5.0,<0.6.0",
    
]
  • Updating both locations keeps local dev environments and the Nox session in sync and ensures they consume a version of Ruff that supports Python 3.13, matching the project’s interpreter baseline.

Duplicate Check

  • Searched open issues in cleveragents/cleveragents-core for the keyword "nox" via Forgejo API; no existing reports cover this configuration fault.

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

## Summary - `nox -s lint` currently fails during environment creation because the session pins Ruff to `>=0.15,<0.16`, a version range that has never been published to PyPI. - The same invalid constraint appears in `pyproject.toml` under the `dev` optional dependency group, so every developer invoking `pip install .[dev]` hits the same resolver error. - Because the session never finishes the install step, the actual lint command (`ruff check …`) never runs, leaving CI without lint coverage. ### Analysis - Ruff jumped from the `0.0.x` series to `0.1.0` and later minor releases (`0.5.x`, `0.6.x`, …); there was never a `0.15.0` release. Pip interprets the constraint `>=0.15,<0.16` as `>=0.15.0,<0.16.0` and fails with `No matching distribution found for ruff>=0.15,<0.16`. - The failure is reproducible both inside the Nox session (`session.install`) and when installing the project’s `dev` extras. Because `nox.options.error_on_external_run = True`, the session exits immediately after the failed install, so linting is effectively disabled in automation. - Aligning the version range with an actually published Ruff release (e.g. the current `0.5.x` line) resolves the installation error and restores lint coverage. ### Proposed Fix ```python # noxfile.py @nox.session(python=DEFAULT_PYTHON, reuse_venv=True, venv_backend="uv") def lint(session: nox.Session) -> None: """Check code formatting and linting.""" session.install("ruff>=0.5.0,<0.6.0") session.run("ruff", "check", "src", "scripts", "examples", "features", "robot") ``` ```toml # pyproject.toml [project.optional-dependencies] dev = [ # Code formatting and linting "ruff>=0.5.0,<0.6.0", … ] ``` - Updating both locations keeps local dev environments and the Nox session in sync and ensures they consume a version of Ruff that supports Python 3.13, matching the project’s interpreter baseline. ### Duplicate Check - Searched open issues in `cleveragents/cleveragents-core` for the keyword "nox" via Forgejo API; no existing reports cover this configuration fault. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure Pool | Agent: test-infra-worker
Owner

superseded by next cycle

superseded by next cycle
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#8305
No description provided.