Skip to content

ci(#156/T3): add version-bump-check workflow#159

Merged
devallibus merged 1 commit into
masterfrom
issue/156-T3-ci-version-bump-check
Apr 22, 2026
Merged

ci(#156/T3): add version-bump-check workflow#159
devallibus merged 1 commit into
masterfrom
issue/156-T3-ci-version-bump-check

Conversation

@devallibus

Copy link
Copy Markdown
Owner

Summary

Adds a GitHub Actions workflow that fails any PR which touches commands/, skills/, or .claude-plugin/ without bumping .claude-plugin/plugin.json version. Mechanically enforces the policy from #156 / T2 so cumulative drift cannot recur silently.

Addresses #156 (completes T3)

Journey Timeline

Decisions

Decision Choice Why
Implementation Pure shell + jq, no third-party action Diff + JSON parse is short enough to read inline; pinning a third-party action would add a supply-chain dependency for no benefit.
Trigger paths commands/, skills/, .claude-plugin/ Same list documented in CONTRIBUTING.md (T2). The workflow header explicitly notes the two must stay in sync.
Diff base git diff $BASE...$HEAD (three-dot) Diffs against the merge-base of the PR rather than the literal base SHA, so up-to-date branches don't false-positive.
Escape hatches None The whole point is mechanical enforcement. If a real exemption appears, it's a CONTRIBUTING.md policy change, not a CI bypass.
Failure UX ::error file=...:: annotation + multi-line explainer in the log The annotation surfaces in the GitHub PR UI; the explainer points at CONTRIBUTING.md so authors know how to fix it.

Changes

  • Create .github/workflows/version-bump-check.yml: runs on pull_request to master, checks out with fetch-depth: 0, walks the diff, and fails when a gated path changed but plugin.json version did not.

That is the entire diff for this PR.

Testing / Verification

I cannot execute Actions from this PR's body; the verification plan post-merge is:

  1. Open a throwaway PR that edits one file under skills/ without changing plugin.json. Expect the new check to fail with the annotation pointing at .claude-plugin/plugin.json and the multi-line explainer in the log.
  2. Push a follow-up commit to the same PR that bumps plugin.json version. Expect the check to pass.
  3. Open another throwaway PR that only edits README.md. Expect the check to pass without examining plugin.json (logs should print "No gated paths changed; version bump not required.").

If any of those misbehave, the workflow is straightforward to revert with a one-file removal.

Knowledge for Future Reference

  • The trigger path list is duplicated between the workflow header and CONTRIBUTING.md. T4 (release workflow) should similarly reference the same list when generating release notes that group changes by impact area. If a new top-level path becomes a gated surface, update CONTRIBUTING.md first, then mirror in this workflow.
  • Pure-shell approach was chosen so a maintainer can read the entire enforcement logic in 30 seconds. If future requirements grow (e.g. semver direction check, monorepo per-package versioning), revisit whether to migrate to a published action or a small composite action.
  • The workflow only touches .github/workflows/, which is not a gated path under the policy itself. So this PR does not need a version bump (and the absence of one demonstrates the rule's negative case).

Authored-by: claude/opus-4.7 (claude-code)
Captain's log - PR timeline by shiplog

Fails any PR that changes commands/, skills/, or .claude-plugin/
without bumping .claude-plugin/plugin.json version. Mechanically
enforces the policy from #156 / T2 so cumulative drift cannot
recur silently.

Pure shell + jq, no third-party action. Trigger path list mirrors
CONTRIBUTING.md "Versioning" section.

T3 of #156. T4 (release workflow) follows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@devallibus devallibus added shiplog/history Final history-bearing Shiplog PR shiplog/issue-driven PR is linked to a Shiplog issue labels Apr 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82fdf00e2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


on:
pull_request:
branches: [master]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Trigger the check on the actual default branch

The workflow is limited to pull_request events targeting master, so in repositories where the default branch is main (as in this repo) the job never runs and the version-bump policy is effectively unenforced for normal PRs. This turns the new guardrail into a no-op in day-to-day use; update the branch filter to the real default branch (or include both) so PRs are actually checked.

Useful? React with 👍 / 👎.

@devallibus

Copy link
Copy Markdown
Owner Author

[shiplog/review] Repo owner override — proceed to merge

The repo owner (devallibus) explicitly authorized merging this #156 follow-up PR without a separate cross-model review. Per skills/shiplog/references/closure-and-review.md §3, human review counts as independent review, so this satisfies the gate. Recording the override here for the audit trail.

Reviewed-by: claude/opus-4.7 (claude-code)
Disposition: self-review (audit trail) — repo owner override authorizing merge
Scope: full diff
Note: Independent human reviewer (devallibus, repo owner) explicitly
authorized merge of this #156 follow-up. See sibling PRs #157, #158,
#159, #160 for the full T1–T4 set.

Authored-by: claude/opus-4.7 (claude-code)

@devallibus devallibus merged commit 4416a85 into master Apr 22, 2026
1 check passed
@devallibus devallibus deleted the issue/156-T3-ci-version-bump-check branch April 22, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shiplog/history Final history-bearing Shiplog PR shiplog/issue-driven PR is linked to a Shiplog issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant