ci: add L347 version-bump CI guard for src/ changes#82
Merged
Conversation
Closes ROADMAP L347. Prevents the alpha-engine-lib #76 recurrence class: a public-surface src change merged without bumping pyproject.toml::version, auto-tag.yml idempotently skipped (it saw the same v0.36.0 it had already tagged), and downstream alpha-engine-dashboard #129's pin to @v0.36.1 failed pip install for ~10 min until follow-up #77 bumped the version. New workflow .github/workflows/version-bump-check.yml fires on PRs to main and, on any PR that touches src/**: 1. Diffs pyproject.toml::version vs the base branch; fails if unchanged. 2. Checks the new version is NOT already in `git tag --list`; fails if it is (auto-tag would skip an already-tagged version, so the consumer pin would resolve to the old commit). Doc / test / CI / pyproject-metadata-only PRs are exempt via an early src_touched=false branch — they legitimately don't bump the version, and failing them would either force spurious bumps on README typos OR train operators to ignore the gate. Test pin tests/test_version_bump_workflow.py (5 tests) catches a future PR that silently removes the workflow OR strips one of the two invariants OR widens the src-detection regex. Composes with: - auto-tag.yml (post-merge tag creation; this guard ensures the auto-tag has something new to tag) - tests/test_version_pin.py (pyproject vs __init__ lockstep; this guard extends the chokepoint from internal-consistency to external-monotonicity) - [[feedback_lift_invariants_to_chokepoint_after_second_recurrence]] (this is the first lift; a second recurrence would justify promoting to broader scope, e.g., a reusable composite action for consumer repos) Effort: ~30 min substrate ship per L347 estimate. Suite: 846 → 851. Co-Authored-By: Claude Opus 4.7 (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.
Summary
Closes ROADMAP L347. Prevents the alpha-engine-lib #76 recurrence class: a public-surface src change merged without bumping
pyproject.toml::version→auto-tag.ymlidempotently skipped → downstream alpha-engine-dashboard #129's pin to@v0.36.1failed pip install for ~10 min until follow-up #77 bumped the version.What this PR adds
.github/workflows/version-bump-check.yml— fires on PRs to main. On any PR that touchessrc/**:pyproject.toml::versionvs base branch; fails if unchanged.git tag --list; fails if it is (auto-tag would silently skip an already-tagged version, so the consumer pin would resolve to the old commit).tests/test_version_bump_workflow.py— 5 pin tests that catch a future PR silently removing the workflow OR stripping one of the two invariants OR widening the src-detection regex.Skips (intentional)
Doc / test / CI / pyproject-metadata-only PRs are exempt via an early
src_touched=falsebranch. They legitimately don't bump the version, and failing them would either force spurious bumps on README typos OR train operators to ignore the gate.First exercise
This PR itself touches only
.github/workflows/+tests/— the new workflow's ownsrc_touched=falsebranch fires, and the workflow self-skips. First real exercise = the next PR that edits anything undersrc/alpha_engine_lib/.Test plan
test_version_bump_workflow.pypass.src_touched=false).version-bump-check / pyproject version bumped for src/ changesas a required check onmainafter this lands (mirrors the existingTestsrequired check).🤖 Generated with Claude Code