Skip to content

fix(release): restore the New Features section dropped from published notes - #297

Merged
ardelperal merged 2 commits into
mainfrom
fix/issue-296-release-notes
Sep 3, 2026
Merged

fix(release): restore the New Features section dropped from published notes#297
ardelperal merged 2 commits into
mainfrom
fix/issue-296-release-notes

Conversation

@ardelperal

Copy link
Copy Markdown
Owner

Closes #296

v1.16.0 was published with its entire ### New Features section missing — all 16 bullets, covering the VBA node-discovery epic #264. Separately, the promotion commit never reached main, so main still carried a pre-release CHANGELOG and package.json.

Root cause

splitSubsections matched sub-headings with /^### (\w+)\s*$/. ### New Features does not match. In the v1.16.0 block it was the first heading, so its header line and all 16 bullets fell into unrelSubs.leading — which the Case B merge never reads. Dropped, no warning, exit 0.

The workflow log states it plainly:

prepare-release: 1.16.0 — merged 22 Unreleased entries into existing [1.16.0] block

22 of 38.

Compounding it: the promote step pushes to whichever branch triggered the run. The run was dispatched from release/v1.16.0, so commit fe3d598 landed there and vanished when the branch was deleted.

Changes

Root cause

  • Match heading text verbatim, so multi-word headings are recognised.
  • Carry over entries that precede the first heading instead of dropping them. Whatever the heading vocabulary becomes later, losing content is no longer a silent outcome.
  • Guard the workflow: it refuses to run outside the repository's default branch.

State reconciliation

  • Promote [Unreleased] into ## [1.16.0] - 2026-09-03 — 38 entries, four sections — using the fixed script.
  • package.json to 1.16.0, matching what is published.
  • Point every version link reference at this fork. They named the upstream project, which has no such tags, so every version heading in the file linked to a 404. Mechanical and separate from the defect above; called out so it can be reviewed on its own terms.

Why this shipped green

Every fixture in __tests__/prepare-release.test.ts used the single-word Keep-a-Changelog vocabulary (### Added, ### Fixed, ### Security). The repo's CHANGELOG moved to ### New Features / ### Breaking Changes and the tests never followed.

Verification

Seven tests added, using the real vocabulary. Five fail against the previous code — verified by reverting both parts of the fix and re-running, not assumed:

Test Pre-fix
carries every New Features entry into [version] when merging ✗ fails
reproduces the v1.16.0 shape: New Features first, above an empty pre-created block ✗ fails
merges into a matching multi-word heading instead of duplicating it ✗ fails
carries over entries written before any heading rather than dropping them ✗ fails
the published notes carry the New Features section end to end ✗ fails
still merges the single-word headings the older entries use ✓ passes (must-stay-silent)
leaves [Unreleased] empty so the next release cannot republish these entries ✓ passes (must-stay-silent)

The last two pin behaviour that was never broken and must not change.

  • npx tsc --noEmit clean.
  • prepare-release + daemon-release suites: 47 passed, 1 skipped.
  • Workflow YAML parses; the guard is the first step in the job.
  • Promotion output checked by hand: 38 bullets across New Features / Changed / Tests / Fixes, and the extractor reproduces all four sections from the promoted block.

Not covered

The published v1.16.0 release notes are corrected separately through the GitHub API — a release body is not repository content and this PR cannot reach it. The v1.16.0 git tag still points at the pre-reconciliation commit; retagging a published release is destructive and was deliberately not done.

🤖 Generated with Claude Code

https://claude.ai/code/session_011pKFDExqmgtWw916ipMWTR

ardelperal and others added 2 commits September 3, 2026 19:12
…hed notes

The promotion step matched sub-section headings with a `\w+` pattern, so
`### New Features` and `### Breaking Changes` were not recognised. When
such a heading came first in `[Unreleased]`, its entries landed in the
block's leading lines, which the merge path never reads — v1.16.0 shipped
with all 16 of its feature entries silently missing.

Three changes:

- Match heading text verbatim so multi-word headings are recognised.
- Carry over entries that precede the first heading instead of letting
  them fall off the merge loop. Losing content must not be silent,
  whatever the heading vocabulary becomes.
- Refuse to release from a non-default branch. The promote step pushes
  its commit to the triggering branch; dispatched from a temporary
  `release/*` branch, that commit is deleted with the branch, which is
  why main kept a pre-release CHANGELOG and package.json.

Every existing fixture used the single-word Keep-a-Changelog vocabulary
the repo no longer writes, which is why this shipped green. The new tests
use the real vocabulary; five of them fail against the previous code,
including one that reproduces the v1.16.0 input exactly. Two are
must-stay-silent pins: single-word headings still merge, and the
`[Unreleased]` block is still emptied.

Refs #296

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011pKFDExqmgtWw916ipMWTR
v1.16.0 is tagged and on npm, but its release ran from a temporary branch
that was deleted, so the promotion commit never reached main: CHANGELOG.md
still held the release's entries under `[Unreleased]` and package.json was
still at 1.15.0. Left alone, the next release would have republished those
already-shipped entries as duplicates.

- Promote `[Unreleased]` into `## [1.16.0] - 2026-09-03`, all 38 entries
  across all four sections, using the fixed promotion script.
- Bump package.json to 1.16.0 to match the published artifact.
- Point every version link reference at this fork. They named the upstream
  project, which has no such tags, so every version heading in the file
  linked to a 404. Mechanical, and separate from the defect above.

Refs #296

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011pKFDExqmgtWw916ipMWTR
@ardelperal
ardelperal merged commit 10b1aa7 into main Sep 3, 2026
5 checks passed
@ardelperal
ardelperal deleted the fix/issue-296-release-notes branch September 3, 2026 18:33
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.

fix(release): v1.16.0 notes dropped every New Features entry; promotion never reached main

1 participant