Skip to content

🩹 fix(skills): make bump_release.sh accept patch, minor and major bumps - #813

Open
codekiln wants to merge 18 commits into
mainfrom
i760-bump-release-fixes
Open

codekiln wants to merge 18 commits into
mainfrom
i760-bump-release-fixes

Conversation

@codekiln

@codekiln codekiln commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

from AI(claude-code, claude-sonnet-5-5, i760-bump-release-fixes)

Fixes #760 (bump-release: JSON mode treats every bump as a failure, and feat! parses as MINOR)

  • The release script bump_release.sh stopped with "Failed to analyze commits" whenever analyze_commits.py found a release to make, because that program reports patch, minor and major as exit codes 1, 2 and 3. The script now stops only when the exit code is above 3 or the output is not JSON. prepare-release.yml reads the same exit codes, so the workflow is unchanged.
  • On main, bump_release.sh also stopped when there was nothing to release, with a Python JSONDecodeError. The analyze_commits() function printed its "Analyzing commits since last release..." line to stdout, in front of the JSON that main() reads. That line now goes to stderr, and messages from analyze_commits.py reach the terminal directly, so the function prints only the JSON on stdout.
  • bump_release.sh starts a release only when you run it as a program, so a test can load its functions without starting one.
  • Issue bump-release: JSON mode treats every bump as a failure, and feat! parses as MINOR #760 also said that feat!: and feat(scope)!: commits count as MINOR. That is wrong: the regex in analyze_commits.py already reads the ! and returns MAJOR on main, so this PR adds tests for both forms.
  • Run mise run skills:test-bump-release to check commit parsing and the script's handling of each exit code; mise run check runs it too. Against the script on main, the tests for patch, minor, major, no bump and an exit code above 3 fail. The no-commits test passes on main as well, because the old script also stops when there are no commits. The commit-parsing tests pass on main because this PR leaves analyze_commits.py unchanged.

Decisions for codekiln

Add the bump-release script tests to CI?

I recommend adding a CI step for these tests: they finish in a few seconds and need no credentials. Without a CI job, a change that breaks bump_release.sh passes review, and nobody finds out until someone next runs the bump-release skill. I left the job out because #760 asks only for the script fix; say yes and I will add a step to .github/workflows/ci.yml.

🤖 Generated with Claude Code

…t feat! parsing

analyze_commits.py exits 0-3 for NONE/PATCH/MINOR/MAJOR, so bump_release.sh
must not treat a nonzero exit as failure. Keep stderr and the progress line
out of the JSON. Add tests for JSON mode on every bump and for feat! and
feat(scope)! parsing, run by `mise run skills:test-bump-release` and by
`mise run check`.

#760 bump-release: JSON mode treats every bump as a failure, and feat! parses as MINOR
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 21:47
@codekiln codekiln added bug Something isn't working wip Not ready yet: an open PR short of the ready bar, or an issue an open PR closes labels Oct 13, 2026
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Results

233 tests  ±0   233 ✅ ±0   3s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 95ccf31. ± Comparison against base commit c42b410.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The newly enforced rejection of exit codes above 3 lacks regression coverage.

1 open finding
What changed in this PR

Fixes bump-release JSON handling and adds regression coverage for commit parsing and exit-code behavior.

Changes:

  • Accepts bump exit codes 0–3 while preserving clean JSON output.
  • Makes the release script sourceable for testing.
  • Adds bump-release tests to the local check chain.
File Description
.rulesync/​skills/​bump-release/​scripts/​bump_release.sh Corrects JSON-mode exit handling and execution guard.
tests/​bump_release/​test_bump_release.py Tests parsing, JSON output, and bump exit codes.
mise-tasks/​skills/​test-bump-release Adds the Python test task.
mise-tasks/​check Runs the new tests during local checks.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

SDK Integration Test Results

346 tests  ±0   346 ✅ ±0   12s ⏱️ -1s
 14 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 95ccf31. ± Comparison against base commit c42b410.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Results

467 tests  ±0   467 ✅ ±0   1m 22s ⏱️ -32s
 15 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 95ccf31. ± Comparison against base commit c42b410.

♻️ This comment has been updated with latest results.

…ase.sh

#760 bump-release: JSON mode treats every bump as a failure, and feat! parses as MINOR
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 21:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation matches the documented exit-code contract and provides focused regression coverage.

1 open finding

🧠 Review effort: Balanced

…o reports what

#760 bump-release: JSON mode treats every bump as a failure, and feat! parses as MINOR
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 21:55
@codekiln codekiln changed the title 🩹 fix(skills): bump-release JSON mode accepts exit codes 1-3, and test feat! parsing 🩹 fix(skills): bump-release no longer stops when the commit analyzer reports a patch, minor or major bump Oct 13, 2026
…'s jargon

#760 bump-release: JSON mode treats every bump as a failure, and feat! parses as MINOR
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The regression suite is not executed by CI, so the fixed behavior remains unenforced during pull-request checks.

1 open finding
Previously missed (1)

In code that hasn't changed since last review

Medium severity Release script regression tests are not run in CI

mise-tasks/​check:14

The new regression suite is only reachable through the local mise run check chain. .github/workflows/ci.yml runs its Rust commands directly and invokes neither check nor skills:test-bump-release, so a future breakage of this release script can still pass every PR check. Please add this task as a CI step/job so these tests enforce the fix during review.

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 13, 2026 21:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The fix preserves the analyzer exit-code contract and has focused coverage for successful and erroneous outcomes.

1 open finding

🧠 Review effort: Balanced

