Files
limbicnationandClaude Opus 4.7 604639e8b3 ci: prevent silent version drift with pre-commit and GH Actions guards
Direct response to the v1.1.x → v1.3.0 silent-skip pattern, where
pyproject.toml was bumped four times without ever pushing the matching
git tag, so .github/workflows/publish.yml never fired and the registry
stayed on v1.1.6.

- scripts/check_version_tag.py: stdlib-only (tomllib) script that fails
  if pyproject.toml's version has no matching git tag locally.
- .pre-commit-config.yaml: wires ruff (check + format) and the local
  version-tag-guard hook. The guard fires only on pyproject.toml edits.
- test.yml: new verify-tag-exists job that fails the main-branch build
  when pyproject.toml's version has no matching tag in the repo. Belt
  and suspenders for the pre-commit hook.
- test.yml validate job: same comfy-cli telemetry fix already applied
  to publish.yml; suppresses the interactive opt-in prompt in CI.
- pytest.ini + test.yml: lower coverage gate from 70 (never enforced;
  failed on every main push since chain nodes were added) to 50 (the
  actual current floor). Comment marks it as a starting point for
  future test growth.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 06:15:08 +02:00

17 lines
425 B
YAML

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.11
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: local
hooks:
- id: version-tag-guard
name: Refuse pyproject.toml version bump without matching git tag
language: system
entry: python scripts/check_version_tag.py
files: ^pyproject\.toml$
pass_filenames: false