fix(test): assert the shape of release notes, not a phrase from one release - #159
Conversation
…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.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedNext included review available in 53 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
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 |
The v9.0.1 release dry run failed on a perfectly valid changelog.
tests/unit/prepare-release.test.tsended with:That is a sentence from the 9.0.0 section, pinned into a test that reads
whatever version
package.jsoncurrently names. It could only pass while 9.0.0was 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:
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:
8/8 in this file. This unblocks the v9.0.1 release.