Skip to content

fix(ci): declare the lint surface so a ruff default change cannot break main - #97

Merged
vinicq merged 1 commit into
mainfrom
fix/ruff-lint-surface
Aug 11, 2026
Merged

fix(ci): declare the lint surface so a ruff default change cannot break main#97
vinicq merged 1 commit into
mainfrom
fix/ruff-lint-surface

Conversation

@vinicq

@vinicq vinicq commented Aug 11, 2026

Copy link
Copy Markdown
Owner

main is red right now: test (3.13) failed and the other matrix legs were cancelled. This is the smallest change that fixes it, split out of #96 so a production-red branch is not waiting on a CI-hygiene discussion.

Cause

pyproject.toml had no [tool.ruff] section at all and declares ruff>=0.5 with no ceiling, so the lint surface was whatever ruff happened to default to. ruff 0.16 widened that default set. CI installs 0.16.2. No commit in this repo caused the failure.

Proved by removal, on this tree, with the version CI uses

State ruff check src tests
with the select block clean
stash it 67 errors

The findings are UP031, E402, BLE001, I001, SIM114, RUF100. None of them are new code. They are rules that were never selected and now are.

Why declare instead of cap

select = ["E4", "E7", "E9", "F"] is exactly what the repo was already being held to. A version cap (ruff>=0.5,<0.16) fixes today by freezing the tool while leaving the surface implicit, so the same break returns the day someone lifts the cap. Declaring it makes a future default widening a no-op and keeps ruff upgradable.

Same call as vinicq/falsegreen#148, where the identical drift left main with 106 findings.

Adopting the wider rule set is worth doing on its own merits, with the 67 findings triaged in a dedicated PR.

Verification

Full suite in a clean venv with pip install -e ".[dev]": 257 passed. (An earlier local run of mine showed failures; that was PYTHONPATH=src without an editable install, my environment and not this repo.)

Rollback

One hunk in one file. git revert restores a red main, which is the argument against it.

…ak main

The Lint step on this PR failed with 67 findings and nothing in the repo caused
it. pyproject had no [tool.ruff] section at all and declared `ruff>=0.5` with no
ceiling, so the lint surface was whatever ruff defaulted to. ruff 0.16 widened
that set and CI installs 0.16.2.

Proved by removal on this tree with the version CI uses: with the select block,
`ruff check src tests` is clean; stash it and the same command reports 67 errors
(UP031, E402, BLE001, I001, SIM114, RUF100). None are new code, they are rules
that were never selected.

Declares select = ["E4", "E7", "E9", "F"], what the repo was already held to,
rather than capping ruff: a cap freezes the tool and leaves the surface implicit,
so the break returns the day someone lifts it. Same call as vinicq/falsegreen#148.

Full suite verified in a clean venv with `pip install -e ".[dev]"`: 257 passed.
@vinicq
vinicq merged commit dec7a31 into main Aug 11, 2026
4 checks passed
@vinicq
vinicq deleted the fix/ruff-lint-surface branch August 11, 2026 21:23
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