feat(checks): date-mismatch, a released entry's date against the day its tag was cut #19
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
actions/changelog!19
Loading…
Reference in a new issue
No description provided.
Delete branch "mikluko/octant/1714-date-mismatch"
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?
Octant: T1714, on map D1726. Stacked on #14.
Nothing compared a released entry's date against the tag naming that version.
date-formatreads the shape,date-orderanddate-futureread the document alone, and the immutability pair compares text — so an entry could claim2026-09-01whilev1.2.3was cut on the 11th and every check passed.An entry no tag names is silent: a release pending is not a date that disagrees, and that is B1713's subject rather than this check's.
Two things it has to get right
Both are settled where the tag is read, not where the dates are compared, so
internal/changelogonly ever compares twoYYYY-MM-DDstrings.A repository cuts one kind of tag or the other. An annotated tag is an object carrying a tagger date of its own; a lightweight tag is a bare reference whose only date is on the commit it names. Reading one kind is wrong on half the repositories in reach — this repo cuts lightweight,
up2-monitoringcuts annotated.The day is the tag's own, not UTC. A changelog date is a bare calendar day meaning the day the human cut the release. The tests pin one tag either side of a midnight in opposite directions (
23:30-07:00and00:30+09:00), so a UTC reading fails both.What running it against real history turned up
The check fired on this repository, and it was the check that was wrong:
v1is the moving major tag, andParseTagreads it as1.0.0, so the first tag matching the entry was a pointer whose date says when it last moved. Every shipped release would have read as misdated the momentv1advanced. A version named by two tags is now judged at the fuller spelling, andTagComponentsmoved tointernal/semverso that rule has one home rather than a private copy ininternal/git.Four existing fixtures also went red: they cut their tags today while their documents named February, and none of them was about dates. They now commit on the day they claim. That is the check earning its place before it has shipped.
Open, and yours
The ticket left two to settle while building. I implemented the defensible reading of each and both are one-line changes:
error. It catches an inconsistency rather than encoding a policy, and the precedent isundated-entry, which defaults toerrorand lets the one workflow that wants it switch it off.already-tagged, so it costs nothing, and it catches history somebody rewrote.Suite green whole,
vetandgofmtclean, README regenerated from the register, and this repository's own document readsvalid=true.