docs: add release version stamp check#9
Conversation
Nanako0129
left a comment
There was a problem hiding this comment.
@CooperSheroy Thanks for catching this — keeping the changelog heading synchronized is a real gap in the current regression coverage.
Before merging, please rebase this branch onto the latest main. The PR currently conflicts with the newer RELEASING.md, which already runs the dependency-free policy regression suite and git diff --check; those checks need to be preserved.
The proposed shell snippet also has two correctness issues. Because the two grep -q commands are not chained, a policy-stamp mismatch can be hidden when the changelog check succeeds: the block's final exit status would still be 0, and both commands are silent. In addition, regular grep treats the dots in a version such as 1.1.5 as regex wildcards, so the checks are not exact.
Since current main already has test_version_stamps_move_together in tests/test_policy.py, I recommend extending that test to cover the changelog instead of duplicating part of the version contract as shell commands in RELEASING.md:
changelog = (ROOT / "CHANGELOG.md").read_text(encoding="utf-8")
self.assertRegex(changelog, rf"(?m)^## v{re.escape(version)} ")That keeps the release checklist's existing python3 -m unittest discover -s tests -v command as the single release gate and ensures the changelog check also runs in automated regression testing.
If you prefer to retain the shell check, please at least chain the commands and use fixed-string matching:
version="$(cat VERSION)" &&
grep -Fqx "<!-- pilotfish v${version} -->" templates/claude-md.orchestration.md &&
grep -Fq "## v${version} " CHANGELOG.md|
Maintainer follow-up is now available in #31. It preserves the release-contract gap @CooperSheroy identified—requiring the This PR will remain open until #31 completes review and merges; it can then be closed as superseded with the original attribution preserved. |
|
@CooperSheroy, the release-contract gap you identified is valid. I prepared a minimal alternative in #31 that moves the check into the existing Python version-stamp test. To preserve your PR credit, would you like me to push that three-line test change directly to this branch, replacing the conflicting I will keep #31 as a draft and take no branch action here for 48 hours. If there is no response after that window, I will proceed with #31 while retaining explicit |
Summary
Verification
version="1.1.4"; grep -q "<!-- pilotfish v -->" templates/claude-md.orchestration.md; grep -q "## v " CHANGELOG.md