Pin the formatter, and stop it editing the record
The first CI run went red on `ruff format --check`, on a tree that was clean on this machine. Three separate problems, all found by pushing. `ruff>=0.4` is not a pin. CI installed 0.16.6 where the laptop had 0.15.18, and 0.16 formats Python code blocks inside Markdown while 0.15 leaves them alone — so the two disagreed about whether the repository was formatted, which is the one thing a formatter exists to settle. Pinned to the 0.16 line. Dependabot will offer the next one, and CI will say whether it is safe. The file it tripped over is `docs/survey-ui-consistency.md`, which quotes four lines of a dialog call as it looked on 22 August. That excerpt is a fragment — two arguments, no call around them — so the formatter parsed it as two statements and rewrote them into a tuple and an assignment that never existed anywhere. The surveys are dated records of a past state, so `docs/` is now excluded: a formatter editing a quotation is not tidying, it is falsifying. And the installer workflow was firing for branches it had no business building. Dependabot opened three action bumps within a minute of the push; each one edits `.github/workflows/installers.yml`, each matched its own path filter, and each started a five-platform build. `branches: [main]` stops it. Everything else was green on the first try, including the part that was actually uncertain: all seven test legs passed, macOS among them, and the installers built on Windows, macOS on Apple silicon, and Linux on both x64 and arm64 — so the uConsole build works and the ARM runner was available after all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
4f60f44512
commit
ebb3c80f15
3 files changed
+26
-3
No files matched your search
@@ -14,6 +14,10 @@ on:
|
||||
# Only when the packaging itself changes. Three operating systems is not something to
|
||||
# spend on every commit while the repository is private and minutes are metered.
|
||||
push:
|
||||
# `main` only. Without this, every Dependabot branch that touches this file — which
|
||||
# is every action bump — starts a five-platform build, and three of those legs are
|
||||
# billed at 2x and 10x.
|
||||
branches: [main]
|
||||
paths:
|
||||
- "packaging/**"
|
||||
- ".github/workflows/installers.yml"
|
||||
|
||||
@@ -9,6 +9,18 @@ allowed to change behaviour, not just add to it.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- The formatter is pinned. `ruff>=0.4` meant CI installed a newer ruff than a laptop had,
|
||||
and the two disagreed about whether the tree was clean — 0.16 formats Python blocks
|
||||
inside Markdown and 0.15 doesn't, so the first CI run went red on a file that was fine
|
||||
locally. An unpinned formatter isn't a gate.
|
||||
- `docs/` is out of ruff's reach. The survey documents quote code as it looked on a past
|
||||
date, in fragments that were never whole programs; a formatter rewriting a quotation
|
||||
edits the record.
|
||||
- The installer builds only run for `main`. Every Dependabot branch that bumped an action
|
||||
touched the workflow file, matched its path filter, and started a five-platform build.
|
||||
|
||||
### Changed
|
||||
|
||||
- The distribution is named `mesh-term`. PyPI prohibits `meshterm` (pypi/support#12162),
|
||||
|
||||
+10
-3
@@ -51,7 +51,10 @@ dependencies = [
|
||||
dev = [
|
||||
"pytest>=8.0",
|
||||
"pytest-asyncio>=0.23",
|
||||
"ruff>=0.4",
|
||||
# Pinned to a minor line, not floated. A formatter that drifts between machines is
|
||||
# not a gate: 0.16 formats Python inside Markdown and 0.15 does not, so an
|
||||
# unpinned `ruff>=0.4` had CI and a laptop disagreeing about a clean tree.
|
||||
"ruff>=0.16.6,<0.17",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
@@ -74,8 +77,12 @@ packages = ["meshterm"]
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py310"
|
||||
# Helper scripts for the Claude skills; they are not part of the package.
|
||||
extend-exclude = [".claude"]
|
||||
# Helper scripts for the Claude skills; they are not part of the package. And `docs/`,
|
||||
# which holds dated survey documents: ruff formats Python blocks inside Markdown, and the
|
||||
# code they quote is an excerpt of how a file looked on a past date. Reformatting a
|
||||
# quotation edits the record — and the excerpts are call fragments, not whole programs, so
|
||||
# the formatter's idea of "fixed" turns them into something that was never there.
|
||||
extend-exclude = [".claude", "docs"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "F", "I", "UP", "B", "D"]
|
||||
|
||||
Reference in new issue
Block a user