ci: consistency gate + Node-24-native actions - #5
Merged
Conversation
Two maintenance items from the 2026-07-24 audit.
1. Actions bump. actions/checkout@v4 and actions/setup-python@v5 target
Node 20; runners now force them onto Node 24 and print a deprecation
warning on every run. v6 is the native pair. (longhand already runs
v6/v6 for the same reason.)
2. Consistency gate. Prose-vs-code drift has shipped here twice and both
times nothing but a manual read caught it:
PR #1 "Fix version and test-count inconsistencies"
PR #4 README said "Since v0.1.5" while pyproject and __init__ said
0.1.4 and the CHANGELOG had the change under [Unreleased]
scripts/check_consistency.py asserts, against pyproject as canonical:
__init__.__version__ agrees; CHANGELOG has a RELEASED section for that
version (the check that would have caught PR #4); and every "N tests"
claim in the README equals what pytest actually collects.
It found live drift on its first run: the README claimed 243 tests in
three places while the suite is 247 since the stub guard landed. Fixed
here.
Falsified in both directions before committing — corrupting the test
count, the version, and the CHANGELOG section each produce exit 1 with
the specific line; restoring produces exit 0.
Gate is now: ruff check src tests scripts && mypy && pytest &&
check_consistency.py. CONTRIBUTING and CI updated to match.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two maintenance items from the 2026-07-24 audit.
1. Actions bump (Node 20 deprecation)
Every CI run currently prints:
v6is the Node-24-native pair. longhand already runsv6/v6for the same reason. This is a warning today and a break whenever GitHub drops the forced fallback.2. Consistency gate — the actual point of this PR
Prose-vs-code drift has shipped in this repo twice, and neither time could the gate see it:
pyproject.tomland__init__.pyboth said0.1.4and the CHANGELOG carried the change under[Unreleased]Nothing compared the README/CHANGELOG claims to the manifests or the suite, so both were caught by reading, hours later.
scripts/check_consistency.pycloses that. Againstpyproject.tomlas canonical it asserts:src/tearsheet/__init__.py.__version__agrees.CHANGELOG.mdhas a released## [X.Y.Z]section for it — this is precisely the check that would have caught PR chore: v0.1.5 — name the release the README already referenced #4."N tests"claim inREADME.mdequals what pytest actually collects.It found live drift on its first run. The README claimed 243 tests in three places; the suite has been 247 since the stub guard landed in #3. Fixed here.
Falsification
Not just "it passes" — I corrupted each input and confirmed it fails with the right message, then restored:
247 tests→999 tests[Unreleased]__version__and the missing released sectionGate change
CI and CONTRIBUTING both updated.
mypyis scoped tosrc/tearsheetinpyproject.toml, soscripts/is linted by ruff but not type-checked — noted rather than silently expanded.🤖 Generated with Claude Code