Check semver compliance on release bump PRs - #1804
Merged
Merged
Conversation
spacebear21
marked this pull request as draft
August 10, 2026 16:54
The release scripts will invoke cargo-semver-checks to catch API changes that require a bigger version bump than the one declared. Provide the tool via the release devshell so the check runs identically locally and in CI, per the devshell tooling rule.
The only API gate at release time is cargo publish --dry-run, which cannot tell whether the declared bump is large enough for the API changes it ships. Run cargo-semver-checks in check-bump for each payjoin bump, comparing the crate against its version at the PR base. The base version is passed explicitly as the baseline so the comparison stays correct even when crates.io carries a newer release, such as a bump on a maintenance branch. Pre-release comparisons are skipped: semver classifies them as major bumps, which permit any change, so running the tool there proves nothing. Scope is payjoin only; payjoin-cli has no library API and payjoin-mailroom's is not yet stable. Note the tool has known false negatives (some generic, lifetime, and type-position changes), so it complements the changelog's Breaking markers rather than replacing them.
Collaborator
Coverage Report for CI Build 31412812872Coverage remained the same at 86.718%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Collaborator
Author
|
The last commit ( Since payjoin 1.0.0 is merged but not yet published, the job currently demonstrates the unpublished-baseline guard ( |
spacebear21
force-pushed
the
semver-checks
branch
from
August 10, 2026 17:11
0130c83 to
4d05b4c
Compare
Collaborator
|
CACK 6d1dc3b Though we should probably still re-run after 1.0 is public |
spacebear21
force-pushed
the
semver-checks
branch
from
August 11, 2026 13:27
4d05b4c to
6d1dc3b
Compare
spacebear21
marked this pull request as ready for review
August 11, 2026 13:27
benalleng
approved these changes
Aug 11, 2026
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.
Integrates cargo-semver-checks into the release flow. The only API gate at release time today is
cargo publish --dry-run, which can't tell whether the declared bump is large enough for the API changes it ships.Design
check-bump.sh, which already computes the changed release crates and their base versions. This is how the tool is designed to run: the bump PR declares the actual new version, so the tool compares the required bump against the declared one with no configuration overrides. A continuous per-PR check was considered and rejected: between releases the workspace version equals the published baseline, so the tool would demand a version bump for any public API addition, and bumpingpayjoin/Cargo.tomlin a feature PR would itself trigger this release workflow.--baseline-versioninstead of relying on the tool's default "latest on crates.io" lookup, so the comparison stays correct even if crates.io carries a newer release (e.g. a bump on a maintenance branch).payjoinbump after 1.0.0, with no config change needed at that point.payjoinonly:payjoin-clihas no library API, andpayjoin-mailroomcan be added by widening the guard once its API stabilizes._-prefixed ones, so it checksv1/v2/io/directory(which transitively enable_core, where the public API lives) and correctly excludes the unstable_manual-tls. No feature configuration needed.nixpkgs-unstableinput rather than the 25.11 branch: the release-branch version (0.45.0) predates the rustdoc JSON format (v57) emitted by rust-overlay's current stable toolchain, while unstable's 0.48.0 reads it. If this check ever errors with "unsupported rustdoc format", the fix is a flake input bump.Verified locally by running
check-bump.shagainst a pre-rc.8 base SHA (detects the bump, takes the pre-release skip path) and by adding a variant to an exhaustive public enum, which the tool correctly rejects as requiring a major bump. Note the tool has known false negatives (some generic/lifetime/type-position changes), so it complements the changelog's**Breaking:**markers rather than replacing them.Disclosure: co-authored by Claude Code