Skip to content

fix(test): assert the shape of release notes, not a phrase from one release - #159

Merged
AVANT-ICONIC merged 1 commit into
mainfrom
fix/release-notes-assert-the-shape
Sep 16, 2026
Merged

AVANT-ICONIC merged 1 commit into
mainfrom
fix/release-notes-assert-the-shape

Conversation

@AVANT-ICONIC

Copy link
Copy Markdown
Owner

The v9.0.1 release dry run failed on a perfectly valid changelog.

tests/unit/prepare-release.test.ts ended with:

expect(release.notes).toContain("Node.js runtime baseline");

That is a sentence from the 9.0.0 section, pinned into a test that reads
whatever version package.json currently names. It could only pass while 9.0.0
was current, so the first version bump after it was written was guaranteed to
turn the release workflow red — with release notes that were entirely correct.

A literal like that is a countdown, not a contract.

What it checks now

What the test means is "this version has real release notes". So:

expect(release.notes.length).toBeGreaterThan(100);
expect(release.notes).toMatch(/^[-*] /m);          // at least one bullet
expect(changelogText).toContain(`## [${packageVersion}]`);

Substantial prose, real changelog structure, and a section belonging to this
version rather than the previous one picked up because a marker was missing.

The real contract is untouched

Both genuine failure modes are still refused, by name:

empty section   -> refused: CHANGELOG.md section for 9.0.1 is empty
missing section -> refused: CHANGELOG.md does not contain '## [9.0.1]'

8/8 in this file. This unblocks the v9.0.1 release.

…elease

The v9.0.1 release dry run failed on a valid changelog.

`validates the repository's current package version against its real changelog`
ended with:

    expect(release.notes).toContain("Node.js runtime baseline");

a sentence out of the 9.0.0 section, pinned into a test that reads whatever
version package.json currently names. It could only pass while 9.0.0 was
current, so the first version bump after it was written turned the release
workflow red with notes that were entirely correct.

A literal like that is a countdown, not a contract. What the test means is
"this version has real release notes", so that is what it checks now:
substantial prose, at least one changelog bullet, and a section marker for the
current version.

The genuine contract is untouched and still proven -- an empty section and a
missing section are both refused by name.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@AVANT-ICONIC
AVANT-ICONIC merged commit e5ec0bb into main Sep 16, 2026
13 checks passed
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4433269f-6d83-41da-ae48-157261e84ec6

📥 Commits

Reviewing files that changed from the base of the PR and between ec3c2ef and 651c0e3.

📒 Files selected for processing (1)
  • tests/unit/prepare-release.test.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AVANT-ICONIC
AVANT-ICONIC deleted the fix/release-notes-assert-the-shape branch September 16, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant