Skip to content

docs: add release version stamp check#9

Open
CooperSheroy wants to merge 1 commit into
Nanako0129:mainfrom
CooperSheroy:catalina/release-version-check-20260713
Open

docs: add release version stamp check#9
CooperSheroy wants to merge 1 commit into
Nanako0129:mainfrom
CooperSheroy:catalina/release-version-check-20260713

Conversation

@CooperSheroy

Copy link
Copy Markdown

Summary

  • add a release checklist command to verify VERSION, the policy-block version comment, and CHANGELOG heading stay synchronized before tagging

Verification

  • version="1.1.4"; grep -q "<!-- pilotfish v -->" templates/claude-md.orchestration.md; grep -q "## v " CHANGELOG.md

@Nanako0129 Nanako0129 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@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

Copy link
Copy Markdown
Owner

Maintainer follow-up is now available in #31.

It preserves the release-contract gap @CooperSheroy identified—requiring the CHANGELOG.md heading to match VERSION—but implements it in the existing Python version-stamp test rather than adding duplicate shell checks to RELEASING.md.

This PR will remain open until #31 completes review and merges; it can then be closed as superseded with the original attribution preserved.

Copy link
Copy Markdown
Owner

@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 RELEASING.md shell change? Maintainer edits are enabled, but I will not modify your branch without your confirmation.

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 Reported-by attribution to you and this PR.

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.

2 participants