Skip to content

ci: consistency gate + Node-24-native actions - #5

Merged
Wynelson94 merged 1 commit into
mainfrom
chore/consistency-gate-and-actions
Jul 24, 2026
Merged

ci: consistency gate + Node-24-native actions#5
Wynelson94 merged 1 commit into
mainfrom
chore/consistency-gate-and-actions

Conversation

@Wynelson94

Copy link
Copy Markdown
Owner

Two maintenance items from the 2026-07-24 audit.

1. Actions bump (Node 20 deprecation)

Every CI run currently prints:

Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-python@v5

v6 is the Node-24-native pair. longhand already runs v6/v6 for 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:

Nothing compared the README/CHANGELOG claims to the manifests or the suite, so both were caught by reading, hours later. scripts/check_consistency.py closes that. Against pyproject.toml as canonical it asserts:

  1. src/tearsheet/__init__.py.__version__ agrees.
  2. CHANGELOG.md has 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.
  3. Every "N tests" claim in README.md equals 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:

Injected fault Result
README 247 tests999 tests exit 1, names all three lines
version bumped, CHANGELOG left [Unreleased] exit 1, flags both __version__ and the missing released section
clean tree exit 0

Gate change

ruff check src tests scripts && mypy && pytest && python scripts/check_consistency.py

CI and CONTRIBUTING both updated. mypy is scoped to src/tearsheet in pyproject.toml, so scripts/ is linted by ruff but not type-checked — noted rather than silently expanded.

🤖 Generated with Claude Code

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>
@Wynelson94
Wynelson94 merged commit eef8cbc into main Jul 24, 2026
2 checks passed
@Wynelson94
Wynelson94 deleted the chore/consistency-gate-and-actions branch July 24, 2026 17:43
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