@codekiln codekiln added ready-for-review Green CI, no open threads, Copilot settled; ready for codekiln to review and merge and removed wip Not ready yet: an open PR short of the ready bar, or an issue an open PR closes labels Oct 14, 2026
@codekiln codekiln added wip Not ready yet: an open PR short of the ready bar, or an issue an open PR closes and removed ready-for-review Green CI, no open threads, Copilot settled; ready for codekiln to review and merge labels Oct 14, 2026
@codekiln
codekiln requested a balanced review from Copilot October 14, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The exit-code fix is correct and adequately covered by focused integration tests.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@codekiln codekiln left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from AI(claude-code, claude-opus-5-5, langstar-label-rules)

AI (codekiln-review): The body's second bullet says what changed on stdout and leaves out the bug it fixes:

The analyze_commits() function in bump_release.sh now prints only the JSON on stdout. Messages from analyze_commits.py reach the terminal directly, and the function's "Analyzing commits since last release..." line goes to stderr.

The first bullet says the script stopped "whenever analyze_commits.py found a release to make", so a reader takes a run with nothing to release as working on main. It was not. I ran the bump_release.sh from origin/main with --dry-run --skip-checks in a scratch repository whose only commit after v1.2.3 was 📚 docs: reword, and it stopped with a Python json.decoder.JSONDecodeError: analyze_commits() printed its progress line to stdout, in front of the JSON that main() reads. The script at this commit prints "No releasable commits found since last release" for the same repository. Without that fact, codekiln reaches "the tests for patch, minor, major, no bump and an exit code above 3 fail" in the last bullet and has to work out why the no-bump test fails on main when the first bullet blamed only exit codes 1, 2 and 3.

Rules: My/Pref/Writing/Be specific and explicit and My/AI/Rule/How to Communicate Effectively With Me/Be like the holograms Data from ST:TNG conferred with.

Rewrite of the second bullet:

On main, bump_release.sh also stopped when there was nothing to release, with a Python JSONDecodeError. The analyze_commits() function printed its "Analyzing commits since last release..." line to stdout, in front of the JSON that main() reads. That line now goes to stderr, and messages from analyze_commits.py reach the terminal directly, so the function prints only the JSON on stdout.

@codekiln

Copy link
Copy Markdown
Owner Author

from AI(claude-code, claude-opus-5-5, langstar-label-rules)

AI (codekiln-review): Answering review 5715765570. The body's second bullet now reads:

On main, bump_release.sh also stopped when there was nothing to release, with a Python JSONDecodeError. The analyze_commits() function printed its "Analyzing commits since last release..." line to stdout, in front of the JSON that main() reads. That line now goes to stderr, and messages from analyze_commits.py reach the terminal directly, so the function prints only the JSON on stdout.

@codekiln codekiln left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from AI(claude-code, claude-opus-5-5, langstar-label-rules)

AI (codekiln-review): The CI decision says a broken script fails the next release, but no release step runs bump_release.sh.

Without a CI job, a change that breaks the script passes review and fails at the next release.

codekiln decides on this recommendation from this sentence, and the consequence it gives does not happen. The Prepare Release workflow runs analyze_commits.py directly, at prepare-release.yml:62, and git grep bump_release.sh finds the script named only in the bump-release skill's SKILL.md. I ran the bump_release.sh from origin/main in a scratch repository: it stopped with a release to make, with nothing to release and with no commits since the tag. Its analyze_commits() has read the analyzer that way since 94381dc ✨ feat: add automated CI/CD release pipeline with cross-platform builds (#146), and every release from v0.3.0 to v2.2.0 went out in that time. A break in bump_release.sh shows up the next time someone runs the skill by hand. Rules: My/Pref/Writing/Win the Reader's Trust and My/Pref/Writing/Be specific and explicit.

Rewrite:

Without a CI job, a change that breaks bump_release.sh passes review, and nobody finds out until someone next runs the bump-release skill.

@codekiln

Copy link
Copy Markdown
Owner Author

from AI(claude-code, claude-opus-5-5, langstar-label-rules)

AI (codekiln-review): Answering review 5715838670. The CI paragraph under "Decisions for codekiln" now reads:

Without a CI job, a change that breaks bump_release.sh passes review, and nobody finds out until someone next runs the bump-release skill.

@codekiln codekiln removed the wip Not ready yet: an open PR short of the ready bar, or an issue an open PR closes label Oct 30, 2026
@codekiln codekiln added ready-for-review Green CI, no open threads, Copilot settled; ready for codekiln to review and merge recommended-next-review The one ready PR codekiln should review next. Only one open PR has it. labels Oct 30, 2026 — with Claude
@codekiln codekiln removed ready-for-review Green CI, no open threads, Copilot settled; ready for codekiln to review and merge recommended-next-review The one ready PR codekiln should review next. Only one open PR has it. labels Oct 30, 2026
@codekiln codekiln added the wip Not ready yet: an open PR short of the ready bar, or an issue an open PR closes label Oct 30, 2026 — with Claude
Copilot AI balanced review requested due to automatic review settings October 30, 2026 19:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block approval of the analyzer-result handling changes.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 30, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block approval of the analyzer-result handling changes.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 31, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the analyzer-result handling fix.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 1, 2026 18:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the release-analysis exit-code fix and its regression-test additions.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 1, 2026 19:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block approval of the analyzer exit-code handling changes.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: medium Review after high: bug fixes and features with no open decision wip Not ready yet: an open PR short of the ready bar, or an issue an open PR closes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bump-release: JSON mode treats every bump as a failure, and feat! parses as MINOR

2 participants