From d293cf1ce9808f39311dd946a1697a53b4db7c7e Mon Sep 17 00:00:00 2001 From: Codex Automation Date: Thu, 23 Jul 2026 17:34:11 -0500 Subject: [PATCH 1/5] chore(deps): sync ruff 0.16.0 pins --- .github/workflows/autofix-versions.env | 2 +- pyproject.toml | 2 +- requirements.lock | 2 +- templates/consumer-repo/.github/workflows/autofix-versions.env | 2 +- .../integration-repo/.github/workflows/autofix-versions.env | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/autofix-versions.env b/.github/workflows/autofix-versions.env index 2c5a3cce4d..0237e7a547 100644 --- a/.github/workflows/autofix-versions.env +++ b/.github/workflows/autofix-versions.env @@ -5,7 +5,7 @@ # Runtime dependencies (PyYAML, Pydantic, Hypothesis) should be managed via Dependabot # in each consumer repo's pyproject.toml directly, NOT synced from this file. BLACK_VERSION=26.5.1 -RUFF_VERSION=0.15.22 +RUFF_VERSION=0.16.0 ISORT_VERSION=8.0.1 DOCFORMATTER_VERSION=1.7.8 MYPY_VERSION=2.3.0 diff --git a/pyproject.toml b/pyproject.toml index 6486d4fdfd..53306ca303 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ app = [] dev = [ "pre-commit==4.6.0", "black==26.5.1", - "ruff==0.15.22", + "ruff==0.16.0", "isort==8.0.1", "docformatter==1.7.8", "mypy==2.3.0", diff --git a/requirements.lock b/requirements.lock index 93c9c3ca88..af68ed164c 100644 --- a/requirements.lock +++ b/requirements.lock @@ -298,7 +298,7 @@ rpds-py==2026.6.3 # via # jsonschema # referencing -ruff==0.15.22 +ruff==0.16.0 # via workflows (pyproject.toml) six==1.17.0 # via python-dateutil diff --git a/templates/consumer-repo/.github/workflows/autofix-versions.env b/templates/consumer-repo/.github/workflows/autofix-versions.env index 2c5a3cce4d..0237e7a547 100644 --- a/templates/consumer-repo/.github/workflows/autofix-versions.env +++ b/templates/consumer-repo/.github/workflows/autofix-versions.env @@ -5,7 +5,7 @@ # Runtime dependencies (PyYAML, Pydantic, Hypothesis) should be managed via Dependabot # in each consumer repo's pyproject.toml directly, NOT synced from this file. BLACK_VERSION=26.5.1 -RUFF_VERSION=0.15.22 +RUFF_VERSION=0.16.0 ISORT_VERSION=8.0.1 DOCFORMATTER_VERSION=1.7.8 MYPY_VERSION=2.3.0 diff --git a/templates/integration-repo/.github/workflows/autofix-versions.env b/templates/integration-repo/.github/workflows/autofix-versions.env index 2c5a3cce4d..0237e7a547 100644 --- a/templates/integration-repo/.github/workflows/autofix-versions.env +++ b/templates/integration-repo/.github/workflows/autofix-versions.env @@ -5,7 +5,7 @@ # Runtime dependencies (PyYAML, Pydantic, Hypothesis) should be managed via Dependabot # in each consumer repo's pyproject.toml directly, NOT synced from this file. BLACK_VERSION=26.5.1 -RUFF_VERSION=0.15.22 +RUFF_VERSION=0.16.0 ISORT_VERSION=8.0.1 DOCFORMATTER_VERSION=1.7.8 MYPY_VERSION=2.3.0 From b415e8294a1dfc0db91ffe3920b6dd8726a4ab72 Mon Sep 17 00:00:00 2001 From: Codex Automation Date: Sun, 26 Jul 2026 17:29:16 -0500 Subject: [PATCH 2/5] fix(ci): preserve Ruff default lint contract --- .github/workflows/reusable-10-ci-python.yml | 7 ++++--- docs/ci/TOOL_VERSION_MANAGEMENT.md | 2 ++ tests/workflows/test_reusable_ci_workflow.py | 8 ++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-10-ci-python.yml b/.github/workflows/reusable-10-ci-python.yml index 9c5509d566..8d483f08ca 100644 --- a/.github/workflows/reusable-10-ci-python.yml +++ b/.github/workflows/reusable-10-ci-python.yml @@ -1088,9 +1088,10 @@ jobs: continue-on-error: true run: | set -euo pipefail - # Use extend-exclude to add to ruff's defaults (which include .venv) - # Exclude .workflows-lib since it's synced from source repo with different ruff config - ruff check --output-format github --extend-exclude .workflows-lib . + # Keep the pre-0.16 default rule family stable for consumers that do + # not declare their own Ruff selection. Exclude .workflows-lib since + # it is synced from the source repo with different Ruff configuration. + ruff check --select E4,E7,E9,F --output-format github --extend-exclude .workflows-lib . - name: Finalize lint id: finalize diff --git a/docs/ci/TOOL_VERSION_MANAGEMENT.md b/docs/ci/TOOL_VERSION_MANAGEMENT.md index 894d929794..7f10a43b7e 100644 --- a/docs/ci/TOOL_VERSION_MANAGEMENT.md +++ b/docs/ci/TOOL_VERSION_MANAGEMENT.md @@ -32,6 +32,8 @@ COVERAGE_VERSION=7.12.0 - Sources `autofix-versions.env` before installing tools - Runs `black --check`, `ruff check`, `mypy`, and `pytest` - Falls back to latest versions if version file is missing +- Pins the shared Ruff default rule family to `E4,E7,E9,F` so a Ruff upgrade + does not silently broaden lint requirements for consumer repositories. ### 2. PR Autofix (`reusable-18-autofix.yml`) - Reads version file to install Black and Ruff diff --git a/tests/workflows/test_reusable_ci_workflow.py b/tests/workflows/test_reusable_ci_workflow.py index 1baa6cc777..7e981469f1 100644 --- a/tests/workflows/test_reusable_ci_workflow.py +++ b/tests/workflows/test_reusable_ci_workflow.py @@ -127,6 +127,14 @@ def test_workflow_inputs_include_python_version_defaults() -> None: assert "pytest_args" not in dispatch_inputs +def test_ruff_lint_keeps_the_legacy_default_rule_family() -> None: + workflow = _load_workflow() + steps = workflow["jobs"]["lint-ruff"]["steps"] + ruff_step = next(step for step in steps if step.get("name") == "Ruff (lint)") + + assert "ruff check --select E4,E7,E9,F" in ruff_step["run"] + + def test_default_input_contract_fixture_matches_artifacts() -> None: fixture = _contract_fixture("default_inputs.json") inputs = _merged_inputs(fixture) From 1679a3f0ec3b18766aa5240f6d6fbf88785715e3 Mon Sep 17 00:00:00 2001 From: Tim Stranske Date: Sun, 26 Jul 2026 19:29:51 -0500 Subject: [PATCH 3/5] test: stabilize autofix pipeline tool contracts --- tests/workflows/test_autofix_full_pipeline.py | 7 +++++++ tests/workflows/test_autofix_pipeline_diverse.py | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/tests/workflows/test_autofix_full_pipeline.py b/tests/workflows/test_autofix_full_pipeline.py index b8f912d60d..1076e354b3 100644 --- a/tests/workflows/test_autofix_full_pipeline.py +++ b/tests/workflows/test_autofix_full_pipeline.py @@ -38,6 +38,10 @@ def test_autofix_pipeline_resolves_lint_and_typing( tests_dir = tmp_path / "tests" src_dir.mkdir() tests_dir.mkdir() + (tmp_path / "pyproject.toml").write_text( + "[tool.ruff.lint]\nselect = [\"E4\", \"E7\", \"E9\", \"F\"]\n", + encoding="utf-8", + ) sample = src_dir / "autofix_target.py" sample.write_text( @@ -139,6 +143,9 @@ def needs_optional(value: Optional[int])->int: exit_code = mypy_autofix.main(["--paths", str(sample)]) assert exit_code == 0 + # The type-hygiene pass can add imports after the initial formatter pass. + _run([sys.executable, "-m", "black", str(sample)], cwd=tmp_path) + for cmd in ( [sys.executable, "-m", "isort", str(sample)], [sys.executable, "-m", "black", str(sample)], diff --git a/tests/workflows/test_autofix_pipeline_diverse.py b/tests/workflows/test_autofix_pipeline_diverse.py index 68f340e5e9..fd50affaf1 100644 --- a/tests/workflows/test_autofix_pipeline_diverse.py +++ b/tests/workflows/test_autofix_pipeline_diverse.py @@ -50,6 +50,10 @@ def test_autofix_pipeline_handles_diverse_errors( sample_pkg.mkdir(parents=True) trend_pkg.mkdir(parents=True) tests_dir.mkdir() + (repo_root / "pyproject.toml").write_text( + "[tool.ruff.lint]\nselect = [\"E4\", \"E7\", \"E9\", \"F\"]\n", + encoding="utf-8", + ) (sample_pkg / "__init__.py").write_text("", encoding="utf-8") (tests_dir / "__init__.py").write_text("", encoding="utf-8") From 56a988e4827981c97dc234e041ef1a972360ae07 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 Jul 2026 00:37:03 +0000 Subject: [PATCH 4/5] chore(autofix): formatting/lint --- tests/workflows/test_autofix_full_pipeline.py | 2 +- tests/workflows/test_autofix_pipeline_diverse.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/workflows/test_autofix_full_pipeline.py b/tests/workflows/test_autofix_full_pipeline.py index 1076e354b3..9e5c8ac875 100644 --- a/tests/workflows/test_autofix_full_pipeline.py +++ b/tests/workflows/test_autofix_full_pipeline.py @@ -39,7 +39,7 @@ def test_autofix_pipeline_resolves_lint_and_typing( src_dir.mkdir() tests_dir.mkdir() (tmp_path / "pyproject.toml").write_text( - "[tool.ruff.lint]\nselect = [\"E4\", \"E7\", \"E9\", \"F\"]\n", + '[tool.ruff.lint]\nselect = ["E4", "E7", "E9", "F"]\n', encoding="utf-8", ) diff --git a/tests/workflows/test_autofix_pipeline_diverse.py b/tests/workflows/test_autofix_pipeline_diverse.py index fd50affaf1..64715de204 100644 --- a/tests/workflows/test_autofix_pipeline_diverse.py +++ b/tests/workflows/test_autofix_pipeline_diverse.py @@ -51,7 +51,7 @@ def test_autofix_pipeline_handles_diverse_errors( trend_pkg.mkdir(parents=True) tests_dir.mkdir() (repo_root / "pyproject.toml").write_text( - "[tool.ruff.lint]\nselect = [\"E4\", \"E7\", \"E9\", \"F\"]\n", + '[tool.ruff.lint]\nselect = ["E4", "E7", "E9", "F"]\n', encoding="utf-8", ) (sample_pkg / "__init__.py").write_text("", encoding="utf-8") From 076834dbecefa0e68f8a917424035e5131d7529a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 00:38:39 +0000 Subject: [PATCH 5/5] chore(codex-autofix): apply updates (PR #2812) --- langsmith-fleet-worker-attempt.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langsmith-fleet-worker-attempt.json b/langsmith-fleet-worker-attempt.json index 35f183ae50..13a08b6588 100644 --- a/langsmith-fleet-worker-attempt.json +++ b/langsmith-fleet-worker-attempt.json @@ -1,13 +1,13 @@ { "agent": "codex", "cli_version": "0.125.0", - "emitted_at": "2026-07-23T06:54:19.970022Z", + "emitted_at": "2026-07-27T00:38:38.825132Z", "execution_profile": "codex-default", "fallback_models": [ "gpt-5.4" ], "operation_role": "worker", - "pr_number": "2809", + "pr_number": "2812", "requested_model": "gpt-5.5", "runner": "reusable-codex-run", "schema": "langsmith-fleet/v1",