Skip to content

Fix release-note extraction, add PR validation and preview#129

Merged
SamGalanakis merged 1 commit into
mainfrom
samuel-release-notes
Jul 25, 2026
Merged

Fix release-note extraction, add PR validation and preview#129
SamGalanakis merged 1 commit into
mainfrom
samuel-release-notes

Conversation

@SamGalanakis

Copy link
Copy Markdown
Collaborator

v0.1.0-alpha.112 published a mangled release body — raw squash-merge commit subjects, internal implementation prose and literal Release-Notes: markers leaked into the public notes, and the most important entry in the release (a PostgreSQL claim-fence durability fix) got no note at all. It had to be hand-rewritten after publish.

Root cause (scripts/release_notes.py::extract_note): it returned on the first Release-Notes: marker — silently dropping every later trailer in the same body — and took everything to end of body, swallowing all subsequent content. Both bugs are invisible for single-commit PRs and fire on every squash merge, which is how 100% of work lands here. It failed silently and produced plausible-looking garbage.

Changes

  1. Parserextract_notes() collects every marker in a body and terminates each note at a squash subject bullet (^\*\s), the next marker, or end of body. Notes are grouped under ## Breaking / Added / Fixed / Changed / Internal, with uncategorized history preserved under ## Other (never dropped). Legacy Fixed - / Changed - forms still recognized.
  2. PR validation — a check-pr mode in the existing lint job (no new required check): a PR touching crates/ must produce at least one well-formed, categorized note. Tooling/docs-only PRs are exempt but any note present must still be well-formed.
  3. PR preview — the assembled notes render into $GITHUB_STEP_SUMMARY, so a reviewer sees the exact published text before merge instead of discovering it post-publish.

Verification

Replayed the real v0.1.0-alpha.111..v0.1.0-alpha.112 range: the old collector leaked ~40 lines of commit subjects and prose and emitted 4 notes; the fixed one emits all 7 authored notes, grouped and clean. New regression tests fail against the old parser. Existing release.yml contract (collect --require, collect --end --out) unchanged.

Follow-ups deliberately out of scope: requiring a migration line on Breaking: notes, and a dry-run assembly gate in the release workflow.

Collect every bounded note from squash-merge bodies, group notes by category, and validate categorized PR notes in the existing lint job with an exact step-summary preview.

Release-Notes: Internal: Release tooling now bounds squash-merge notes, previews grouped output, and validates categorized entries before merge.
@SamGalanakis
SamGalanakis force-pushed the samuel-release-notes branch from 3e497ca to 683d5d9 Compare July 25, 2026 10:54
@SamGalanakis
SamGalanakis merged commit a0a70e2 into main Jul 25, 2026
20 checks passed
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.

1 participant