fix(release): baseline preview notes on last prior release - #579
Conversation
Preview generate-notes was channel-isolated (preview to preview only), so cutting 2.7.43-preview after a stable 2.7.42 with no matching preview restated the stable changelog. Preview baselines now use the newest prior stable or preview tag; stable still baselines prior stable and carries matching preview notes.
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe release workflow now computes ChangesRelease baseline tag selection
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ReleaseWorkflow
participant Git
participant ReleaseNotesCLI
participant BaselineHelper
ReleaseWorkflow->>Git: List merged version tags
Git-->>ReleaseWorkflow: Version tag list
ReleaseWorkflow->>ReleaseNotesCLI: previous-release-tag RELEASE_VERSION
ReleaseNotesCLI->>BaselineHelper: Select previous release-note tag
BaselineHelper-->>ReleaseNotesCLI: Baseline tag or null
ReleaseNotesCLI-->>ReleaseWorkflow: Print baseline tag
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
|
✅ Action performedReview finished.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/release-notes.ts`:
- Around line 49-59: Update previousReleaseNotesTag to filter candidates using
SemVer-aware comparison, retaining only tags strictly older than the normalized
target release rather than merely excluding the exact tag. Preserve the existing
preview filtering and select the newest remaining prior tag; add a regression
test covering a newer preview candidate such as v2.8.0-preview.1 for target
2.7.43-preview.20260728.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: aa30df7f-b341-4f64-9758-886fba9db3fc
📒 Files selected for processing (4)
.github/workflows/release.ymlscripts/release-notes.tstests/ci-workflows.test.tstests/release-notes.test.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9f8c3a051
ℹ️ 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".
Exclude tags newer than the target and rank stable after matching previews so generate-notes does not pick the wrong previous release.
|
@coderabbitai review Addressed both findings in f423bbc:
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
git show --stat --oneline --decorate f423bbc2
git diff f423bbc2^ f423bbc2 -- scripts/release-notes.ts tests/release-notes.test.ts .github/workflows/release.yml tests/ci-workflows.test.ts
ast-grep outline scripts/release-notes.ts --items all
ast-grep outline tests/release-notes.test.ts --items all
printf '\n--- release-note helper and CLI references ---\n'
rg -n -C 8 'previousReleaseNotesTag|sortVersionTagsAscending|previous-release-tag|compare' \
scripts/release-notes.ts tests/release-notes.test.ts
printf '\n--- workflow baseline call sites ---\n'
rg -n -C 8 'previous-release-tag|previous_tag|RELEASE_VERSION' \
.github/workflows/release.yml tests/ci-workflows.test.tsLength of output: 61464 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- line-numbered changed helper/tests ---'
nl -ba scripts/release-notes.ts | sed -n '16,122p'
nl -ba tests/release-notes.test.ts | sed -n '56,102p'
printf '%s\n' '--- version/tag validation and release-version conventions ---'
rg -n -i -C 4 \
'(semver|sem-ver|release.?version|inputs\.version|version.*regex|regex.*version|preview\.)' \
--glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' \
package.json .github scripts tests README.md 2>/dev/null || true
printf '%s\n' '--- tracked release tags, if available in this checkout ---'
git tag --list 'v[0-9]*' | tail -n 40Length of output: 1024 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- line-numbered changed helper/tests ---'
awk 'NR >= 16 && NR <= 122 { printf "%6d %s\n", NR, $0 }' scripts/release-notes.ts
awk 'NR >= 56 && NR <= 102 { printf "%6d %s\n", NR, $0 }' tests/release-notes.test.ts
printf '%s\n' '--- version/tag validation and release-version conventions ---'
rg -n -i -C 4 \
'(semver|sem-ver|release.?version|inputs\.version|version.*regex|regex.*version|preview\.)' \
--glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' \
package.json .github scripts tests README.md 2>/dev/null || true
printf '%s\n' '--- tracked release tags, if available in this checkout ---'
git tag --list 'v[0-9]*' | tail -n 40 || trueLength of output: 67296
The reported fixes are correctly applied:
I did not execute the test suite because repository executables are unavailable in this review sandbox. ✅ Action performedReview finished.
|
Summary
2.7.43-previewafter2.7.42usesv2.7.42 → v2.7.43-previewinstead of restatingv2.7.41-preview → v2.7.42.previousReleaseNotesTaghelper + CLI + regressions for the skipped-preview-after-stable case.Test plan
bun test --isolate tests/release-notes.test.ts tests/ci-workflows.test.tsSummary by CodeRabbit
Bug Fixes
Tests