Skip to content

ci: fail check-version when a PR edits the frozen CHANGELOG.md - #4594

Merged
cragwolfe merged 2 commits into
mainfrom
crag/freeze-changelog-check
Oct 24, 2026
Merged

cragwolfe merged 2 commits into
mainfrom
crag/freeze-changelog-check

Conversation

@cragwolfe

@cragwolfe cragwolfe commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

CHANGELOG.md was frozen in #4578, but nothing enforces the freeze: PRs written under the old convention still edit it. This makes the existing required check-version job fail when a PR changes CHANGELOG.md, with a message pointing to the PR title and the "Release note" section.

The check lives in scripts/check-new-release-version.sh, with regression tests in scripts/test-check-new-release-version.sh. No workflow, settings or branch-protection changes are needed, because check-version is already a required check.

How it decides

The check compares CHANGELOG.md between the base that check-version already uses and the commit under test:

  • Pull requests: the base is the first parent of the merge ref, the main snapshot the merge result was built on. Only the PR's own changes count, so a stale PR that never touched the changelog still passes.
  • Merge queue: the base is the queue entry ahead, which the job already fetches. Each PR is judged only on its own change.

The check runs before the version rules, so it applies whatever the version does, release PRs included.

Validation

  • shellcheck and shfmt -i 2 -d are clean. scripts/test-check-new-release-version.sh passes 27 cases, including two new ones that edit CHANGELOG.md in a temporary repo: one as a merge-group entry and one as a pull_request merge result. Both new cases fail without this PR's script change.
  • Simulated locally against current main:
    • this branch, no changelog edit (queue-style base): PASS
    • PR editing CHANGELOG.md (queue-style base): FAIL with the freeze message
    • PR editing CHANGELOG.md (pull_request merge ref, HEAD^1 base): FAIL
    • PR without a changelog edit (pull_request merge ref): PASS

Release note

None (CI-only).

🤖 Generated with Claude Code

@cragwolfe cragwolfe added the github_actions Pull requests that update GitHub Actions code label Oct 23, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 1 file

Shadow auto-approve: would not auto-approve because issues were found.

View guided diff | Re-trigger cubic

Comment thread scripts/check-new-release-version.sh Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.

View guided diff | Re-trigger cubic

@cragwolfe
cragwolfe merged commit c74e6c4 into main Oct 24, 2026
58 checks passed
@cragwolfe
cragwolfe deleted the crag/freeze-changelog-check branch October 24, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants