Skip to content

ci: add L347 version-bump CI guard for src/ changes#82

Merged
cipher813 merged 1 commit into
mainfrom
feat/lib-version-bump-ci-guard-l347
May 27, 2026
Merged

ci: add L347 version-bump CI guard for src/ changes#82
cipher813 merged 1 commit into
mainfrom
feat/lib-version-bump-ci-guard-l347

Conversation

@cipher813
Copy link
Copy Markdown
Owner

Summary

Closes ROADMAP L347. Prevents the alpha-engine-lib #76 recurrence class: a public-surface src change merged without bumping pyproject.toml::versionauto-tag.yml idempotently skipped → downstream alpha-engine-dashboard #129's pin to @v0.36.1 failed 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 touches src/**:
    1. Diffs pyproject.toml::version vs base branch; fails if unchanged.
    2. Checks the new version is NOT already in 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=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.

First exercise

This PR itself touches only .github/workflows/ + tests/ — the new workflow's own src_touched=false branch fires, and the workflow self-skips. First real exercise = the next PR that edits anything under src/alpha_engine_lib/.

Test plan

  • 5 pin tests in test_version_bump_workflow.py pass.
  • Full lib suite: 846 → 851.
  • This PR's workflow run itself self-skips (src_touched=false).
  • Branch-protection knob — operator may want to add version-bump-check / pyproject version bumped for src/ changes as a required check on main after this lands (mirrors the existing Tests required check).
  • Next src-touching lib PR exercises the gate end-to-end.

🤖 Generated with Claude Code

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>
@cipher813 cipher813 merged commit d1cccb1 into main May 27, 2026
6 checks passed
@cipher813 cipher813 deleted the feat/lib-version-bump-ci-guard-l347 branch May 27, 2026 19:14
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