Skip to content

🐛 fix(changelog): tolerate a tagged-but-unstamped HEAD in the drift gate (D-181) - #135

Merged
konih merged 5 commits into
mainfrom
lane/changelog-tagged-head
Sep 13, 2026
Merged

konih merged 5 commits into
mainfrom
lane/changelog-tagged-head

Conversation

@konih

@konih konih commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

No description provided.

…ate (D-181)

Between pushing a release tag and landing its stamp commit, any verify run
that checks out the tagged SHA (a re-run, or the weekly schedule on an
unchanged main) rendered the new section, found it missing and went red.
release.yaml's verify-green tag gate (REQ-AUD-S03-01) needs every verify run
on the SHA to be green, so one such red locked the tag out of its release.

verify-changelog.sh now, after the normal diff fails, re-renders the
committed form with --ignore-tags for exactly the v* tags pointing at HEAD.
If CHANGELOG.md equals that pre-tag render it passes with a notice naming
the stamp to land (a ::warning:: under GITHUB_ACTIONS). A hand edit or a
history re-render on the tagged HEAD, an unstamped tag with any commit on
top, and an older unstamped tag behind a newer tagged HEAD all stay red.
render-changelog.sh forwards extra arguments to git-cliff for this.

changelog_gate_test.sh §10c pins both polarities; three mutants (no
allowance, allowance without the pre-tag comparison, allowance keyed on the
newest reachable tag instead of HEAD's) each red the suite.
…unstamped commit (D-181, review F1)

CI runs all of `task check` in release-exitgate (hack/audit/exitgate_test.sh),
so the drift-gate allowance alone did not close the REQ-AUD-S03-01 lockout:
changelog_gate_test.sh still went red on the tag SHA, at §1 (newest section
vs newest tag) and at the §10 baseline, whose overlay commit sat on top of the
tag. Measured stage by stage on a freshly tagged clone, those were the only
reds.

§1 now reads verify-changelog.sh's own allowance from its output and warns
instead of failing on that commit only; the §10 sandbox drops HEAD tags whose
section is missing, so it starts from the pre-tag state. New §10e runs this
whole script nested on a tagged-but-unstamped clone (green) and with a commit
on top (red); mutants removing either fix red it.

Also from the review: rows for a release and its -rc on one commit and for
regex escaping of the HEAD tag (a mutant without escaping reds), a failed
pre-tag render falls through to the diff, the stamp hint names the release
tag rather than a pre-release, and the tag-glob comment is corrected. Docs
and the D-181 record now say what the code does.
… releases (D-181, review N1/N2)

§10e committed its overlay with a cliff-skipped subject, so on a HEAD where
every commit since the newest tag is skipped (right after every stamp commit)
its v98.0.0 was an empty release, git-cliff omitted it, and the nested §1
went red: main would have been red after every release. The overlay now uses
a rendering subject, with a positive control that v98.0.0 renders a section.

§1 is now a function, newest_section_check, and also accepts a newest tag
that renders no section while the drift gate is plainly green (the file is
then byte-identical to the render of every tag, so nothing is missing): a
tooling-only release no longer reds its tag SHA and main forever. §10e grades
the stamp commit and such an empty release through the function directly.
@sonarqubecloud

Copy link
Copy Markdown

@konih
konih merged commit bd61a47 into main Sep 13, 2026
9 checks passed
@konih
konih deleted the lane/changelog-tagged-head branch September 13, 2026 08:09
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