What changed, and why it matters
This commit changes an internal CI script so that only major version-number-breaking API changes are flagged, while minor API changes are ignored. It is a workflow/process tweak with no effect on the actual Bitcoin library code that users run.
No security action required. This is a CI policy change, not a code security fix or vulnerability.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies contrib/check-semver-pr.sh. The grep pattern used to detect semver violations changes from a generic ‘FAIL’ match to a regex that only matches lines reporting ‘[1-9][0-9] major . checks failed’. This narrows the CI gate so minor API changes no longer block merges or trigger breaking-change labels. No Rust source code, cryptographic logic, network handling, or public API behavior is altered.
Changed components
contrib/check-semver-pr.shInspect captured patch +8 / −7
diff --git a/contrib/check-semver-pr.sh b/contrib/check-semver-pr.sh
index effbd532..71290eb0 100755
--- a/contrib/check-semver-pr.sh
+++ b/contrib/check-semver-pr.sh
@@ -179,21 +179,22 @@ generate_json_files_features_alloc() {
}
# Check if there are breaking changes.
-# We loop through all the generated files and check if there is a FAIL
-# in the cargo semver-checks output.
-# If we detect a fail, we create an empty file semver-break.
+# We loop through all the generated files and check whether cargo semver-checks
+# reported a major (breaking) change.
+# Minor changes are not breaking and are ignored.
+# If we detect a break, we create an empty file semver-break.
# If the following CI step finds this file, it will add:
# 1. a comment on the PR.
# 2. a label to the PR.
check_for_breaking_changes() {
for file in *semver.txt; do
echo "Checking $file"
- if grep -q "FAIL" "$file"; then
- echo "You have introduced changes to the public API"
- echo "FAIL found in $file"
+ # Only flag major failures. minor changes are ignored.
+ if grep -qE '[1-9][0-9]* major .* checks failed' "$file"; then
+ echo "You have introduced breaking changes to the public API"
+ echo "Major semver break found in $file"
cat "$file"
# flag it as a breaking change
- # Handle the case where FAIL is found
touch semver-break
for crate in "${SEMVER_HARD_FAIL_CRATES[@]}"; do
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.