Fix missing v prefix in changelog compare links#2628
Conversation
The update_changelog_links function generated compare URLs without the v prefix on git tags, producing broken links like .../compare/v16.3.0...16.4.0.rc.10 instead of .../compare/v16.3.0...v16.4.0.rc.10. Also fix cleanup_collapsed_prerelease_links to handle v-prefixed versions when detecting prereleases, and correct the existing broken links in CHANGELOG.md and documentation examples. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughUpdates changelog management to consistently handle v-prefixed git tags in compare links while maintaining v-free headers. Modifies the update_changelog rake task to process v-prefixed versions and generate appropriately formatted links. Updates tests and documentation to reflect the new version prefix handling behavior. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| new_unreleased_link = "#{compare_link_prefix}/#{version}...master" | ||
| new_version_link = "#{anchor}: #{compare_link_prefix}/#{prev_version}...#{version}" | ||
| new_unreleased_link = "#{compare_link_prefix}/v#{version}...master" | ||
| new_version_link = "#{anchor}: #{compare_link_prefix}/#{prev_version}...v#{version}" |
There was a problem hiding this comment.
Minor edge case: prev_version is captured verbatim from the existing [unreleased] line, so if the CHANGELOG was written with the old (no-v) format, the generated link will be 16.x.x...v16.y.y — inconsistent but still functional on GitHub.
This is only a concern for changelogs that haven't been updated through this PR's fix yet. Once the [unreleased] line is correct (i.e. compare/v...master), all subsequent calls will produce fully-consistent links.
If you ever want to make this bulletproof:
| new_version_link = "#{anchor}: #{compare_link_prefix}/#{prev_version}...v#{version}" | |
| new_version_link = "#{anchor}: #{compare_link_prefix}/v#{prev_version.delete_prefix("v")}...v#{version}" |
Not strictly necessary since normalize_version_string guarantees version is always prefix-free, but it would make prev_version handling symmetrical.
| [16.4.0.rc.10]: https://github.com/shakacode/react_on_rails/compare/v16.3.0...16.4.0.rc.10 | ||
| [unreleased]: https://github.com/shakacode/react_on_rails/compare/v16.4.0.rc.10...master | ||
| [16.4.0.rc.10]: https://github.com/shakacode/react_on_rails/compare/v16.3.0...v16.4.0.rc.10 | ||
| [16.3.0]: https://github.com/shakacode/react_on_rails/compare/v16.2.1...v16.3.0 |
There was a problem hiding this comment.
While you're fixing v-prefix consistency, there's a pre-existing inconsistency a few lines below:
[16.2.0]: https://github.com/shakacode/react_on_rails/compare/16.1.1...v16.2.0
16.1.1 is missing its v prefix. Not a blocker for this PR (it's historical and out of scope), but worth a follow-up or one-liner fix here.
Greptile SummaryThis PR fixes a bug where the
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["update_changelog_links(changelog, version, anchor)"] --> B["Match existing [unreleased] compare link"]
B --> C["Extract prev_version from URL"]
C --> D["Build new unreleased link:\n.../compare/v{version}...master"]
C --> E["Build new version link:\n.../compare/{prev_version}...v{version}"]
D --> F["Replace old link with new unreleased + version links"]
E --> F
G["cleanup_collapsed_prerelease_links(changelog, base_version)"] --> H["Scan prerelease compare links"]
H --> I["For each from_version:\ndelete_prefix('v') before matching prerelease pattern"]
I --> J{"Is from_version\na stable version?"}
J -->|Yes| K["Set stable_from = from_version\n(preserves 'v' prefix)"]
J -->|No| H
K --> L["Update [unreleased] link to use stable_from"]
L --> M["Remove all prerelease link lines"]
Last reviewed commit: 0ce48dc |
ReviewThe fix is correct and well-scoped. Here's a quick summary of what I verified: Logic correctness ✅
Tests ✅The new test exercises exactly the scenario that was broken — v-prefixed prerelease compare links — and the existing Minor notes (see inline comments)
Overall: LGTM. Root cause correctly diagnosed, minimal fix applied in the right places, regression coverage added. |
Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Code Review: The core logic changes are correct and well-tested. Correctness cleanup_collapsed_prerelease_links fix: Stripping the v via delete_prefix('v') before matching against prerelease_pattern is the right fix. Without it, a from_version of v16.4.0.rc.0 would not match the pattern (which expects a 16.4.0 prefix, not v16.4.0), so it would be incorrectly treated as a stable version. update_changelog_links fix: Hardcoding v prefix is safe because all call sites pass version strings through normalize_version_string which always strips the v -- no risk of double-prefix. stable_from roundtrip: The captured value (e.g., v16.3.0) is substituted directly into the [unreleased] link, so the v prefix is correctly preserved. Minor observations
Tests: The new test directly exercises the broken scenario (v-prefixed prerelease compare links) and updated expectations match the corrected output. Overall: LGTM -- root cause correctly diagnosed, minimal targeted fix, regression coverage added. |
| new_unreleased_link = "#{compare_link_prefix}/#{version}...master" | ||
| new_version_link = "#{anchor}: #{compare_link_prefix}/#{prev_version}...#{version}" | ||
| new_unreleased_link = "#{compare_link_prefix}/v#{version}...master" | ||
| new_version_link = "#{anchor}: #{compare_link_prefix}/#{prev_version}...v#{version}" |
There was a problem hiding this comment.
Note: prev_version is captured verbatim from the existing [unreleased] link in the CHANGELOG. After this PR's CHANGELOG.md fix the value will be v16.4.0.rc.10 (with v), giving a correct compare/v16.4.0.rc.10...v16.4.0 link. However, if this function were ever called against a legacy CHANGELOG where the [unreleased] line had no v prefix, prev_version would be 16.4.0.rc.10 and the output would be an inconsistent compare/16.4.0.rc.10...v16.4.0. Not a bug in this PR's scope, but something to keep in mind if the function is reused elsewhere.
| @@ -140,9 +140,9 @@ GEM | |||
| cgi (0.5.1) | |||
| childprocess (5.0.0) | |||
| coderay (1.1.3) | |||
There was a problem hiding this comment.
This is a significant major version bump (commonmarker 1.1.4 → 2.7.0). The PR description doesn't mention this change — was this intentional (e.g., from running bundle update)? If so, it might be cleaner to land it in a separate commit or PR so that any breakage from the commonmarker API change can be isolated from the changelog link fix.
## Summary - **Fix `update_changelog_links`** to include the `v` prefix in generated compare URLs. Previously it produced broken links like `.../compare/v16.3.0...16.4.0.rc.10` instead of `.../compare/v16.3.0...v16.4.0.rc.10`. - **Fix `cleanup_collapsed_prerelease_links`** to correctly detect prerelease versions that have a `v` prefix when determining the stable "from" version. - **Fix existing broken links** in CHANGELOG.md for the 16.4.0.rc.10 entry. - **Fix documentation** in `.claude/commands/update-changelog.md` — clarify that compare link URLs must use the `v` prefix (only changelog headers omit it). - **Add test** for `v`-prefixed prerelease links in cleanup function. ## Test plan - [x] All 27 `update_changelog_rake_helpers_spec.rb` tests pass - [x] New test verifies cleanup handles `v`-prefixed prerelease compare links - [x] RuboCop clean - [ ] Verify fixed CHANGELOG link works: v16.3.0...v16.4.0.rc.10 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only adjusts changelog link generation/cleanup logic and related documentation/tests; no runtime library behavior changes. > > **Overview** > Fixes changelog compare URLs to consistently use the git-tag `v` prefix (while keeping changelog headers unprefixed), preventing broken GitHub compare links. > > Updates the `update_changelog` rake helpers to generate `v`-prefixed `[unreleased]` and version links and to correctly detect stable “from” versions when prerelease compare links include a `v` prefix; adds regression coverage for this case and corrects existing broken links in `CHANGELOG.md` plus clarifying guidance in `.claude/commands/update-changelog.md`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0ce48dc. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated changelog guidance for consistent version tag formatting in links. * **Chores** * Improved changelog link accuracy and version tag consistency. * Enhanced changelog link generation for better reliability. * **Tests** * Added test coverage for version tag handling in changelog links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary Syncs recent improvements from shakacode/react_on_rails (PRs [#2596](shakacode/react_on_rails#2596), [#2608](shakacode/react_on_rails#2608), [#2628](shakacode/react_on_rails#2628)) into the `/update-changelog` command. **Changes to `.claude/commands/update-changelog.md`:** - **Explicit version argument**: `/update-changelog 9.7.0.rc.10` now stamps the exact version provided, skipping auto-computation - **Git-tags-only RC index**: RC/beta index computation now uses only git tags, not changelog headers (headers are drafts, tags are shipped versions) - **Ambiguous bump explanation**: Version confirmation step now explains reasoning when bump type is ambiguous and asks user to confirm/override - **Tag reconciliation step**: New Step 2 catches missing version sections by comparing git tags against changelog headers (the #1 source of errors when skipped) - **Auto-commit/push/PR**: When stamping versions (`release`/`rc`/`beta`/explicit), automatically creates branch, commits, pushes, and opens PR - **Heading consolidation**: Prerelease collapse now consolidates duplicate category headings (e.g., two `### Fixed` become one) - **Orphaned link cleanup**: Prerelease collapse removes leftover compare links for collapsed prerelease sections - **v prefix clarity**: Explicit note that compare links must use `v` prefix to match git tags - **Header placement rule**: New version header must go immediately after `## [Unreleased]` **No changes to `rakelib/release.rake` or `docs/releasing.md`** — react_on_rails had no changes to those files in the last 3 days. ## Test plan - [ ] Run `/update-changelog` and verify the new tag reconciliation step (Step 2) runs before adding entries - [ ] Run `/update-changelog rc` and verify RC index is computed from git tags only - [ ] Run `/update-changelog 9.7.0` and verify explicit version stamps correctly - [ ] Run `/update-changelog release` and verify it auto-commits, pushes, and opens PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk because this PR only updates the `.claude/commands/update-changelog.md` documentation/workflow guidance and does not change runtime code paths. > > **Overview** > Updates the `/update-changelog` command guide to support *explicit version stamping* and to clarify that RC/beta increments must be derived **only from git tags** (not draft changelog headers), with improved user confirmation when version bump type is ambiguous. > > Reworks the process steps to add an upfront **tag-vs-changelog reconciliation** phase for missing release sections, clarifies compare-link `v`-prefix requirements and header placement, and expands prerelease-collapsing rules (merge duplicate category headings, remove orphaned diff links). When stamping versions (`release`/`rc`/`beta`/explicit), the guide now instructs auto-creating a branch, committing, pushing, and opening a PR. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b116cc2. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added explicit-version option and validation requiring it to be newer than existing tags. * Updated 5-step workflow with a reconciliation step that creates/moves version sections and consolidates prereleases. * Enforced v-prefix for bottom compare links and expanded formatting/verification guidance, plus CRITICAL insertion position note. * **New Features** * Shows computed version with confirmation prompt, explains ambiguous bumps, and summarizes actions taken. * Optional auto-commit/PR creation limited to CHANGELOG.md. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary Syncs recent improvements from shakacode/react_on_rails (PRs [#2596](shakacode/react_on_rails#2596), [#2608](shakacode/react_on_rails#2608), [#2628](shakacode/react_on_rails#2628)) into the `/update-changelog` command. **Changes to `.claude/commands/update-changelog.md`:** - **Explicit version argument**: `/update-changelog 9.7.0.rc.10` now stamps the exact version provided, skipping auto-computation - **Git-tags-only RC index**: RC/beta index computation now uses only git tags, not changelog headers (headers are drafts, tags are shipped versions) - **Ambiguous bump explanation**: Version confirmation step now explains reasoning when bump type is ambiguous and asks user to confirm/override - **Tag reconciliation step**: New Step 2 catches missing version sections by comparing git tags against changelog headers (the #1 source of errors when skipped) - **Auto-commit/push/PR**: When stamping versions (`release`/`rc`/`beta`/explicit), automatically creates branch, commits, pushes, and opens PR - **Heading consolidation**: Prerelease collapse now consolidates duplicate category headings (e.g., two `### Fixed` become one) - **Orphaned link cleanup**: Prerelease collapse removes leftover compare links for collapsed prerelease sections - **v prefix clarity**: Explicit note that compare links must use `v` prefix to match git tags - **Header placement rule**: New version header must go immediately after `## [Unreleased]` **No changes to `rakelib/release.rake` or `docs/releasing.md`** — react_on_rails had no changes to those files in the last 3 days. ## Test plan - [ ] Run `/update-changelog` and verify the new tag reconciliation step (Step 2) runs before adding entries - [ ] Run `/update-changelog rc` and verify RC index is computed from git tags only - [ ] Run `/update-changelog 9.7.0` and verify explicit version stamps correctly - [ ] Run `/update-changelog release` and verify it auto-commits, pushes, and opens PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk because this PR only updates the `.claude/commands/update-changelog.md` documentation/workflow guidance and does not change runtime code paths. > > **Overview** > Updates the `/update-changelog` command guide to support *explicit version stamping* and to clarify that RC/beta increments must be derived **only from git tags** (not draft changelog headers), with improved user confirmation when version bump type is ambiguous. > > Reworks the process steps to add an upfront **tag-vs-changelog reconciliation** phase for missing release sections, clarifies compare-link `v`-prefix requirements and header placement, and expands prerelease-collapsing rules (merge duplicate category headings, remove orphaned diff links). When stamping versions (`release`/`rc`/`beta`/explicit), the guide now instructs auto-creating a branch, committing, pushing, and opening a PR. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit b116cc2. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added explicit-version option and validation requiring it to be newer than existing tags. * Updated 5-step workflow with a reconciliation step that creates/moves version sections and consolidates prereleases. * Enforced v-prefix for bottom compare links and expanded formatting/verification guidance, plus CRITICAL insertion position note. * **New Features** * Shows computed version with confirmation prompt, explains ambiguous bumps, and summarizes actions taken. * Optional auto-commit/PR creation limited to CHANGELOG.md. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary Recent commits (15f6cfc, 078a8b0, 97f4625) updated `update_changelog.rake` and `update-changelog.md` with significant improvements (orphaned prerelease link cleanup, v prefix fix for compare links, consolidate/deduplicate blocks, explicit version support, auto-commit/push/PR). However `releasing.md` was not updated to match, leaving stale instructions. - **releasing.md**: Update step 1 to reflect `/update-changelog` now supports explicit versions, collapses prereleases with dedup, and auto-commits/pushes/opens a PR (removes manual "commit and push CHANGELOG.md" step) - **releasing.md**: Add note about `v` prefix requirement in CHANGELOG compare links (per #2628 fix) - **releasing.md**: Update Option A post-release instructions to match new auto-PR behavior - **update-changelog.md**: Fix stale description saying version computed from "changelog headings and git tags" -- prerelease index is now determined solely from git tags No changes to `release.rake` -- it was not affected by the recent changes. ## Test plan - [ ] Verify `releasing.md` step 1 accurately describes current `/update-changelog` behavior - [ ] Verify compare link `v` prefix note matches actual `update_changelog_links()` behavior - [ ] Verify `update-changelog.md` description matches `compute_auto_version()` logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only updates that align release/changelog instructions with current automation behavior; no runtime code paths or release tooling logic changed. > > **Overview** > Aligns release and changelog docs with the updated `/update-changelog` automation: explicit version support, skipping auto-versioning when provided, prerelease section collapse/dedup, and auto commit/push/PR creation. > > Clarifies versioning/link rules (prerelease index derived from git tags only; CHANGELOG compare links must use `v`-prefixed tags), updates instructions from `master` to `main`, and refreshes post-release catch-up steps to use the new auto-PR flow. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a48394a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added support for explicit prerelease/versions (e.g., 16.5.0.rc.10); auto-version computation is skipped when explicit version provided * Clarified prerelease changelog handling: collapse prior prerelease sections, deduplicate entries, and derive prerelease index from git tags * Documented automated workflow: command can automatically commit, push, and open a PR (now requires working on main) * Require changelog compare links to use v-prefixed tag names and compare against main <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary - **Fix `update_changelog_links`** to include the `v` prefix in generated compare URLs. Previously it produced broken links like `.../compare/v16.3.0...16.4.0.rc.10` instead of `.../compare/v16.3.0...v16.4.0.rc.10`. - **Fix `cleanup_collapsed_prerelease_links`** to correctly detect prerelease versions that have a `v` prefix when determining the stable "from" version. - **Fix existing broken links** in CHANGELOG.md for the 16.4.0.rc.10 entry. - **Fix documentation** in `.claude/commands/update-changelog.md` — clarify that compare link URLs must use the `v` prefix (only changelog headers omit it). - **Add test** for `v`-prefixed prerelease links in cleanup function. ## Test plan - [x] All 27 `update_changelog_rake_helpers_spec.rb` tests pass - [x] New test verifies cleanup handles `v`-prefixed prerelease compare links - [x] RuboCop clean - [ ] Verify fixed CHANGELOG link works: v16.3.0...v16.4.0.rc.10 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only adjusts changelog link generation/cleanup logic and related documentation/tests; no runtime library behavior changes. > > **Overview** > Fixes changelog compare URLs to consistently use the git-tag `v` prefix (while keeping changelog headers unprefixed), preventing broken GitHub compare links. > > Updates the `update_changelog` rake helpers to generate `v`-prefixed `[unreleased]` and version links and to correctly detect stable “from” versions when prerelease compare links include a `v` prefix; adds regression coverage for this case and corrects existing broken links in `CHANGELOG.md` plus clarifying guidance in `.claude/commands/update-changelog.md`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0ce48dc. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated changelog guidance for consistent version tag formatting in links. * **Chores** * Improved changelog link accuracy and version tag consistency. * Enhanced changelog link generation for better reliability. * **Tests** * Added test coverage for version tag handling in changelog links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary Recent commits (15f6cfc, 078a8b0, 97f4625) updated `update_changelog.rake` and `update-changelog.md` with significant improvements (orphaned prerelease link cleanup, v prefix fix for compare links, consolidate/deduplicate blocks, explicit version support, auto-commit/push/PR). However `releasing.md` was not updated to match, leaving stale instructions. - **releasing.md**: Update step 1 to reflect `/update-changelog` now supports explicit versions, collapses prereleases with dedup, and auto-commits/pushes/opens a PR (removes manual "commit and push CHANGELOG.md" step) - **releasing.md**: Add note about `v` prefix requirement in CHANGELOG compare links (per #2628 fix) - **releasing.md**: Update Option A post-release instructions to match new auto-PR behavior - **update-changelog.md**: Fix stale description saying version computed from "changelog headings and git tags" -- prerelease index is now determined solely from git tags No changes to `release.rake` -- it was not affected by the recent changes. ## Test plan - [ ] Verify `releasing.md` step 1 accurately describes current `/update-changelog` behavior - [ ] Verify compare link `v` prefix note matches actual `update_changelog_links()` behavior - [ ] Verify `update-changelog.md` description matches `compute_auto_version()` logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only updates that align release/changelog instructions with current automation behavior; no runtime code paths or release tooling logic changed. > > **Overview** > Aligns release and changelog docs with the updated `/update-changelog` automation: explicit version support, skipping auto-versioning when provided, prerelease section collapse/dedup, and auto commit/push/PR creation. > > Clarifies versioning/link rules (prerelease index derived from git tags only; CHANGELOG compare links must use `v`-prefixed tags), updates instructions from `master` to `main`, and refreshes post-release catch-up steps to use the new auto-PR flow. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a48394a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added support for explicit prerelease/versions (e.g., 16.5.0.rc.10); auto-version computation is skipped when explicit version provided * Clarified prerelease changelog handling: collapse prior prerelease sections, deduplicate entries, and derive prerelease index from git tags * Documented automated workflow: command can automatically commit, push, and open a PR (now requires working on main) * Require changelog compare links to use v-prefixed tag names and compare against main <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary - **Fix `update_changelog_links`** to include the `v` prefix in generated compare URLs. Previously it produced broken links like `.../compare/v16.3.0...16.4.0.rc.10` instead of `.../compare/v16.3.0...v16.4.0.rc.10`. - **Fix `cleanup_collapsed_prerelease_links`** to correctly detect prerelease versions that have a `v` prefix when determining the stable "from" version. - **Fix existing broken links** in CHANGELOG.md for the 16.4.0.rc.10 entry. - **Fix documentation** in `.claude/commands/update-changelog.md` — clarify that compare link URLs must use the `v` prefix (only changelog headers omit it). - **Add test** for `v`-prefixed prerelease links in cleanup function. ## Test plan - [x] All 27 `update_changelog_rake_helpers_spec.rb` tests pass - [x] New test verifies cleanup handles `v`-prefixed prerelease compare links - [x] RuboCop clean - [ ] Verify fixed CHANGELOG link works: v16.3.0...v16.4.0.rc.10 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only adjusts changelog link generation/cleanup logic and related documentation/tests; no runtime library behavior changes. > > **Overview** > Fixes changelog compare URLs to consistently use the git-tag `v` prefix (while keeping changelog headers unprefixed), preventing broken GitHub compare links. > > Updates the `update_changelog` rake helpers to generate `v`-prefixed `[unreleased]` and version links and to correctly detect stable “from” versions when prerelease compare links include a `v` prefix; adds regression coverage for this case and corrects existing broken links in `CHANGELOG.md` plus clarifying guidance in `.claude/commands/update-changelog.md`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0ce48dc. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated changelog guidance for consistent version tag formatting in links. * **Chores** * Improved changelog link accuracy and version tag consistency. * Enhanced changelog link generation for better reliability. * **Tests** * Added test coverage for version tag handling in changelog links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
## Summary Recent commits (15f6cfc, 078a8b0, 97f4625) updated `update_changelog.rake` and `update-changelog.md` with significant improvements (orphaned prerelease link cleanup, v prefix fix for compare links, consolidate/deduplicate blocks, explicit version support, auto-commit/push/PR). However `releasing.md` was not updated to match, leaving stale instructions. - **releasing.md**: Update step 1 to reflect `/update-changelog` now supports explicit versions, collapses prereleases with dedup, and auto-commits/pushes/opens a PR (removes manual "commit and push CHANGELOG.md" step) - **releasing.md**: Add note about `v` prefix requirement in CHANGELOG compare links (per #2628 fix) - **releasing.md**: Update Option A post-release instructions to match new auto-PR behavior - **update-changelog.md**: Fix stale description saying version computed from "changelog headings and git tags" -- prerelease index is now determined solely from git tags No changes to `release.rake` -- it was not affected by the recent changes. ## Test plan - [ ] Verify `releasing.md` step 1 accurately describes current `/update-changelog` behavior - [ ] Verify compare link `v` prefix note matches actual `update_changelog_links()` behavior - [ ] Verify `update-changelog.md` description matches `compute_auto_version()` logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only updates that align release/changelog instructions with current automation behavior; no runtime code paths or release tooling logic changed. > > **Overview** > Aligns release and changelog docs with the updated `/update-changelog` automation: explicit version support, skipping auto-versioning when provided, prerelease section collapse/dedup, and auto commit/push/PR creation. > > Clarifies versioning/link rules (prerelease index derived from git tags only; CHANGELOG compare links must use `v`-prefixed tags), updates instructions from `master` to `main`, and refreshes post-release catch-up steps to use the new auto-PR flow. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a48394a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added support for explicit prerelease/versions (e.g., 16.5.0.rc.10); auto-version computation is skipped when explicit version provided * Clarified prerelease changelog handling: collapse prior prerelease sections, deduplicate entries, and derive prerelease index from git tags * Documented automated workflow: command can automatically commit, push, and open a PR (now requires working on main) * Require changelog compare links to use v-prefixed tag names and compare against main <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
Summary
update_changelog_linksto include thevprefix in generated compare URLs. Previously it produced broken links like.../compare/v16.3.0...16.4.0.rc.10instead of.../compare/v16.3.0...v16.4.0.rc.10.cleanup_collapsed_prerelease_linksto correctly detect prerelease versions that have avprefix when determining the stable "from" version..claude/commands/update-changelog.md— clarify that compare link URLs must use thevprefix (only changelog headers omit it).v-prefixed prerelease links in cleanup function.Test plan
update_changelog_rake_helpers_spec.rbtests passv-prefixed prerelease compare links🤖 Generated with Claude Code
Note
Low Risk
Low risk: only adjusts changelog link generation/cleanup logic and related documentation/tests; no runtime library behavior changes.
Overview
Fixes changelog compare URLs to consistently use the git-tag
vprefix (while keeping changelog headers unprefixed), preventing broken GitHub compare links.Updates the
update_changelograke helpers to generatev-prefixed[unreleased]and version links and to correctly detect stable “from” versions when prerelease compare links include avprefix; adds regression coverage for this case and corrects existing broken links inCHANGELOG.mdplus clarifying guidance in.claude/commands/update-changelog.md.Written by Cursor Bugbot for commit 0ce48dc. Configure here.
Summary by CodeRabbit
Documentation
Chores
Tests