Conversation
…#1884) Compare committed sections against the PR merge base, preserving release stamping while rejecting released-history edits. Verify through the real gate CLI, 45 related tests, static checks and the workspace build. Full local tests are blocked by six unchanged native-grep setup failures because cargo is absent.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1884. The changelog gate now rejects changes to previously released
sections instead of treating any changed
CHANGELOG.mdfilename as sufficient.Root cause and change
The CLI collected changed paths but never compared changelog contents. It now
compares committed sections at the PR merge base and HEAD, including deleted and
renamed files. Violations name the file, line and section.
no-changelogcannotwaive released-history immutability.
The existing Unreleased block can still be stamped into a new release. The
regression invokes the actual release helpers and checks both stamping and
next-cycle insertion.
Reproduction and verification
The regression drives the real gate CLI in an isolated temporary Git repository.
Before the fix, all five invalid cases returned:
Those cases cover a released addition, modification, deletion, whole-file
deletion and a
no-changelogbypass attempt. A further failing boundary casecovered inserting a second Unreleased heading below a release.
After the fix, all six invalid cases exit 1 with a path/line/section diagnostic.
Unreleased edits, actual release stamping and next-cycle insertion still exit 0.
Fixture repositories are removed by the test cleanup.
node --test scripts/check-pr-changelog.test.mjs: 20 passed.npm run check: exit 0; six pre-existing informational diagnostics in untouched tests.npm run build: exit 0.npm test: 300 passed / 6 failed in the script stage. All six failures arenative-grep setup failures (
cargo metadata failed to run); cargo is absentlocally, and the unchanged current-main snapshot reproduces them. Workspace
tests were not reached, so a complete local test pass is not claimed.
No agent-runtime behavior or published changelog content is changed.
Summary by cubic
Fixes #1884 so the changelog gate rejects changes to released sections instead of accepting any changed
CHANGELOG.mdfilename.no-changeloglabel can no longer waive released-history immutability.Written for commit 95b2e71. Summary will update on new commits.