Repository navigation
fix(changelog): count fragments without the bad substitution that stopped the cut - #1655
Merged
Merged
Conversation
The self-test only called merge_unreleased, so the code after the merge never ran in CI. A dry run and a fold with a version both fail today on a bad substitution in the fragment count.
…pped the cut
${#fragments[@]:-0} is not valid bash, so changelog-fold.sh died after the
merge on every dry run and every fold with a version, and cut-release.sh
could not prepare v0.5.3-rc.1. Initialize the array once and count it
plainly; --render leaves it empty and takes the else branch as before.
2 tasks done
neochaotic
added a commit
that referenced
this pull request
Oct 10, 2026
…pped the cut (#1655) ${#fragments[@]:-0} is not valid bash, so changelog-fold.sh died after the merge on every dry run and every fold with a version, and cut-release.sh could not prepare v0.5.3-rc.1. Initialize the array once and count it plainly; --render leaves it empty and takes the else branch as before. (cherry picked from commit 6c1d6fa)
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.
What & why
scripts/changelog-fold.shcounted fragments with${#fragments[@]:-0}, which is not valid bash. Every dry run and every fold with a version died right after the merge withbad substitution, soscripts/cut-release.sh v0.5.3-rc.1stopped while preparing the release branch:The self-test only called
merge_unreleased, so that code never ran in CI. This initializes the array once and counts it plainly;--renderleaves it empty and keeps taking the else branch.How it was tested
changiestub, then runs the real entry point:--dry-run <version>and<version>. It asserts the exit codes, the folded entry, and that only the real fold removes the fragment. The test commit comes first and fails (exit 1 on both runs); the fix commit turns it green.bash scripts/check-script-selftests.sh: 40 self-tests pass.scripts/changelog-fold.sh --dry-run 0.5.99with real changie v1.24.0 on this branch: 97 fragments would be folded, exit 0, nothing changed.Checklist
/api/v2/surface unchangedskip-changelog, release tooling with no user-facing changeSkip-docs: fixes a crash in the release tooling; no behavior users see changes.
Generated by Claude Code