release check: the changelog date has to be true, not just present - #39
Conversation
check_release.py required a release section to carry a date and never asked whether the date was right. 0.3.1 shipped carrying '## [0.3.1] - 2026-08-02' while PyPI recorded the upload on 2026-08-17. Every existing check passed: the version matched, the tag matched, the section had a date and was not empty. The entry was drafted when the work was done and never touched again when it went out fifteen days later. A changelog is read for the one thing a git log does not answer at a glance - when a version reached users - and this one was wrong by two weeks. Only applied when a tag is being released. On the working tree the date is legitimately the day the entry was drafted, and failing a pull request for that would be noise. One day of tolerance either way, because the release runs on a UTC runner and the entry is written in the author's own timezone. Also corrected 0.3.1's date to the PyPI upload date, and pinned 'today' in the two existing tests that pass a tag - they call check() with the real clock, so without that they would have started failing the day after the changelog was last written.
Jules ReviewCOVERAGE: 2c965f6 3 files SummaryThis PR enforces that a released tag's changelog date matches the day it is actually tagged, preventing a release's recorded date from silently drifting from its drafted date. It accurately parses the date, computes the drift, and enforces a one-day tolerance to account for timezone differences between the author and the UTC runner. The test coverage correctly pins dates where necessary to ensure isolation of the tested behaviors. The fix for the variable shadowing of Findings[WARN]
VerdictVERDICT: comment This review never edits code or force-blocks a merge. No blocking issues were found, so this PR was auto-approved. |
check_release.pyrequired a release section to carry a date. It never askedwhether the date was right.
rigout 0.3.1 shipped carrying:
PyPI recorded the upload on 2026-08-17. Every check in the file passed: the
version matched, the tag matched, the section had a date and was not empty. The
entry was drafted when the work was done and never touched again when it went
out fifteen days later.
A changelog is read for the one thing
git logdoes not answer at a glance -when a version reached users - and this one was wrong by two weeks. Nothing
failed, because nothing looked.
The rule
When a tag is being released, the date on that version's heading must be the day
it goes out.
Not applied to the working tree. Without a tag the date is legitimately the day
the entry was drafted, and failing a pull request for that would be noise. One
day of tolerance either way, because the release runs on a UTC runner and the
entry is written in whoever's local timezone.
Verified against the real defect, before the tests were written
Run on this repository with the changelog as it stood:
Silent without a tag, refuses with one. 0.3.1's date is corrected to the upload
date in this PR.
One thing this change would have broken
test_the_matching_tag_passesandtest_a_tag_naming_another_version_is_refusedcall
check()with a tag and the real clock. Passing a tag now also checks thedate, so both would have started failing the day after the changelog was last
written - a test that goes red on a calendar rather than on a defect. Both now
pin
todayto the entry's own date; date drift has its own tests.Checks
591 unit tests pass, ruff and mypy clean. The new tests were mutation-checked:
making
stale_date_problemalways returnNonefails exactly the three thatassert refusal, and the two tolerance tests correctly survive it.