Derive the changelog's no-tag release date from the version instead of the clock
The defect
pm-changelog synthesises a pending release window for a version that has no matching git tag, and stamps it with the current UTC date. So changelog:check regenerates a different heading date every day and fails on any day after the changelog was written — a gate whose verdict flips at midnight with no input change.
release.yml pushes its tag only after npm publish succeeds. Publish has failed fleet-wide since 2026-08-21, so this package carries an untagged version and sits on that clock-dependent path.
It passes today only by coincidence — the package version and today's date are the same calendar day. That stops being true tomorrow.
Measured, not reasoned about
Verified on pm-ops, chosen because its version date and today's date differ, which is what makes the comparison discriminate:
generated heading for an untagged 2026.8.22 | |
|---|---|
without --date-from-version | ## 2026.8.22 - 2026-08-24 ← today |
with --date-from-version | ## 2026.8.22 - 2026-08-22 ← the version |
What changed
The flag already shipped in pm-changelog@2026.8.17. No fleet package was passing it.
Applied to every invocation of the generator, not only the scripts named changelog* — release.yml invokes pm-changelog directly, and if only one side carries the flag then generation and check disagree and the divergence returns as a release failure. Site audit:
| file | sites | flagged |
|---|---|---|
package.json | 1 | 1 |
.github/workflows/release.yml | 2 | 2 |
The flag affects only the no-tag path; where a tag exists the date still comes from the tag's commit, so tagged history is untouched.
pm item
pm-context-a9iw — root cause, the site audit, and the verification evidence.
Not done here
Backfilling the missing git tags would also make this green, and is deliberately not the fix: the workflow tags only after a successful publish, so a tag asserts a release npm never received, and it would stop exercising the broken path rather than repairing it.
Summary by Sourcery
Make pending release changelog dates stable by deriving them from the version and enforce consistent use of the option across package and release workflow invocations.
Bug Fixes:
- Make untagged release changelog dates deterministic by deriving them from the package version instead of the current UTC date.
- Ensure tagged release changelog behavior remains unchanged while fixing the no-tag path.
Enhancements:
- Add a repository-wide verifier that requires every changelog generator invocation to use the version-derived date option and validates that the option changes the generated heading.
CI:
- Run the changelog date verification as part of CI and the release checks.
Tests:
- Add fixture-based coverage for command discovery, shell continuations, shared arrays, separators, comments, version input forms, and behavioral heading validation.
Chores:
- Restore the changelog dependency floor and release-check scripts in package metadata.
Summary by cubic
Makes untagged release changelog dates deterministic by deriving them from the package version instead of the UTC clock, and gates every generator invocation on the flag. Tagged releases are unchanged.
- Upgrades
pm-changelogto^2026.8.29and passes--date-from-versionto every invocation, including the direct calls inrelease.yml, so generation and check can't disagree. - Replaces the shell verifier with a TypeScript one (
verify:release-changelog-date) that joins line continuations, expands shared bash arrays, recognizes all three version-input spellings, strips unquoted trailing comments, and splits on&&,||,;with or without spaces so a flagged call can't cover an unflagged neighbor. - Wires the verifier into
release:checkand CI so an unflagged edit fails the PR instead of sitting in the tree. - The verifier requires the flag to change the heading so a failing control can't pass silently, and a fixture-based test suite proves each rule fails on the defect it exists to catch, covering both plain and suffixed spot versions.
- Rebuilds
package.jsonafter a merge whose branch-side resolution reverted thepm-changelogfloor and dropped tworelease:checkscripts; both are restored.
No migration required.