Skip to content

ci: check before releasing, and make a minor a checkbox - #466

Merged
hughgrigg merged 2 commits into
mainfrom
ci/hg/check-before-release
Aug 6, 2026
Merged

ci: check before releasing, and make a minor a checkbox#466
hughgrigg merged 2 commits into
mainfrom
ci/hg/check-before-release

Conversation

@hughgrigg

@hughgrigg hughgrigg commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Two changes to how a release is decided and gated.

Checks before releasing. The release job packed the tarball but ran neither
linters nor tests. The main ruleset has
strict_required_status_checks_policy: false, so two branches that were each
green in isolation can break main together — reachable, not theoretical.

A minor is now a checkbox. Everything that ships is a patch; a minor is
asked for when starting the workflow. Ladder: patch automatically, minor by
checkbox, major by hand and never from this workflow.

One thing worth a reviewer's attention: the { breaking: true, release: major }
rule must stay first in releaseRules. Without it the feat rule matches
feat!: too and a breaking change ships as a patch. The preset switch to
conventionalcommits is what makes feat!: parse at all — under angular it
matched no rule and released nothing, silently.

The release job built and packed the tarball but ran neither the linters
nor the tests, so the last thing standing between main and the registry
checked less than a pull request does.

That gap is reachable. The main ruleset does not require a pull request to
be up to date with main before merging, so two branches that were each
green on their own can break main together, and nothing would have caught
it until someone installed the published version.

Spelled out step by step rather than calling `pnpm check`, which starts by
rewriting files with `pnpm fmt` instead of reporting on them.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow now reruns pull request checks against main before packaging. The Pack check description identifies this validation as the final publishing gate.

Changes

Release validation

Layer / File(s) Summary
Release-time validation gate
.github/workflows/release.yml
The workflow runs linting, type analysis, build checks, example checks, and coverage tests before packaging. The Pack check description identifies this as the final gate for main.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding CI checks before release.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/hg/check-before-release

Comment @coderabbitai help to get the list of available commands.

Anything that ships is now a patch, and a minor is asked for by ticking a
box when starting the workflow. Whether a batch is significant enough to
be a minor is a judgement about the release as a whole, made once by a
person looking at all of it, rather than one each commit subject has to
make correctly. Keeping it there is also what keeps the minor number
meaning something.

Switches the analyzer to the conventionalcommits preset so that "feat!:"
parses at all. Under the angular preset its header pattern has no room for
the "!", so the type failed to parse, no rule matched, and a breaking
change released nothing at all — silently, which is the worst way for it
to go wrong.

The breaking rule is first in releaseRules and has to stay there. Without
it the feat rule matches "feat!: …" too and a breaking change goes out as
a patch. With it, both that and a BREAKING CHANGE: footer reach the guard
and fail the run, which is where a major belongs: in a person's hands.
@hughgrigg hughgrigg changed the title ci: run the checks before releasing ci: check before releasing, and make a minor a checkbox Aug 6, 2026
@hughgrigg
hughgrigg merged commit d50f535 into main Aug 6, 2026
2 checks passed
@hughgrigg
hughgrigg deleted the ci/hg/check-before-release branch August 6, 2026 21:43
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