Port update-changelog improvements from react_on_rails#982
Conversation
Syncs recent improvements from shakacode/react_on_rails PRs #2596, #2608, and #2628 into the update-changelog command: - Add explicit version argument support (e.g., /update-changelog 9.7.0.rc.10) - RC index computation now uses only git tags, not changelog headers - Version confirmation explains ambiguity and asks user to confirm/override - New Step 2: Reconcile tags with changelog sections to catch missing versions - Step 5 auto-commits, pushes, and opens PR when stamping versions - Prerelease collapse consolidates duplicate category headings - Prerelease collapse removes orphaned version diff links - Clarify v prefix requirement in compare links - Header placement rule: version header must go immediately after [Unreleased] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds an explicit-version option to update-changelog, changes RC/tag determination to rely on git tags, adds a tag↔changelog reconciliation step, restructures the workflow into Steps 1–5 with confirmation and stamping paths, and adds optional auto-commit/PR creation plus stricter bottom-link and formatting rules. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 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 |
.claude/commands/update-changelog.md
Outdated
| - **`release`** (`/update-changelog release`): Add entries and stamp a version header. Auto-compute the next version based on changes (breaking → major, added features → minor, fixes → patch). Then `rake create_release` (with no args) will pick up this version automatically. | ||
| - **`rc`** (`/update-changelog rc`): Same as `release`, but stamps an RC prerelease version (e.g., `v9.7.0-rc.0`). Auto-increments the RC index if prior RCs exist for the same base version. | ||
| - **`beta`** (`/update-changelog beta`): Same as `rc`, but stamps a beta prerelease version (e.g., `v9.7.0-beta.0`). | ||
| - **Explicit version** (`/update-changelog 9.7.0.rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must look like a semver version (with optional `.rc.N` or `.beta.N` suffix). |
There was a problem hiding this comment.
The example uses RubyGems dot-format (9.7.0.rc.10) while the rest of the document consistently uses npm semver dash-format (v9.6.0-rc.1). The document explicitly warns against using dot format in changelog headers (line ~147: "Wrong: ## [v9.6.0.rc.1] (RubyGems format — do NOT use this in CHANGELOG.md headers)").
This is confusing. The description also only mentions .rc.N / .beta.N suffixes, not the dash variants.
Suggest clarifying which format(s) are accepted and showing conversion behaviour:
| - **Explicit version** (`/update-changelog 9.7.0.rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must look like a semver version (with optional `.rc.N` or `.beta.N` suffix). | |
| - **Explicit version** (`/update-changelog 9.7.0-rc.10` or `/update-changelog v9.7.0-rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must use npm semver format with optional `-rc.N` or `-beta.N` suffix (e.g., `9.7.0-rc.10`, `9.7.0`). A `v` prefix is optional and will be added automatically if missing. |
.claude/commands/update-changelog.md
Outdated
|
|
||
| **This step catches missing version sections and is the #1 source of errors when skipped.** | ||
|
|
||
| 1. Get the latest git tag: `git tag --sort=-v:refname | head -5` |
There was a problem hiding this comment.
The command here is missing the -l 'v*' filter used everywhere else in the document. Without it, non-version tags (e.g. CI tags, tooling tags) could appear in the results and be mistakenly treated as the latest version.
| 1. Get the latest git tag: `git tag --sort=-v:refname | head -5` | |
| 1. Get the latest git tag: `git tag -l 'v*' --sort=-v:refname | head -5` |
| - Which entries were moved from Unreleased | ||
| - Which new entries were added | ||
| - Which PRs were skipped (and why) | ||
| 6. If in `release`/`rc`/`beta` mode or explicit-version mode, **automatically commit, push, and open a PR**: |
There was a problem hiding this comment.
The auto-commit step doesn't address the case where there are other uncommitted or staged changes in the working tree. Committing only CHANGELOG.md is safe with git add CHANGELOG.md, but the instruction should be explicit about this to prevent accidentally staging unrelated edits.
| 6. If in `release`/`rc`/`beta` mode or explicit-version mode, **automatically commit, push, and open a PR**: | |
| 6. If in `release`/`rc`/`beta` mode or explicit-version mode, **automatically commit, push, and open a PR**: | |
| - Verify the working tree only has `CHANGELOG.md` changes; if there are other uncommitted changes, warn the user and stop | |
| - Create a feature branch (e.g., `changelog-v9.6.0-rc.1`) | |
| - Stage only `CHANGELOG.md` (`git add CHANGELOG.md`) and commit | |
| - Push and open a PR with the changelog diff as the body | |
| - If the push or PR creation fails, the CHANGELOG is already stamped locally — fix the issue and retry manually | |
| - Remind the user to run `bundle exec rake create_release` (no args) after merge to publish and auto-create the GitHub release |
Review: Port update-changelog improvements from react_on_railsOverall this is a solid improvement — the structured steps, tag reconciliation, and heading-consolidation rules all address real pain points. Three issues worth fixing before merge: 1. Version format inconsistency in the explicit-version example (line 13)The new explicit-version argument is shown as This could cause the AI to accept a dot-format string, insert it verbatim as a changelog header, and produce an entry the release rake tasks can't parse. See inline comment on line 13. 2. Missing
|
Greptile SummaryPorts several improvements to the
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["/update-changelog ARGS"] --> B{Parse argument}
B -->|No argument| C["Step 1: Fetch & read state"]
B -->|release / rc / beta| C
B -->|Explicit version| C
C --> D["Step 2: Reconcile tags with changelog\n(compare git tags vs changelog headers)"]
D --> E{"Missing tagged versions?"}
E -->|Yes| F["Create missing version sections\nMove entries from Unreleased"]
E -->|No| G["Step 3: Add new entries\nfor post-tag commits"]
F --> G
G --> H{Version mode given?}
H -->|No| I["Step 5: Verify & finalize\nRun linting, show summary"]
H -->|Yes| J["Step 4: Stamp version header"]
J --> K{"rc or beta?"}
K -->|Yes| L["Collapse prior prereleases\nConsolidate headings\nRemove orphaned links"]
K -->|No| M["Insert version header\nafter Unreleased"]
L --> M
M --> I
I --> N{Version was stamped?}
N -->|Yes| O["Auto-commit, push,\nand open PR"]
N -->|No| P["Done — entries in Unreleased"]
O --> Q["Remind user to run\nbundle exec rake create_release"]
Last reviewed commit: b116cc2 |
.claude/commands/update-changelog.md
Outdated
| - **`release`** (`/update-changelog release`): Add entries and stamp a version header. Auto-compute the next version based on changes (breaking → major, added features → minor, fixes → patch). Then `rake create_release` (with no args) will pick up this version automatically. | ||
| - **`rc`** (`/update-changelog rc`): Same as `release`, but stamps an RC prerelease version (e.g., `v9.7.0-rc.0`). Auto-increments the RC index if prior RCs exist for the same base version. | ||
| - **`beta`** (`/update-changelog beta`): Same as `rc`, but stamps a beta prerelease version (e.g., `v9.7.0-beta.0`). | ||
| - **Explicit version** (`/update-changelog 9.7.0.rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must look like a semver version (with optional `.rc.N` or `.beta.N` suffix). |
There was a problem hiding this comment.
Explicit version example uses wrong format
The example /update-changelog 9.7.0.rc.10 uses RubyGems dot format (.rc.), and the description says "optional .rc.N or .beta.N suffix". However, lines 144-147 of this same document explicitly state:
Use npm semver format with dashes, NOT RubyGems dot format
- Correct:
## [v9.6.0-rc.1]- Wrong:
## [v9.6.0.rc.1]
This creates an ambiguity: if the user passes 9.7.0.rc.10, should the command stamp ## [v9.7.0-rc.10] (npm semver, matching the rest of the doc) or ## [v9.7.0.rc.10] (RubyGems, matching the example)? There's no instruction to convert between formats.
Consider either:
- Changing the example to use dash format:
/update-changelog 9.7.0-rc.10, or - Adding an explicit note that the command accepts either format and normalizes to npm semver dashes for the changelog header.
| - **Explicit version** (`/update-changelog 9.7.0.rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must look like a semver version (with optional `.rc.N` or `.beta.N` suffix). | |
| - **Explicit version** (`/update-changelog 9.7.0-rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must look like a semver version (with optional `-rc.N` or `-beta.N` suffix). If passed in RubyGems dot format (e.g., `9.7.0.rc.10`), convert to npm semver dash format (`v9.7.0-rc.10`) for the changelog header. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b116cc267e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
.claude/commands/update-changelog.md
Outdated
| - **`release`** (`/update-changelog release`): Add entries and stamp a version header. Auto-compute the next version based on changes (breaking → major, added features → minor, fixes → patch). Then `rake create_release` (with no args) will pick up this version automatically. | ||
| - **`rc`** (`/update-changelog rc`): Same as `release`, but stamps an RC prerelease version (e.g., `v9.7.0-rc.0`). Auto-increments the RC index if prior RCs exist for the same base version. | ||
| - **`beta`** (`/update-changelog beta`): Same as `rc`, but stamps a beta prerelease version (e.g., `v9.7.0-beta.0`). | ||
| - **Explicit version** (`/update-changelog 9.7.0.rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must look like a semver version (with optional `.rc.N` or `.beta.N` suffix). |
There was a problem hiding this comment.
Use npm prerelease format for explicit version input
The new explicit-version guidance uses dot-form prereleases (9.7.0.rc.10) and says to stamp the exact provided value, which conflicts with the existing header rule in this same command doc that changelog versions must use npm-style dashes (e.g., v9.6.0-rc.1). In explicit RC/beta runs, this can generate a changelog header/link that does not match git tag names, so later reconciliation/release steps cannot align the section with the actual tag.
Useful? React with 👍 / 👎.
.claude/commands/update-changelog.md
Outdated
|
|
||
| **This step catches missing version sections and is the #1 source of errors when skipped.** | ||
|
|
||
| 1. Get the latest git tag: `git tag --sort=-v:refname | head -5` |
There was a problem hiding this comment.
Filter latest-tag lookup to version tags
Step 2 now uses git tag --sort=-v:refname | head -5 without a version pattern, so a non-release tag can be treated as the "latest tag" for reconciliation. In repositories that carry auxiliary tags, this produces false missing-version detection and incorrect commit ranges for moved/added changelog entries; limiting the list to version tags (as the previous -l 'v*' flow did) avoids that failure mode.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.claude/commands/update-changelog.md (2)
13-13: Clarify explicit-version normalization to header/tag format.Explicit input is shown in RubyGems prerelease form (
9.7.0.rc.10), while headers/links must use git-tag form (v9.7.0-rc.10). Add one explicit normalization rule to avoid invalid stamped headers.Suggested wording
-- **Explicit version** (`/update-changelog 9.7.0.rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must look like a semver version (with optional `.rc.N` or `.beta.N` suffix). +- **Explicit version** (`/update-changelog 9.7.0.rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. + - Accept `X.Y.Z`, `X.Y.Z.rc.N`, or `X.Y.Z.beta.N` as input. + - Always normalize stamped CHANGELOG headers and compare links to git-tag format: `## [vX.Y.Z]`, `## [vX.Y.Z-rc.N]`, `## [vX.Y.Z-beta.N]`.Also applies to: 146-153
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/update-changelog.md at line 13, Update the explicit-version documentation for the /update-changelog command to state that RubyGems-style prerelease input like "9.7.0.rc.10" will be normalized to git-tag/header form "v9.7.0-rc.10" when stamping headers/links; add a short normalization rule sentence and an explicit example showing the input and the normalized header/tag output, and mirror the same clarification for the other occurrence referenced (lines 146–153).
219-219: Return tag date in release-header format to reduce manual mistakes.The command currently outputs
YYYY-MM-DD, but release headers requireMonth Day, Year.Suggested fix
-5. Get the tag date with: `git log -1 --format="%Y-%m-%d" TAG_NAME` +5. Get the tag date in header format with: `git log -1 --date=format:"%B %-d, %Y" --format="%ad" TAG_NAME`Also applies to: 142-143
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/update-changelog.md at line 219, The script currently uses git log -1 --format="%Y-%m-%d" TAG_NAME which outputs YYYY-MM-DD; replace it with git log -1 --date=format:"%B %e, %Y" --format="%ad" TAG_NAME so the tag date is emitted as "Month Day, Year" (e.g., March 3, 2024); update both occurrences referenced (the current line and the ones around lines 142-143) where the format string "%Y-%m-%d" appears.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/commands/update-changelog.md:
- Line 203: The command `git tag --sort=-v:refname | head -5` can return
non-release tags; update the instruction to only list tags that start with "v"
by filtering tag names (e.g., use git tag --list 'v*' --sort=-v:refname | head
-5) so reconciliation considers release tags only; edit the line containing the
git command in update-changelog.md to use the 'v*' filter.
---
Nitpick comments:
In @.claude/commands/update-changelog.md:
- Line 13: Update the explicit-version documentation for the /update-changelog
command to state that RubyGems-style prerelease input like "9.7.0.rc.10" will be
normalized to git-tag/header form "v9.7.0-rc.10" when stamping headers/links;
add a short normalization rule sentence and an explicit example showing the
input and the normalized header/tag output, and mirror the same clarification
for the other occurrence referenced (lines 146–153).
- Line 219: The script currently uses git log -1 --format="%Y-%m-%d" TAG_NAME
which outputs YYYY-MM-DD; replace it with git log -1 --date=format:"%B %e, %Y"
--format="%ad" TAG_NAME so the tag date is emitted as "Month Day, Year" (e.g.,
March 3, 2024); update both occurrences referenced (the current line and the
ones around lines 142-143) where the format string "%Y-%m-%d" appears.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2c47fcbd-f457-4860-a781-9442fe928965
📒 Files selected for processing (1)
.claude/commands/update-changelog.md
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Tag reconciliation command missing version tag filter
- Updated the Step 2 tag reconciliation command to use
git tag -l 'v*' --sort=-v:refname | head -5so only version tags are compared against changelog headers.
- Updated the Step 2 tag reconciliation command to use
Or push these changes by commenting:
@cursor push 40dfcdafc0
Preview (40dfcdafc0)
diff --git a/.claude/commands/update-changelog.md b/.claude/commands/update-changelog.md
--- a/.claude/commands/update-changelog.md
+++ b/.claude/commands/update-changelog.md
@@ -200,7 +200,7 @@
**This step catches missing version sections and is the #1 source of errors when skipped.**
-1. Get the latest git tag: `git tag --sort=-v:refname | head -5`
+1. Get the latest git tag: `git tag -l 'v*' --sort=-v:refname | head -5`
2. Get the most recent version header in CHANGELOG.md (the first `## [vVERSION]` after `## [Unreleased]`)
3. **Compare them.** If the latest git tag does NOT match the latest changelog version header, there are tagged releases missing from the changelog. For example:
- Latest tag: `v9.6.0-rc.4`
.claude/commands/update-changelog.md
Outdated
|
|
||
| **This step catches missing version sections and is the #1 source of errors when skipped.** | ||
|
|
||
| 1. Get the latest git tag: `git tag --sort=-v:refname | head -5` |
There was a problem hiding this comment.
Tag reconciliation command missing version tag filter
Medium Severity
The git command in the tag reconciliation step (git tag --sort=-v:refname | head -5) is missing the -l 'v*' filter that all other tag-listing commands in this file use (lines 51 and 282). Without this filter, the command could return non-version tags (e.g., annotation tags, deployment markers), causing false mismatches when comparing against changelog headers.
- Fix explicit version example to use npm semver dash format, add note about auto-converting RubyGems dot format input - Add -l 'v*' filter to reconciliation git tag command to exclude non-version tags - Add working tree check before auto-commit step to prevent staging unrelated changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The restructured 5-step workflow is a clear improvement. The explicit tag reconciliation step (Step 2) addresses a real failure mode, and the auto-commit/push/PR automation removes error-prone manual steps. A few issues to address below in inline comments. |
.claude/commands/update-changelog.md
Outdated
| - **`release`** (`/update-changelog release`): Add entries and stamp a version header. Auto-compute the next version based on changes (breaking → major, added features → minor, fixes → patch). Then `rake create_release` (with no args) will pick up this version automatically. | ||
| - **`rc`** (`/update-changelog rc`): Same as `release`, but stamps an RC prerelease version (e.g., `v9.7.0-rc.0`). Auto-increments the RC index if prior RCs exist for the same base version. | ||
| - **`beta`** (`/update-changelog beta`): Same as `rc`, but stamps a beta prerelease version (e.g., `v9.7.0-beta.0`). | ||
| - **Explicit version** (`/update-changelog 9.7.0-rc.10` or `/update-changelog v9.7.0-rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must use npm semver format with optional `-rc.N` or `-beta.N` suffix (e.g., `9.7.0-rc.10`, `9.7.0`). A `v` prefix is optional and will be added automatically if missing. If passed in RubyGems dot format (e.g., `9.7.0.rc.10`), convert to npm semver dash format (`v9.7.0-rc.10`) for the changelog header. |
There was a problem hiding this comment.
The RubyGems dot-format conversion only mentions the RC suffix (9.7.0.rc.10 → 9.7.0-rc.10), but the same conversion applies to beta. Consider making the rule explicit for both:
| - **Explicit version** (`/update-changelog 9.7.0-rc.10` or `/update-changelog v9.7.0-rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must use npm semver format with optional `-rc.N` or `-beta.N` suffix (e.g., `9.7.0-rc.10`, `9.7.0`). A `v` prefix is optional and will be added automatically if missing. If passed in RubyGems dot format (e.g., `9.7.0.rc.10`), convert to npm semver dash format (`v9.7.0-rc.10`) for the changelog header. | |
| - **Explicit version** (`/update-changelog 9.7.0-rc.10` or `/update-changelog v9.7.0-rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must use npm semver format with optional `-rc.N` or `-beta.N` suffix (e.g., `9.7.0-rc.10`, `9.7.0`). A `v` prefix is optional and will be added automatically if missing. If passed in RubyGems dot format (e.g., `9.7.0.rc.10` or `9.7.0.beta.2`), convert to npm semver dash format (`v9.7.0-rc.10` or `v9.7.0-beta.2`) for the changelog header. |
|
|
||
| 5. Get the tag date with: `git log -1 --format="%Y-%m-%d" TAG_NAME` | ||
|
|
||
| #### Step 3: Add new entries for post-tag commits |
There was a problem hiding this comment.
After Step 2 may have reconciled several missing tags, LATEST_TAG here is ambiguous — a model following this literally might pick an older reference from before reconciliation. Suggest making it explicit:
| #### Step 3: Add new entries for post-tag commits | |
| 1. Run `git log --oneline LATEST_TAG..origin/main` to find commits after the latest tag (LATEST_TAG is the most recent git tag, i.e., the same one identified in Step 2) |
| 6. If in `release`/`rc`/`beta` mode or explicit-version mode, **automatically commit, push, and open a PR**: | ||
| - Verify the working tree only has `CHANGELOG.md` changes; if there are other uncommitted changes, warn the user and stop | ||
| - Create a feature branch (e.g., `changelog-v9.6.0-rc.1`) | ||
| - Stage only `CHANGELOG.md` (`git add CHANGELOG.md`) and commit | ||
| - Push and open a PR with the changelog diff as the body | ||
| - If the push or PR creation fails, the CHANGELOG is already stamped locally — fix the issue and retry manually | ||
| - Remind the user to run `bundle exec rake create_release` (no args) after merge to publish and auto-create the GitHub release |
There was a problem hiding this comment.
The safety check only guards against uncommitted changes, but not against the current branch being something other than main. If a user already has a half-completed changelog branch checked out, the command would create a new branch from that diverged state, leading to a confusing history.
Suggest adding a branch guard before creating the feature branch:
| 6. If in `release`/`rc`/`beta` mode or explicit-version mode, **automatically commit, push, and open a PR**: | |
| - Verify the working tree only has `CHANGELOG.md` changes; if there are other uncommitted changes, warn the user and stop | |
| - Create a feature branch (e.g., `changelog-v9.6.0-rc.1`) | |
| - Stage only `CHANGELOG.md` (`git add CHANGELOG.md`) and commit | |
| - Push and open a PR with the changelog diff as the body | |
| - If the push or PR creation fails, the CHANGELOG is already stamped locally — fix the issue and retry manually | |
| - Remind the user to run `bundle exec rake create_release` (no args) after merge to publish and auto-create the GitHub release | |
| 6. If in `release`/`rc`/`beta` mode or explicit-version mode, **automatically commit, push, and open a PR**: | |
| - Verify the working tree only has `CHANGELOG.md` changes; if there are other uncommitted changes, warn the user and stop | |
| - Verify the current branch is `main` (`git branch --show-current`); if not, warn the user and stop | |
| - Create a feature branch (e.g., `changelog-v9.6.0-rc.1`) | |
| - Stage only `CHANGELOG.md` (`git add CHANGELOG.md`) and commit | |
| - Push and open a PR with the changelog diff as the body | |
| - If the push or PR creation fails, the CHANGELOG is already stamped locally — fix the issue and retry manually | |
| - Remind the user to run `bundle exec rake create_release` (no args) after merge to publish and auto-create the GitHub release |
.claude/commands/update-changelog.md
Outdated
| - Update version diff links to point from the last stable version to the new prerelease | ||
| - This keeps the changelog clean with a single prerelease section that accumulates all changes since the last stable release | ||
|
|
||
| **CRITICAL**: The new version header must be inserted **immediately after `## [Unreleased]`**, NOT after any descriptive text. This ensures correct ordering of version headers. |
There was a problem hiding this comment.
This placement rule is already stated in Step 4 (line 239: "Insert the version header immediately after ## [Unreleased]"). Repeating it here as CRITICAL adds noise. Consider replacing with a cross-reference:
| **CRITICAL**: The new version header must be inserted **immediately after `## [Unreleased]`**, NOT after any descriptive text. This ensures correct ordering of version headers. | |
| **Note**: The new version header must be inserted **immediately after `## [Unreleased]`** (see Step 4). This ensures correct ordering of version headers. |
There was a problem hiding this comment.
🧹 Nitpick comments (4)
.claude/commands/update-changelog.md (4)
64-64: Clarify wording for explicit version path.The instruction mentions "computed version" but when an explicit version is provided (line 13), there's no computation. Consider: "Check that the computed or provided version is newer than ALL existing tags."
📝 Suggested clarification
-4. **Verify**: Check that the computed version is newer than ALL existing tags (stable and prerelease). If not, ask the user what to do. +4. **Verify**: Check that the computed or provided version is newer than ALL existing tags (stable and prerelease). If not, ask the user what to do.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/update-changelog.md at line 64, Update the sentence that currently reads "Check that the computed version is newer than ALL existing tags (stable and prerelease)." to explicitly cover the explicit-version path by changing it to "Check that the computed or provided version is newer than ALL existing tags (stable and prerelease)." — edit the line near the existing reference to the explicit-version option (mentioned at line 13) in update-changelog.md so the wording covers both computed and user-provided versions.
224-224: PR extraction pattern assumes standard GitHub format.The pattern
grep -oE "#[0-9]+"works for standard GitHub commit messages but might miss PRs referenced in other formats. This is likely acceptable for the standard workflow, but consider documenting this assumption.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/update-changelog.md at line 224, The PR extraction step uses the grep pattern `grep -oE "#[0-9]+"`, which only matches GitHub-style “#123” references; update the documentation near the `2. **Extract ALL PR numbers**` line to state this assumption and either (a) add examples of other common reference formats to be aware of or (b) provide an alternative extraction command (e.g., also matching full URLs or “PR `#123`”) and show both patterns so non-standard PR references are not missed; mention the exact `grep -oE "#[0-9]+"` pattern in the note so reviewers can find and adjust it.
270-270: Consider checking if branch already exists.When creating the feature branch, consider verifying it doesn't already exist to provide a clearer error message if there's a conflict.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/update-changelog.md at line 270, The step "Create a feature branch (e.g., `changelog-v9.6.0-rc.1`)" should first verify the branch doesn't already exist; update the command or instructions to run a branch-existence check (for example using git rev-parse --verify or git branch --list) before creating the branch and provide a clear error/helpful message if it exists, and then proceed to create the branch only when the check passes so users see a friendly conflict explanation instead of a confusing git failure.
269-269: Specify how to verify working tree state.The instruction to "verify the working tree only has
CHANGELOG.mdchanges" is good but could be more specific about the verification method.💡 Suggested enhancement
Consider adding the specific command to check:
- - Verify the working tree only has `CHANGELOG.md` changes; if there are other uncommitted changes, warn the user and stop + - Verify the working tree only has `CHANGELOG.md` changes using `git status --porcelain`; if there are other uncommitted changes, warn the user and stop🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/update-changelog.md at line 269, Update the instruction that currently says "verify the working tree only has `CHANGELOG.md` changes" to include an exact git command and expected check; for example, tell the user to run a command like `git status --porcelain` (or `git diff --name-only`/`git diff --staged --name-only`) and verify the output contains only `CHANGELOG.md` (or is empty except for that file), and instruct to abort if any other filenames appear. Reference the `CHANGELOG.md` check text so editors know where to insert the command and expected-success condition.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.claude/commands/update-changelog.md:
- Line 64: Update the sentence that currently reads "Check that the computed
version is newer than ALL existing tags (stable and prerelease)." to explicitly
cover the explicit-version path by changing it to "Check that the computed or
provided version is newer than ALL existing tags (stable and prerelease)." —
edit the line near the existing reference to the explicit-version option
(mentioned at line 13) in update-changelog.md so the wording covers both
computed and user-provided versions.
- Line 224: The PR extraction step uses the grep pattern `grep -oE "#[0-9]+"`,
which only matches GitHub-style “#123” references; update the documentation near
the `2. **Extract ALL PR numbers**` line to state this assumption and either (a)
add examples of other common reference formats to be aware of or (b) provide an
alternative extraction command (e.g., also matching full URLs or “PR `#123`”) and
show both patterns so non-standard PR references are not missed; mention the
exact `grep -oE "#[0-9]+"` pattern in the note so reviewers can find and adjust
it.
- Line 270: The step "Create a feature branch (e.g., `changelog-v9.6.0-rc.1`)"
should first verify the branch doesn't already exist; update the command or
instructions to run a branch-existence check (for example using git rev-parse
--verify or git branch --list) before creating the branch and provide a clear
error/helpful message if it exists, and then proceed to create the branch only
when the check passes so users see a friendly conflict explanation instead of a
confusing git failure.
- Line 269: Update the instruction that currently says "verify the working tree
only has `CHANGELOG.md` changes" to include an exact git command and expected
check; for example, tell the user to run a command like `git status --porcelain`
(or `git diff --name-only`/`git diff --staged --name-only`) and verify the
output contains only `CHANGELOG.md` (or is empty except for that file), and
instruct to abort if any other filenames appear. Reference the `CHANGELOG.md`
check text so editors know where to insert the command and expected-success
condition.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bfc65a8a-4490-464a-a6f0-3fdab3b334a1
📒 Files selected for processing (1)
.claude/commands/update-changelog.md
- Add beta conversion example alongside RC in explicit version description - Clarify LATEST_TAG reference in Step 3 points to Step 2's tag - Add branch guard (verify on main) before auto-creating feature branch - Replace duplicate CRITICAL placement rule with cross-reference to Step 4 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review: Port update-changelog improvements from react_on_railsOverall this is a solid improvement. The structural reorganization into named steps, the git-tags-only RC index fix, and the tag reconciliation step all address real pain points. A few things worth addressing: Gap: explicit version + prerelease collapsing Step 4, item 3 only mentions collapsing prior prerelease sections for Missing: commit message format for auto-commit Step 5.6 instructs to automatically commit but doesn't specify a commit message format. Without guidance, the AI may use inconsistent messages. Suggest specifying something like: Minor: Steps 3.3-3.4 overlap with Step 2 Step 3 still includes 'Also check if the tag is ahead of origin/main' which is already handled by the new Step 2 reconciliation. This creates redundant guidance — could be removed or reworded to reference Step 2. Minor: no validation for invalid explicit versions The argument parsing handles npm semver and RubyGems dot format, but doesn't specify what to do if an unrecognizable string is passed (e.g., These are all relatively minor — the core changes are well-thought-out and the new structure is significantly clearer than the flat numbered list it replaces. |
.claude/commands/update-changelog.md
Outdated
|
|
||
| 1. Auto-compute the next version (see "Auto-Computing the Next Version" above), or use the explicit version provided | ||
| 2. Insert the version header immediately after `## [Unreleased]` | ||
| 3. For `rc`/`beta`: collapse prior prerelease sections of the same base version into the new section |
There was a problem hiding this comment.
The prerelease collapsing rule here only fires for rc/beta mode, but an explicit version argument like 9.7.0-rc.10 should trigger the same behavior. A user passing /update-changelog 9.7.0-rc.10 will currently skip collapsing v9.7.0-rc.9, v9.7.0-rc.8, etc.
Suggest updating to:
| 3. For `rc`/`beta`: collapse prior prerelease sections of the same base version into the new section | |
| 3. For `rc`/`beta` or an explicit prerelease version (e.g., `9.7.0-rc.10`): collapse prior prerelease sections of the same base version into the new section |
| - Verify the current branch is `main` (`git branch --show-current`); if not, warn the user and stop | ||
| - Create a feature branch (e.g., `changelog-v9.6.0-rc.1`) | ||
| - Stage only `CHANGELOG.md` (`git add CHANGELOG.md`) and commit | ||
| - Push and open a PR with the changelog diff as the body |
There was a problem hiding this comment.
The auto-commit step doesn't specify a commit message format, which means different runs may produce inconsistent messages. Suggest adding a concrete format:
| - Push and open a PR with the changelog diff as the body | |
| - Stage only `CHANGELOG.md` (`git add CHANGELOG.md`) and commit with message `Update CHANGELOG.md for vX.Y.Z` (using the stamped version) |
.claude/commands/update-changelog.md
Outdated
| 1. Run `git log --oneline LATEST_TAG..origin/main` to find commits after the latest tag (LATEST_TAG is the most recent git tag, i.e., the same one identified in Step 2) | ||
| 2. **Extract ALL PR numbers** from commit messages: `git log --oneline LATEST_TAG..origin/main | grep -oE "#[0-9]+" | sort -u` | ||
| 3. Also check `git log --oneline origin/main..LATEST_TAG` to see if the tag is ahead of origin/main | ||
| 4. If the tag is ahead, entries in "Unreleased" section may actually belong to that tagged version |
There was a problem hiding this comment.
Items 3 and 4 here overlap with what Step 2 already handles. If Step 2 ran correctly, the tag-ahead-of-main scenario will have already been resolved. Consider removing or replacing these lines with a forward reference:
| 1. Run `git log --oneline LATEST_TAG..origin/main` to find commits after the latest tag (LATEST_TAG is the most recent git tag, i.e., the same one identified in Step 2) | |
| 2. **Extract ALL PR numbers** from commit messages: `git log --oneline LATEST_TAG..origin/main | grep -oE "#[0-9]+" | sort -u` | |
| 3. Also check `git log --oneline origin/main..LATEST_TAG` to see if the tag is ahead of origin/main | |
| 4. If the tag is ahead, entries in "Unreleased" section may actually belong to that tagged version | |
| 3. If Step 2 found no missing tagged versions, verify no tag is ahead: `git log --oneline origin/main..LATEST_TAG` should be empty |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6021dc5c28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
.claude/commands/update-changelog.md
Outdated
|
|
||
| 1. Get the latest git tag: `git tag -l 'v*' --sort=-v:refname | head -5` | ||
| 2. Get the most recent version header in CHANGELOG.md (the first `## [vVERSION]` after `## [Unreleased]`) | ||
| 3. **Compare them.** If the latest git tag does NOT match the latest changelog version header, there are tagged releases missing from the changelog. For example: |
There was a problem hiding this comment.
Handle draft headers before inferring missing tagged releases
This rule treats any mismatch between the latest git tag and the first changelog version header as proof that tagged releases are missing, but this workflow also explicitly allows a version header to exist before its tag is created; in that common pre-release window, the mismatch is expected and this logic will incorrectly trigger backfill behavior (creating/moving sections for versions that are not actually missing). The comparison should confirm that the latest tag is absent from changelog headers (or that the top header is older), rather than requiring exact equality with the top header.
Useful? React with 👍 / 👎.
- Fix tag reconciliation to check all changelog headers, not just the top one, avoiding false backfill when a draft header exists above the latest tag (addresses P1 comment r2938063401) - Extend prerelease collapsing to trigger for explicit prerelease versions - Add commit message format to auto-commit step - Simplify Step 3 tag-ahead check as a verification of Step 2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| - **`release`** (`/update-changelog release`): Add entries and stamp a version header. Auto-compute the next version based on changes (breaking → major, added features → minor, fixes → patch). Then `rake create_release` (with no args) will pick up this version automatically. | ||
| - **`rc`** (`/update-changelog rc`): Same as `release`, but stamps an RC prerelease version (e.g., `v9.7.0-rc.0`). Auto-increments the RC index if prior RCs exist for the same base version. | ||
| - **`beta`** (`/update-changelog beta`): Same as `rc`, but stamps a beta prerelease version (e.g., `v9.7.0-beta.0`). | ||
| - **Explicit version** (`/update-changelog 9.7.0-rc.10` or `/update-changelog v9.7.0-rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must use npm semver format with optional `-rc.N` or `-beta.N` suffix (e.g., `9.7.0-rc.10`, `9.7.0`). A `v` prefix is optional and will be added automatically if missing. If passed in RubyGems dot format (e.g., `9.7.0.rc.10` or `9.7.0.beta.2`), convert to npm semver dash format (`v9.7.0-rc.10` or `v9.7.0-beta.2`) for the changelog header. |
There was a problem hiding this comment.
The explicit version description says it "skips auto-computation" but omits that the version still needs to be validated against existing tags. The PR description mentions "validation requiring it to be newer than existing tags" but this isn't captured in the instructions here, leaving the agent without a clear directive.
| - **Explicit version** (`/update-changelog 9.7.0-rc.10` or `/update-changelog v9.7.0-rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must use npm semver format with optional `-rc.N` or `-beta.N` suffix (e.g., `9.7.0-rc.10`, `9.7.0`). A `v` prefix is optional and will be added automatically if missing. If passed in RubyGems dot format (e.g., `9.7.0.rc.10` or `9.7.0.beta.2`), convert to npm semver dash format (`v9.7.0-rc.10` or `v9.7.0-beta.2`) for the changelog header. | |
| - **Explicit version** (`/update-changelog 9.7.0-rc.10` or `/update-changelog v9.7.0-rc.10`): Add entries and stamp the exact version provided. Skips auto-computation — use this when you already know the target version. The version string must use npm semver format with optional `-rc.N` or `-beta.N` suffix (e.g., `9.7.0-rc.10`, `9.7.0`). A `v` prefix is optional and will be added automatically if missing. If passed in RubyGems dot format (e.g., `9.7.0.rc.10` or `9.7.0.beta.2`), convert to npm semver dash format (`v9.7.0-rc.10` or `v9.7.0-beta.2`) for the changelog header. **Validate** that the explicit version is newer than ALL existing tags; if not, warn the user and ask how to proceed. |
|
|
||
| 1. Run `git log --oneline LATEST_TAG..origin/main` to find commits after the latest tag (LATEST_TAG is the most recent git tag, i.e., the same one identified in Step 2) | ||
| 2. **Extract ALL PR numbers** from commit messages: `git log --oneline LATEST_TAG..origin/main | grep -oE "#[0-9]+" | sort -u` | ||
| 3. If Step 2 found no missing tagged versions, verify no tag is ahead of main: `git log --oneline origin/main..LATEST_TAG` should be empty. If not, entries in "Unreleased" may belong to that tagged version — Step 2 should have caught this, so re-check. |
There was a problem hiding this comment.
The "re-check" instruction at the end of this step is vague — the agent doesn't know what action to take when Step 2 should have caught something but didn't. It would be clearer to specify the recovery action (e.g., go back and run the Step 2 reconciliation logic for that tag).
| 3. If Step 2 found no missing tagged versions, verify no tag is ahead of main: `git log --oneline origin/main..LATEST_TAG` should be empty. If not, entries in "Unreleased" may belong to that tagged version — Step 2 should have caught this, so re-check. | |
| 3. If Step 2 found no missing tagged versions, verify no tag is ahead of main: `git log --oneline origin/main..LATEST_TAG` should be empty. If it is not empty, entries in "Unreleased" may belong to that tagged version — return to Step 2 and run the reconciliation logic for that tag before continuing. |
| 6. If in `release`/`rc`/`beta` mode or explicit-version mode, **automatically commit, push, and open a PR**: | ||
| - Verify the working tree only has `CHANGELOG.md` changes; if there are other uncommitted changes, warn the user and stop | ||
| - Verify the current branch is `main` (`git branch --show-current`); if not, warn the user and stop | ||
| - Create a feature branch (e.g., `changelog-v9.6.0-rc.1`) | ||
| - Stage only `CHANGELOG.md` (`git add CHANGELOG.md`) and commit with message `Update CHANGELOG.md for vX.Y.Z` (using the stamped version) | ||
| - Push and open a PR with the changelog diff as the body | ||
| - If the push or PR creation fails, the CHANGELOG is already stamped locally — fix the issue and retry manually | ||
| - Remind the user to run `bundle exec rake create_release` (no args) after merge to publish and auto-create the GitHub release |
There was a problem hiding this comment.
The branch check (must be on main) correctly guards against accidents, but doesn't handle the re-run scenario: if a previous run stamped the changelog but the push/PR creation failed, the user is now on a changelog-vX.Y.Z branch and would be blocked from retrying. Worth adding a note for this case.
| 6. If in `release`/`rc`/`beta` mode or explicit-version mode, **automatically commit, push, and open a PR**: | |
| - Verify the working tree only has `CHANGELOG.md` changes; if there are other uncommitted changes, warn the user and stop | |
| - Verify the current branch is `main` (`git branch --show-current`); if not, warn the user and stop | |
| - Create a feature branch (e.g., `changelog-v9.6.0-rc.1`) | |
| - Stage only `CHANGELOG.md` (`git add CHANGELOG.md`) and commit with message `Update CHANGELOG.md for vX.Y.Z` (using the stamped version) | |
| - Push and open a PR with the changelog diff as the body | |
| - If the push or PR creation fails, the CHANGELOG is already stamped locally — fix the issue and retry manually | |
| - Remind the user to run `bundle exec rake create_release` (no args) after merge to publish and auto-create the GitHub release | |
| 6. If in `release`/`rc`/`beta` mode or explicit-version mode, **automatically commit, push, and open a PR**: | |
| - Verify the working tree only has `CHANGELOG.md` changes; if there are other uncommitted changes, warn the user and stop | |
| - Verify the current branch is `main` (`git branch --show-current`); if not, check whether it looks like a changelog feature branch (e.g., `changelog-vX.Y.Z`) — if so, the previous run may have been interrupted after branching; ask the user whether to continue from the existing branch or abort. Otherwise warn and stop. | |
| - Create a feature branch (e.g., `changelog-v9.6.0-rc.1`) | |
| - Stage only `CHANGELOG.md` (`git add CHANGELOG.md`) and commit with message `Update CHANGELOG.md for vX.Y.Z` (using the stamped version) | |
| - Push and open a PR with the changelog diff as the body | |
| - If the push or PR creation fails, the CHANGELOG is already stamped locally — fix the issue and retry manually | |
| - Remind the user to run `bundle exec rake create_release` (no args) after merge to publish and auto-create the GitHub release |
Review: Port update-changelog improvements from react_on_railsOverall this is a solid improvement. The restructuring from a flat numbered list into named Steps (1–5) makes the workflow significantly clearer, and the key additions — git-tags-only RC index, tag reconciliation, duplicate-heading consolidation, and orphaned link cleanup — all address real failure modes. Three specific issues flagged inline:
No security, performance, or structural concerns — this is documentation only and the changes are well-scoped. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da32b05997
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| 1. Get the latest git tag: `git tag -l 'v*' --sort=-v:refname | head -5` | ||
| 2. Get the most recent version header in CHANGELOG.md (the first `## [vVERSION]` after `## [Unreleased]`) | ||
| 3. **Compare them.** If the latest git tag does NOT appear anywhere in the changelog version headers, there are tagged releases missing from the changelog. **Important**: Don't just compare against the _top_ changelog header — a version header may exist _above_ the latest tag if it was stamped as a draft before tagging. Check whether the tag's version appears in _any_ `## [vX.Y.Z]` header. For example: |
There was a problem hiding this comment.
Reconcile against all recent tags, not only the latest
This reconciliation rule only checks whether the single newest git tag appears anywhere in CHANGELOG.md, so it will miss gaps where an intermediate tagged release section is absent (for example, v9.8.0 exists in the changelog but v9.7.1 was accidentally omitted). In that case Step 2 reports “nothing missing,” Step 3 uses LATEST_TAG..origin/main, and the missing tagged section is never backfilled, which leaves release notes inconsistent with shipped tags.
Useful? React with 👍 / 👎.
Port relevant improvements from shakacode/shakapacker#982: - Step 2: Check for version headers anywhere in changelog, not just top header, to handle draft pre-release headers correctly - Step 3: Add verification that no tag is ahead of master - Step 5: Add duplicate section heading check and v-prefix reminder for compare links - Step 5: Add safety checks before auto-commit (verify clean working tree, verify on master branch, explicit staging and commit message) - Prerelease collapsing: Consolidate duplicate category headings and remove orphaned diff links for collapsed sections - Downgrade prerelease header placement from CRITICAL to Note with cross-reference to Step 4 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
## Summary Ports relevant improvements from shakacode/shakapacker#982 to the react_on_rails `update-changelog` command: - **Step 2 (tag reconciliation)**: Check for version headers _anywhere_ in the changelog, not just the top header — handles draft pre-release headers that haven't been tagged yet - **Step 3 (post-tag commits)**: Add verification that no tag is ahead of master (catches edge cases Step 2 might miss) - **Step 5 (verify & finalize)**: Add duplicate section heading check, `v`-prefix reminder for compare links, and safety checks before auto-commit (verify clean working tree, verify on master, explicit staging and commit message format) - **Prerelease collapsing**: Consolidate duplicate category headings when collapsing prior prereleases, and remove orphaned diff links for collapsed sections All changes adapted for react_on_rails conventions (RubyGems version format, `master` branch, `###`/`####` headers, no `v` prefix in changelog headers). ## Test plan - [ ] Run `/update-changelog` and verify it follows the updated instructions correctly - [ ] Verify prerelease collapsing handles duplicate category headings 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk documentation-only changes that adjust the `update-changelog` procedure; main risk is minor process confusion if guidance is misinterpreted. > > **Overview** > Updates the `.claude/commands/update-changelog.md` instructions to better handle release edge cases: tag reconciliation now checks for the latest tag’s version header *anywhere* in `CHANGELOG.md` (to account for draft headers), and post-tag steps add a sanity check that no tag is ahead of `origin/master`. > > Tightens finalization guidance by requiring no duplicate `####` category headings, reminding that compare links must use the `v` tag prefix, and adding safety checks before auto-commit (clean working tree, on `master`, stage only `CHANGELOG.md` with a standardized commit message). Also clarifies prerelease collapsing by consolidating duplicate category headings and removing orphaned version diff links. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c31ea07. 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** * Enhanced changelog update workflow documentation with improved procedures for managing tagged versions, validation constraints, stamping command guidance, and refined prerelease handling rules to ensure consistency in version headers and changelog integrity. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
### Summary Adds the v9.7.0 changelog section with release notes for all user-visible changes since v9.6.1: - **Added**: rspack v2 support (PR #975) - **Fixed**: Config exporter path traversal and annotation format validation (PR #914) - **Fixed**: `webpack-subresource-integrity` v5 named export handling (PR #978, fixes #972) Version diff links at the bottom of the file are updated accordingly. ### Pull Request checklist - [x] ~Add/update test to cover these changes~ - [x] ~Update documentation~ - [x] Update CHANGELOG file ### Other Information Non-user-visible PRs (#920, #965, #970, #971, #977, #979, #981, #982) were intentionally excluded per changelog policy. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only change updating `CHANGELOG.md`; no runtime code or dependency changes are introduced in this PR. > > **Overview** > Adds a new `v9.7.0` section to `CHANGELOG.md` documenting user-visible changes (rspack v2 support and two fixes around config export security/validation and `webpack-subresource-integrity` v5 exports). > > Updates the compare links at the bottom so `[Unreleased]` now compares from `v9.7.0`, and adds the new `[v9.7.0]` tag link. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8942a43. 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 * **New Features** * Added rspack v2 support * **Bug Fixes** * Improved security and validation handling <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
## Summary Ports relevant improvements from shakacode/shakapacker#982 to the react_on_rails `update-changelog` command: - **Step 2 (tag reconciliation)**: Check for version headers _anywhere_ in the changelog, not just the top header — handles draft pre-release headers that haven't been tagged yet - **Step 3 (post-tag commits)**: Add verification that no tag is ahead of master (catches edge cases Step 2 might miss) - **Step 5 (verify & finalize)**: Add duplicate section heading check, `v`-prefix reminder for compare links, and safety checks before auto-commit (verify clean working tree, verify on master, explicit staging and commit message format) - **Prerelease collapsing**: Consolidate duplicate category headings when collapsing prior prereleases, and remove orphaned diff links for collapsed sections All changes adapted for react_on_rails conventions (RubyGems version format, `master` branch, `###`/`####` headers, no `v` prefix in changelog headers). ## Test plan - [ ] Run `/update-changelog` and verify it follows the updated instructions correctly - [ ] Verify prerelease collapsing handles duplicate category headings 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk documentation-only changes that adjust the `update-changelog` procedure; main risk is minor process confusion if guidance is misinterpreted. > > **Overview** > Updates the `.claude/commands/update-changelog.md` instructions to better handle release edge cases: tag reconciliation now checks for the latest tag’s version header *anywhere* in `CHANGELOG.md` (to account for draft headers), and post-tag steps add a sanity check that no tag is ahead of `origin/master`. > > Tightens finalization guidance by requiring no duplicate `####` category headings, reminding that compare links must use the `v` tag prefix, and adding safety checks before auto-commit (clean working tree, on `master`, stage only `CHANGELOG.md` with a standardized commit message). Also clarifies prerelease collapsing by consolidating duplicate category headings and removing orphaned version diff links. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c31ea07. 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** * Enhanced changelog update workflow documentation with improved procedures for managing tagged versions, validation constraints, stamping command guidance, and refined prerelease handling rules to ensure consistency in version headers and changelog integrity. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
## 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 <noreply@anthropic.com>
### Summary Adds the v9.7.0 changelog section with release notes for all user-visible changes since v9.6.1: - **Added**: rspack v2 support (PR #975) - **Fixed**: Config exporter path traversal and annotation format validation (PR #914) - **Fixed**: `webpack-subresource-integrity` v5 named export handling (PR #978, fixes #972) Version diff links at the bottom of the file are updated accordingly. ### Pull Request checklist - [x] ~Add/update test to cover these changes~ - [x] ~Update documentation~ - [x] Update CHANGELOG file ### Other Information Non-user-visible PRs (#920, #965, #970, #971, #977, #979, #981, #982) were intentionally excluded per changelog policy. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation-only change updating `CHANGELOG.md`; no runtime code or dependency changes are introduced in this PR. > > **Overview** > Adds a new `v9.7.0` section to `CHANGELOG.md` documenting user-visible changes (rspack v2 support and two fixes around config export security/validation and `webpack-subresource-integrity` v5 exports). > > Updates the compare links at the bottom so `[Unreleased]` now compares from `v9.7.0`, and adds the new `[v9.7.0]` tag link. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8942a43. 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 * **New Features** * Added rspack v2 support * **Bug Fixes** * Improved security and validation handling <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
## Summary Ports relevant improvements from shakacode/shakapacker#982 to the react_on_rails `update-changelog` command: - **Step 2 (tag reconciliation)**: Check for version headers _anywhere_ in the changelog, not just the top header — handles draft pre-release headers that haven't been tagged yet - **Step 3 (post-tag commits)**: Add verification that no tag is ahead of master (catches edge cases Step 2 might miss) - **Step 5 (verify & finalize)**: Add duplicate section heading check, `v`-prefix reminder for compare links, and safety checks before auto-commit (verify clean working tree, verify on master, explicit staging and commit message format) - **Prerelease collapsing**: Consolidate duplicate category headings when collapsing prior prereleases, and remove orphaned diff links for collapsed sections All changes adapted for react_on_rails conventions (RubyGems version format, `master` branch, `###`/`####` headers, no `v` prefix in changelog headers). ## Test plan - [ ] Run `/update-changelog` and verify it follows the updated instructions correctly - [ ] Verify prerelease collapsing handles duplicate category headings 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk documentation-only changes that adjust the `update-changelog` procedure; main risk is minor process confusion if guidance is misinterpreted. > > **Overview** > Updates the `.claude/commands/update-changelog.md` instructions to better handle release edge cases: tag reconciliation now checks for the latest tag’s version header *anywhere* in `CHANGELOG.md` (to account for draft headers), and post-tag steps add a sanity check that no tag is ahead of `origin/master`. > > Tightens finalization guidance by requiring no duplicate `####` category headings, reminding that compare links must use the `v` tag prefix, and adding safety checks before auto-commit (clean working tree, on `master`, stage only `CHANGELOG.md` with a standardized commit message). Also clarifies prerelease collapsing by consolidating duplicate category headings and removing orphaned version diff links. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c31ea07. 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** * Enhanced changelog update workflow documentation with improved procedures for managing tagged versions, validation constraints, stamping command guidance, and refined prerelease handling rules to ensure consistency in version headers and changelog integrity. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
## Summary Ports relevant improvements from shakacode/shakapacker#982 to the react_on_rails `update-changelog` command: - **Step 2 (tag reconciliation)**: Check for version headers _anywhere_ in the changelog, not just the top header — handles draft pre-release headers that haven't been tagged yet - **Step 3 (post-tag commits)**: Add verification that no tag is ahead of master (catches edge cases Step 2 might miss) - **Step 5 (verify & finalize)**: Add duplicate section heading check, `v`-prefix reminder for compare links, and safety checks before auto-commit (verify clean working tree, verify on master, explicit staging and commit message format) - **Prerelease collapsing**: Consolidate duplicate category headings when collapsing prior prereleases, and remove orphaned diff links for collapsed sections All changes adapted for react_on_rails conventions (RubyGems version format, `master` branch, `###`/`####` headers, no `v` prefix in changelog headers). ## Test plan - [ ] Run `/update-changelog` and verify it follows the updated instructions correctly - [ ] Verify prerelease collapsing handles duplicate category headings 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk documentation-only changes that adjust the `update-changelog` procedure; main risk is minor process confusion if guidance is misinterpreted. > > **Overview** > Updates the `.claude/commands/update-changelog.md` instructions to better handle release edge cases: tag reconciliation now checks for the latest tag’s version header *anywhere* in `CHANGELOG.md` (to account for draft headers), and post-tag steps add a sanity check that no tag is ahead of `origin/master`. > > Tightens finalization guidance by requiring no duplicate `####` category headings, reminding that compare links must use the `v` tag prefix, and adding safety checks before auto-commit (clean working tree, on `master`, stage only `CHANGELOG.md` with a standardized commit message). Also clarifies prerelease collapsing by consolidating duplicate category headings and removing orphaned version diff links. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c31ea07. 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** * Enhanced changelog update workflow documentation with improved procedures for managing tagged versions, validation constraints, stamping command guidance, and refined prerelease handling rules to ensure consistency in version headers and changelog integrity. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>



Summary
Syncs recent improvements from shakacode/react_on_rails (PRs #2596, #2608, #2628) into the
/update-changelogcommand.Changes to
.claude/commands/update-changelog.md:/update-changelog 9.7.0.rc.10now stamps the exact version provided, skipping auto-computationrelease/rc/beta/explicit), automatically creates branch, commits, pushes, and opens PR### Fixedbecome one)vprefix to match git tags## [Unreleased]No changes to
rakelib/release.rakeordocs/releasing.md— react_on_rails had no changes to those files in the last 3 days.Test plan
/update-changelogand verify the new tag reconciliation step (Step 2) runs before adding entries/update-changelog rcand verify RC index is computed from git tags only/update-changelog 9.7.0and verify explicit version stamps correctly/update-changelog releaseand verify it auto-commits, pushes, and opens PR🤖 Generated with Claude Code
Note
Low Risk
Low risk because this PR only updates the
.claude/commands/update-changelog.mddocumentation/workflow guidance and does not change runtime code paths.Overview
Updates the
/update-changelogcommand 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.Written by Cursor Bugbot for commit b116cc2. Configure here.
Summary by CodeRabbit