Skip to content

ci(tag): list breaking commits and document recovery from accidental majors - #26

Merged
clappingmonkey merged 1 commit into
mainfrom
ci/tag-list-breaking-commits
Oct 22, 2026
Merged

clappingmonkey merged 1 commit into
mainfrom
ci/tag-list-breaking-commits

Conversation

@clappingmonkey

Copy link
Copy Markdown
Owner

What does this PR do?

Follow-up to #25. A dry run on main after #25 merged computed v1.0.0. The squash commit body (the PR description) quoted ccv's breaking-change footer text, and ccv v0.10.0 matches that text anywhere in a commit message. The guard from #25 worked and nothing was tagged. Still, the failure gave no hint about which commit caused the bump or how to recover.

This PR changes:

  • tag.yaml: when the computed bump is major, a new List breaking commits step (best effort, continue-on-error) writes the likely trigger commits since the last tag to the job summary, with the matching body lines. Commit text is sanitized so it cannot break out of the code fence.

  • tag.yaml: the blocked-run summary prints two runbooks, both pinned to the run SHA:

    • Intended major: tag the computed vX.0.0.
    • Accidental bump: tag the next patch, which the workflow computes. ccv stops at the first tagged commit it reaches, so later runs only count commits after it.

    Both use git -c tag.gpgSign=false tag, because ccv ignores annotated and signed tags.

  • CONTRIBUTING.md: the "Major releases" section explains which forms ccv treats as breaking, warns that the footer text is matched anywhere (including the PR description), and documents both recovery paths.

  • PULL_REQUEST_TEMPLATE.md: tells authors to mark breaking changes with ! in the PR title, and not to write the footer text in the description of a non-breaking PR.

The ci: title does not bump the version.

How was it tested?

  • actionlint is clean. zizmor --persona=pedantic only reports the existing self-repository low finding. pre-commit run --all-files passes.
  • Sandbox repo (private, same workflow, stubbed release):
    • A dry run on a pending feat!: succeeds and lists the commit.
    • A normal run is blocked and no tag is created.
    • A fix: commit whose body contains the footer text is blocked, and the list shows it.
    • Running the printed accidental-bump commands creates a lightweight v3.1.2. The push triggers the release exactly once.
    • The next fix: is auto-tagged v3.1.3, released once, and the list step is skipped.
  • I rendered the summary against this repo's main. It lists d52682f with the matching body line and suggests v0.4.2 as the recovery tag.
  • Dry run of this branch on this repo: see the comment below.
  • Reviewed by code-reviewer and change-validator. All findings were addressed, and change-validator's final verdict is APPROVE.

Checklist

  • PR title follows conventional commit format
  • CI passes (check.yaml — lint + test matrix)
  • Tests added or updated for new/changed behavior (sandbox runs above; workflow-only change)
  • Documentation updated if user-facing (CONTRIBUTING.md, PR template)
  • No breaking changes

…majors

- When ccv computes a major bump, list the commits that likely triggered it
  (subject plus matching body lines) in the job summary. Best effort only.
- The blocked-run summary prints two copy-paste runbooks pinned to the run
  SHA: one for an intended major and one for an accidental bump (next patch).
  Both create a lightweight, unsigned tag, which ccv requires.
- CONTRIBUTING.md explains which commit text ccv treats as breaking (it is
  matched anywhere in the message, including the squash PR description) and
  how to recover.
- The PR template tells authors to use feat!/fix! in the PR title.
@clappingmonkey

Copy link
Copy Markdown
Owner Author

Dry run of this branch on this repo: https://github.com/clappingmonkey/rules_odin/actions/runs/39852781810 — computed v1.0.0 (major, from the accidental match in d52682f), List breaking commits succeeded, Report dry run succeeded, Block/Push skipped, release skipped. No tag pushed (latest remote tag is still v0.4.1).

@clappingmonkey
clappingmonkey merged commit a32f3aa into main Oct 22, 2026
16 checks passed
@clappingmonkey
clappingmonkey deleted the ci/tag-list-breaking-commits branch October 22, 2026 21:04
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