Skip to content

fix: preserve consumer Ruff selections with 0.16 - #2840

Merged
stranske merged 5 commits into
mainfrom
codex/ruff-016-preserve-consumer-selection
Jul 27, 2026
Merged

fix: preserve consumer Ruff selections with 0.16#2840
stranske merged 5 commits into
mainfrom
codex/ruff-016-preserve-consumer-selection

Conversation

@stranske

@stranske stranske commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Replaces the conflicted #2812 Ruff pin proposal. Moves the full shared pin surface together and retains consumer-defined Ruff selections while using the pre-0.16 default family only when no selection is configured.

Validation: .......... [100%]
10 passed in 0.61s; ✅ All consumer workflows are properly templated and manifested; 🔄 Syncing scripts to template directory...
✅ All files already in sync; .

Supersedes #2812.

Summary by CodeRabbit

  • Chores

    • Updated Ruff to version 0.16.0 across development and workflow templates.
  • Bug Fixes

    • Preserved custom Ruff rule selections in reusable CI workflows.
    • Maintained legacy default lint rules when no custom selection is configured.
  • Documentation

    • Clarified Ruff rule-selection behavior for CI validation.
  • Tests

    • Expanded workflow and autofix pipeline coverage for Ruff configuration and formatting behavior.

@cursor

cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@stranske
stranske temporarily deployed to agent-high-privilege July 27, 2026 02:29 — with GitHub Actions Inactive
@stranske-keepalive

stranske-keepalive Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Workflow source detected

PR #2840 now has valid workflow source context (origin=review_followup).

No linked GitHub issue is required for this PR.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 1 minute

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 23092120-66bb-4811-bb01-a203021149de

📥 Commits

Reviewing files that changed from the base of the PR and between 42969c6 and 8a008da.

📒 Files selected for processing (2)
  • .github/workflows/reusable-10-ci-python.yml
  • tests/workflows/test_reusable_ci_workflow.py
📝 Walkthrough

Walkthrough

Ruff is upgraded to 0.16.0 across project and workflow pins. Reusable CI now preserves consumer-defined selections or applies E4,E7,E9,F when none is configured, with documentation and workflow test updates.

Changes

Ruff tooling and lint workflow

Layer / File(s) Summary
Align Ruff version pins
.github/workflows/autofix-versions.env, pyproject.toml, templates/*/.github/workflows/autofix-versions.env
Ruff pins are updated from 0.15.22 to 0.16.0.
Preserve consumer Ruff rule selection
.github/workflows/reusable-10-ci-python.yml, docs/ci/TOOL_VERSION_MANAGEMENT.md, tests/workflows/test_reusable_ci_workflow.py
The reusable lint step detects explicit select configuration, otherwise uses E4,E7,E9,F; documentation and assertions cover the generated commands.
Align autofix pipeline fixtures
tests/workflows/test_autofix_full_pipeline.py, tests/workflows/test_autofix_pipeline_diverse.py
Pipeline fixtures configure Ruff rule selection, and the full pipeline reruns Black after type-hygiene changes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: dependencies, github:actions, maintenance

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: preserving consumer Ruff rule selections while upgrading Ruff to 0.16.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ruff-016-preserve-consumer-selection

Comment @coderabbitai help to get the list of available commands.

@agents-workflows-bot

agents-workflows-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: fdd8007
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 75.89%
Baseline 85.00%
Delta -9.11%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske
stranske temporarily deployed to agent-high-privilege July 27, 2026 02:31 — with GitHub Actions Inactive

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90a6682218

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/reusable-10-ci-python.yml Outdated
Comment thread .github/workflows/reusable-10-ci-python.yml Outdated
@stranske

stranske commented Jul 27, 2026

Copy link
Copy Markdown
Owner Author

Runner dispatch state for autofix on PR #2840. Do not edit.

@stranske
stranske temporarily deployed to agent-high-privilege July 27, 2026 02:36 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-standard July 27, 2026 02:36 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-standard July 27, 2026 02:37 — with GitHub Actions Inactive
@agents-workflows-bot
agents-workflows-bot Bot temporarily deployed to agent-high-privilege July 27, 2026 02:38 Inactive
Treat extend-select as an explicit consumer rule selection, and fall
back to tomli or a text scan when tomllib is unavailable on older
interpreters so the reusable lint job does not crash before Ruff runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

Autofix updated these files:

  • tests/workflows/test_reusable_ci_workflow.py

@stranske
stranske temporarily deployed to agent-high-privilege July 27, 2026 02:41 — with GitHub Actions Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/reusable-10-ci-python.yml:
- Around line 1095-1111: The Ruff selection probe in the inline Python block
must walk from the configured working directory through its parent directories,
checking each supported config file until the filesystem root so parent
`tool.ruff.lint.select` settings are detected. Preserve the existing TOML
parsing and explicit-selection checks, and add a regression test covering a
nested working directory that inherits Ruff configuration from a parent.

In `@templates/consumer-repo/.github/workflows/autofix-versions.env`:
- Line 8: Revert the Ruff version change in the consumer template’s
autofix-versions.env; keep the shared Ruff pin in the source-of-truth location
and modify this template only when Ruff is intentionally repo-specific.

In `@tests/workflows/test_reusable_ci_workflow.py`:
- Around line 130-146: Extend test_ruff_lint_preserves_consumer_rule_selection
to execute the Ruff configuration probe against temporary config files and
assert runtime behavior for explicit selection, no selection, and a nested
working directory inheriting a parent config. Reuse the workflow’s actual probe
logic or extract it into a testable helper, ensuring each case verifies the
resulting Ruff command selection rather than only matching source text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b87c05df-2463-48c6-8196-a4f5301d9f90

📥 Commits

Reviewing files that changed from the base of the PR and between 8da1268 and 42969c6.

⛔ Files ignored due to path filters (1)
  • requirements.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing (9)
  • .github/workflows/autofix-versions.env
  • .github/workflows/reusable-10-ci-python.yml
  • docs/ci/TOOL_VERSION_MANAGEMENT.md
  • pyproject.toml
  • templates/consumer-repo/.github/workflows/autofix-versions.env
  • templates/integration-repo/.github/workflows/autofix-versions.env
  • tests/workflows/test_autofix_full_pipeline.py
  • tests/workflows/test_autofix_pipeline_diverse.py
  • tests/workflows/test_reusable_ci_workflow.py

Comment thread .github/workflows/reusable-10-ci-python.yml
Comment thread templates/consumer-repo/.github/workflows/autofix-versions.env Outdated
Comment thread tests/workflows/test_reusable_ci_workflow.py Outdated
@stranske
stranske temporarily deployed to agent-high-privilege July 27, 2026 03:25 — with GitHub Actions Inactive
@stranske

Copy link
Copy Markdown
Owner Author

Addressed the three current CodeRabbit findings in 5802050. The Ruff probe now walks the configured working directory ancestry, honors Ruff precedence, and stops at the nearest usable configuration; runtime tests cover explicit selection, no selection, and a nested directory inheriting its parent configuration. The consumer-template pin was restored to its repo-specific value. Validation: python -m pytest tests/workflows/test_reusable_ci_workflow.py -q (11 passed), python -m ruff check tests/workflows/test_reusable_ci_workflow.py, python scripts/validate_template_completeness.py, and git diff --check.

@stranske
stranske temporarily deployed to agent-high-privilege July 27, 2026 03:28 — with GitHub Actions Inactive
@stranske
stranske merged commit fdd8007 into main Jul 27, 2026
121 checks passed
@stranske
stranske deleted the codex/ruff-016-preserve-consumer-selection branch July 27, 2026 03:40
@stranske stranske added the verify:compare Compare multiple LLM evaluations label Jul 29, 2026
@stranske
stranske temporarily deployed to agent-standard July 29, 2026 19:37 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-standard July 29, 2026 19:38 — with GitHub Actions Inactive
@stranske
stranske temporarily deployed to agent-standard July 29, 2026 19:38 — with GitHub Actions Inactive
@stranske

Copy link
Copy Markdown
Owner Author

Closer verification note — verify:compare has no target on this PR

This PR carried verify:compare with no durable verifier comment, so it surfaced in closer discovery as verification debt. Re-dispatched as run 30660330608; it completed and deliberately skipped:

No acceptance criteria found in PR or linked issues; skipping verifier.verdict: "skipped", acceptance_criteria_count: 0

That is correct behavior, not a failure. #2840 closes no issue and its body carries no acceptance-criteria block, so compare mode has nothing to evaluate. The label was inapplicable from the start rather than unprocessed.

Recording this so a future closer round does not re-dispatch the same run. No action required, no follow-up debt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autofix:escalated verify:compare Compare multiple LLM evaluations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants