Skip to content

fix(ci): keep ruff off Markdown so a minor bump stops breaking lint#9899

Merged
MarkusNeusinger merged 2 commits into
mainfrom
chore/keep-ruff-off-markdown
Jul 25, 2026
Merged

fix(ci): keep ruff off Markdown so a minor bump stops breaking lint#9899
MarkusNeusinger merged 2 commits into
mainfrom
chore/keep-ruff-off-markdown

Conversation

@MarkusNeusinger

Copy link
Copy Markdown
Owner

Summary

  • pyproject.toml pins ruff>=0.15.21 with no upper bound. CI resolved 0.16.0 today, and that version formats Python code blocks inside Markdown — 20 tracked .md files immediately counted as unformatted and Run Linting went red on every PR (first seen on feat(seo): serve prerendered pages to AI crawlers, state the crawler policy in robots.txt #9898, which touches none of those files).
  • Fix: *.md joins ruff's exclude list. Ruff owns this repo's Python, not its prose.
  • Deliberately not fixed by reformatting the 20 files: nine are prompts/library/*.md, whose snippets steer code generation, so a quote-style rewrite there is a pipeline change wearing a formatting costume. If the docs should be ruff-formatted, that is its own decision with its own review.

Plan

N/A — unblocks CI.

Test plan

  • uvx ruff@0.16.0 format --check .148 files already formatted (was: 20 files would be reformatted)
  • uvx ruff@0.16.0 check .All checks passed!
  • Same two commands on ruff@0.15.21 (the version CI resolved while green) → identical results, so the change is not version-specific
  • Run Linting green on this PR

ruff is pinned as >=0.15.21 with no upper bound; CI resolved 0.16.0,
which formats Python code blocks inside Markdown. Twenty tracked .md
files went unformatted overnight and every PR's Lint job turned red.

Excluding *.md is the fix rather than reformatting those files: nine of
them are prompts/library/*.md, whose code snippets steer generation, so
a quote-style rewrite there changes pipeline behaviour under the guise
of formatting.
Copilot AI review requested due to automatic review settings July 25, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR stabilizes CI linting by preventing Ruff from formatting Python code blocks inside Markdown files after the Ruff 0.16.0 behavior change, avoiding unrelated docs/prompts churn that can break lint on otherwise unaffected PRs.

Changes:

  • Add *.md to Ruff’s global exclude list in pyproject.toml to keep Ruff focused on Python sources.
  • Add a [Unreleased] changelog entry describing the CI breakage and the chosen mitigation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Excludes Markdown from Ruff to prevent format-check failures caused by Markdown code-block formatting behavior.
CHANGELOG.md Documents the CI regression and the configuration change under [Unreleased].

Comment thread CHANGELOG.md Outdated
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI review requested due to automatic review settings July 25, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@MarkusNeusinger
MarkusNeusinger merged commit 22d3b5e into main Jul 25, 2026
11 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the chore/keep-ruff-off-markdown branch July 25, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants