Release the pending-date-mismatch check (changelog#41) #42
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/changelog!42
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/changelog-y7x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Merge this on 2026-11-12 UTC, which ends at 01:00 on 2026-11-13 in CET. The heading is dated 2026-11-12. If the merge commit lands on a later UTC day,
pending-date-mismatchholds the release and a pull request has to correct the date first (see "The day" below).What and why
Cuts 2.1.0, the release of the
pending-date-mismatchcheck merged in #41 (bead changelog-y7x, defect changelog-o91). The check is meant to reach the consumers of@v2from a release they can pin, instead of each of six workflows re-implementing it.The release is cut the way README "Releasing" and the commit of 2.0.1 (#40) cut one:
go run ./cmd/changelog releasefolded.changelog/pending-date-mismatch.mdintoCHANGELOG.mdand deleted it, andactions/VERSIONnames the same version. The diff is those three files.The version, and why
The tool computes 2.1.0 (
version=2.1.0,prerelease=false). Its bump table makes a minor of a fragment with anAddedand aChangedsection and noBreakingsection or**Breaking:**note. Run on this tree, the validator reportsvalid=true,due=true,already-tagged=false,latest-tag=v2.0.1, andgo test ./...passes.A check that is new and an error by default can turn a consumer's green run red, and these rules still call it a minor release: it fires only when a release is due and the heading's date is not the day the tag will carry. Such a release was already doomed, because once it was tagged
date-mismatchfailed it andrelease-entry-modifiedforbade the repair. Only the moment of the failure moves, from after the tag to before it. I did not add a**Breaking:**note: it would make the tool compute 3.0.0, which@v2consumers would never follow, which defeats the point of this release. If you judge it breaking, say so; it is a one-line fragment and a re-run of the tool.The day
pending-date-mismatchcompares the newest untagged entry's date with the committer date ofHEAD, in the offsetHEADrecords, which is the day a lightweight tag cut there carries. When this pull request merges,HEADis its merge commit. Earlier merges of this repository record+0000(#40 at 11:02:29 +0000, #41 at 13:39:41 +0000), so the day compared is the UTC day of the merge.pending-date-mismatch, and for the tag not to leavedate-mismatchred, the merge commit has to be dated 2026-11-12 in its recorded offset, i.e. merged before 2026-11-13 00:00 UTC. Written at 13:50 UTC, that leaves about ten hours.mainbetween the merge and the dispatch unless it is dated the same day: the tag is cut onHEADof the dispatch's checkout, and the check reads that commit, not the merge commit.HEAD.due=false(the reason is the check's message), tries to fold again, and refuses, because[Unreleased]and.changelog/are empty. Repair it with a pull request that dates the 2.1.0 heading with the day the merge commit of that pull request will carry, and merge it that day.After the merge
The release workflow (
.forgejo/workflows/release.yaml) runs only onworkflow_dispatch. A pull request cannot start it, and I did not.main, with the inputversionempty (or2.1.0). The newest entry is already due, so the run resumes at the tag instead of folding: it validates, tests the tree, builds four binaries, pushes the tagv2.1.0, publishes the release with the binaries andchecksums.txt, smoke-tests the published actions, then movesv2.mikluko/changelog, from the Actions tab (Run workflow, branchmain). The city's forge accountcity-roothaspush: trueon the repository (read fromGET /repos/mikluko/changelog,admin: false), which is what the Forgejo endpointPOST /api/v1/repos/mikluko/changelog/actions/workflows/release.yaml/dispatcheswith{"ref":"main","inputs":{"version":""}}asks for. I have not called it, so that is read from the permission, not observed.mirror-release.yamlthere copies the release and its assets.What moves
v2.1.0is created.v2.0.0andv2.0.1never move.v2moves from the v2.0.1 commit to the v2.1.0 commit (git tag -f v2, forced push), and it is the only moving tag. There is nov2.1: the workflow cutsvX.Y.ZandvMAJORonly.https://sarak.sh/mikluko/changelog/actions/validate@v2follows by itself, since Forgejo resolves the tag on each run, andactions/VERSIONat that commit makes the action download the 2.1.0 binary. The old spellinghttps://sarak.sh/mikluko/changelog@v2does not resolve: since 2.0.0 there is noaction.yamlat the root.@v1stays at v1.6.0 (7ec45bb) for good, and so does a pin of that SHA: neither gets the check.The six repositories
Read from the forge, read only (
GET /repos/mikluko/<repo>/contents/.forgejo/workflows). "Gets the check" means: it runs thevalidateaction at v2.1.0 or later..../changelog/actions/validate@v2atrelease.yaml:40andtest.yaml:91due(release.yaml:42), so a held release stays untagged..../changelog/actions/validate@v2atrelease.yaml:47,renovate.yaml:46andtest.yaml:59(warn: missing-fragment)renovate.yaml:21pins the Go tool asCHANGELOG_TOOL: .../changelog/v2/cmd/changelog@v2.0.1; it is used byappendandrelease(lines 72-73) and has no bearing on the check, so bump it only to follow.https://sarak.sh/mikluko/changelog@v1atrelease.yaml:52(withwarn: date-mismatch, lines 53-54) andtest.yaml:72(samewarn); writers.../changelog/append@v1atrenovate.yaml:95,:106,:117and.../changelog/release@v1at:124@v1is frozenrelease.yaml:52andtest.yaml:72tohttps://sarak.sh/mikluko/changelog/actions/validate@v2. This is the 1.x to 2.x migration of README: fragments are on by default andmissing-fragmentfails a pull request with no note, so either keepfragments: ""on each invocation or adopt.changelog/. Decide forrelease.yamlwhetherwarn: date-mismatchshould also namepending-date-mismatch: kuberex runs its release on a schedule as well as on push (release.yaml:15-17). The writers can follow toactions/append@v2andactions/release@v2, which the check does not need.https://sarak.sh/mikluko/changelog@v1atci.yaml:42andrelease.yaml:45(witherror: prerelease-entry, lines 46-47)@v1is frozenhttps://sarak.sh/mikluko/changelog/actions/validate@v2, with the same fragments decision as kuberex.release.yamlruns on every push tomainand uses the action'sduefor the version cut (release.yaml:36,:88,:128).https://sarak.sh/mikluko/changelog@7ec45bb55aa1f616830ac301fa777d27af0d73ab # v1.6.0atci.yml:84andrelease.yaml:38https://sarak.sh/mikluko/changelog/actions/validate@<the SHA of the v2.1.0 commit> # v2.1.0(its pin policy is by commit,release.yaml:4), and take the fragments decision as above. Then remove the guard from claudeacp#5: the comment atrelease.yaml:39-45and the step "Heading date is the commit's own date" atrelease.yaml:46-61. It does by hand what the check does: it compares the heading's date withgit log -1 --format=%cdofHEADand refuses to tag../actions/validateat.forgejo/workflows/release.yaml:192;ci.yamlrunsgo run ./cmd/changelogat:79claudeacp's guard can only go once its pin is on this release: with the v1.6.0 pin,
dueis true on a mismatched date and the guard is the only thing holding the tag.Checklist
.changelog/gained a fragment carrying this change's notes, or this change needs none. This change is the release: it consumes the fragment of #41 intoCHANGELOG.md, which is what README says only a release writes.AI assistance
Claude Code (Claude Sonnet 5.5) worked this change as a Worker of the city: it ran the release tool, read the six repositories on the forge, and wrote this description. The commit carries a
Co-Authored-By:trailer.🤖 Generated with Claude Code
Bead: changelog-y7x
Review of
4b09a00c85for changelog-y7x. Checks of the head: success.Verdict
pass
Findings
mainalso turns CI's "Validate the changelog" step red (valid=falsefrompending-date-mismatch), as well as holding the release. That fits the repair the description gives (a pull request re-dating the heading), but it is worth knowing before the merge. No change needed.Verified
.changelog/pending-date-mismatch.mddeleted,CHANGELOG.mdgains[2.1.0] - 2026-11-12and its link references,actions/VERSION2.0.1 → 2.1.0), the same shape as the 2.0.1 release in #40.mainhas no REVIEW.md, AGENTS.md or CLAUDE.md; README "Releasing" and "Contributing" checked.go run ./cmd/changelog release -fragments .changelog -date 2026-11-12onorigin/main(9b1282d) and writingactions/VERSIONgives a tree identical to the head. The tool computes 2.1.0: anAddedand aChangedsection and no Breaking note make a minor in the README's bump table.origin/main: a clean fast-forward; the forge reportsmergeable.go build ./...,go vet ./...,go test ./...andgo test -race ./...pass;go run ./cmd/gen-readmeleaves README.md unchanged;go run ./cmd/changelog -fragments .changelogwith-base mainand with no base givesvalid=true version=2.1.0 already-tagged=false latest-tag=v2.0.1 due=true, exit 0. golangci-lint, govulncheck and actionlint not run locally (they need the network); they passed in the head's CI and the diff touches no code.due=falsewith "version 2.1.0 is dated 2026-11-12 and a tag cut on HEAD would carry 2026-11-13". With 2026-11-12T23:30+0000 it saysdue=true. Earlier merges onmainrecord +0000. This confirms the description's warning: merge before 2026-11-13 00:00 UTC..forgejo/workflows/release.yamlagrees with the description. Thebeforestep seesdue=true, so fold, VERSION and commit are skipped and the run resumes at the tag; theversioninput is unused on that path; it cutsv2.1.0and force-moves onlyv2.v1andv1.6.0are7ec45bb;v2andv2.0.1arec19d67d.