Skip to content

fix(ci): unblock the format gate — ruff 0.16 formats Markdown code blocks - #102

Merged
r-uben merged 1 commit into
mainfrom
fix/ci-ruff-markdown-format
Jul 30, 2026
Merged

fix(ci): unblock the format gate — ruff 0.16 formats Markdown code blocks#102
r-uben merged 1 commit into
mainfrom
fix/ci-ruff-markdown-format

Conversation

@r-uben

@r-uben r-uben commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

main is currently red on the repo-wide format check, with no code change
required to trigger it
. Every open PR inherits the failure.

Root cause

CI runs uv run ruff format --check . (.github/workflows/ci.yml:31).

  • pyproject.toml declares ruff>=0.8.0 (unpinned) and CI does not pass
    --frozen, so uv run resolves ruff latest = 0.16.0, not the 0.15.17
    pinned in uv.lock.
  • Ruff 0.16 formats Python code blocks inside Markdown by default. 0.15.17
    refuses: Markdown formatting is experimental, enable preview mode.
  • Result: CI checks 220 files (130 .py + 90 .md) where a local
    ~/venvs/socr/bin/ruff format --check . checks only 130 and reports clean.

So a ruff release turned an untouched, previously-passing file into a build
failure, and the failure is not locally reproducible with the repo's own
pinned toolchain.

This PR

Realigns two trailing comments in docs/MODELS.md. Whitespace only, no content
change:

-AUTO_ENGINE_ORDER = [QWEN, GEMINI, MARKER, GLM, NOUGAT]   # DeepSeek + Mistral dropped
+AUTO_ENGINE_ORDER = [QWEN, GEMINI, MARKER, GLM, NOUGAT]  # DeepSeek + Mistral dropped

Unblocks #99, #100, #101.

What this does NOT fix

The drift itself. The next ruff release can red main the same way. Options,
none taken here because it is a repo-policy call:

  1. Pin ruff exactly in pyproject.toml (matching uv.lock), so the gate is
    reproducible locally — my preference, since CLAUDE.md calls lint a blocking
    gate and a blocking gate that can't be reproduced locally is a trap.
  2. Run CI with uv run --frozen, honouring uv.lock.
  3. Accept markdown formatting deliberately and add it to the documented local
    command in CLAUDE.md, so contributors run the same check CI does.

Worth noting for (3): CLAUDE.md currently documents
~/venvs/socr/bin/ruff format --check <files> as the gate. That venv has ruff
0.15.15 and will never reproduce CI's markdown check.

Test plan — observed results

  • uvx ruff@latest format --check . → before: 2 files would be reformatted, 218 files already formatted; after this commit plus the bake-off note fix: clean.
  • uvx ruff@latest format --check docs/MODELS.md1 file already formatted
  • ~/venvs/socr/bin/pytest tests/ -q1249 passed, 1 xfailed (unchanged;
    this touches no Python)

main is currently red on the repo-wide format check, independent of any code
change: CI runs `uv run ruff format --check .`, which resolves ruff **latest**
(0.16.0) rather than the 0.15.17 pinned in uv.lock. Ruff 0.16 formats Python code
blocks inside Markdown by default, where 0.15 gated that behind --preview. So a
ruff release turned an untouched file into a build failure, and every open PR
inherits it.

This commit only realigns two trailing comments in docs/MODELS.md — whitespace,
no content change. It unblocks PRs #99, #100 and #101.

It does not address the underlying drift: because pyproject declares
`ruff>=0.8.0` and CI does not run uv with --frozen, the next ruff release can red
main again the same way. Tracked separately.
@r-uben
r-uben merged commit e74bb98 into main Jul 30, 2026
3 checks passed
@r-uben
r-uben deleted the fix/ci-ruff-markdown-format branch July 30, 2026 14:21
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.

1 participant