fix(release): pin the compare base of a versioned CHANGELOG section - #171
waterbro-8 wants to merge 1 commit into
Conversation
|
Closing as a duplicate of #170, which is the same fix and was opened at My process error: I checked that the gap was real and that my patch closed it, but I did not list open PRs before opening one. I then measured both implementations rather than guessing which one to keep. Three checkers side by side on the same trees, mutating only
On all eight rows the two implementations agree. So there is nothing here worth merging on top of #170, and reviewers should look at #170 only. One divergence exists and I left it out of the table because it favours #170: my derivation matches headings starting with a digit, theirs reuses the file's own definition at Full differential, the one PR-body correction I found in #170 (its No tag, no publish, no version bump, no merge, nothing closed but this PR, which is mine to close. The branch |
Refs #168
Summary
scripts/validate_release_version.shpins where a release section's comparison link ends but not where it starts: the accepted form is a glob with the base segment eaten by a wildcard (:99).So a
[0.1.2]section linked ascompare/v0.1.0...v0.1.2— a base off by one release, silently widening or narrowing which commits the release contains — passes the gate that exists to keep release surfaces consistent.v0.0.1,v0.1.0and a self-comparev0.1.2are all accepted today. The adjacentdieat:100saysmust terminate at v${version}, so the implementation matches the property it declares; that property is just not the one that matters.Reproduction
On
8a92baa680b(this PR changes no data, only the checker):Change
compare/no longer takes a wildcard base. The base is derived from the CHANGELOG itself: the assertion directly above already pins${version}as the first versioned heading, so the second versioned heading is the release this one follows. Thereleases/tagform stays exact-character, and if no previous versioned heading can be derived the gate fails closed instead of guessing.One file,
scripts/validate_release_version.sh, +13 / −5. No version strings, no surfaces, no workflow, no release action touched.Bidirectional mutation evidence
Same tree, same set of corruptions, pristine checker and patched checker side by side (8 cases):
v0.1.1)v0.0.1v0.1.0(off-by-one)v0.1.2(self-compare)v0.9.9releases/tagformmainvalidating its own0.1.1mainwith base ->v0.0.1All 4 gap cases flip to red and the other 4 are untouched; 0 mismatches against expectation.
Closing checks:
bash -nclean;scripts/test_release_guards.shandscripts/test_release_helpers_compat.shboth rc=0 with the patch applied; the gate still passesmain's own0.1.1. No test anywhere in the repo asserts the old error string (grep -rn "must terminate at" .→ only the checker itself), so replacing that message breaks no existing assertion.Evidence level
main@7a194f1eba4baseline.test_release_guards.sh.Why it is its own PR
The gap is in the release checker, not in the CI legs #169 touches, and #169 does not modify this file. Shipping it separately keeps both reviewable. It is also independent of the #162 / #168 merge order — it does not change any release surface, only what a future release section is allowed to claim about its own range.
Explicit non-goals
Refs #168is a reference, not a claim of scope or an implication that chore(release): sync every version surface to 0.1.2 #168 should merge.