Skip to content

Read the semantic diff's changelog from changes/ fragments - #8881

Merged
cknitt merged 1 commit into
masterfrom
semantic-diff-changelog-fragments
Oct 16, 2026
Merged

cknitt merged 1 commit into
masterfrom
semantic-diff-changelog-fragments

Conversation

@cknitt

@cknitt cknitt commented Oct 16, 2026

Copy link
Copy Markdown
Member

Changelog fragments are the single source of truth for changelog entries. A commit message no longer repeats them: this PR removes the Changelog trailer and the Changelog entry section from the commit record format, and the semantic diff page reads the category and entry text from the changes/<name>.<category>.md fragments in the diff.

Previously, the page only looked at the commit message, so a PR that followed the fragment workflow showed ? in the Changelog column and a "No Changelog trailer" warning, even when it added fragments (see #8879).

Changes

  • .claude/skills/records/SKILL.md: the record format no longer has changelog fields, and says the fragment is the only place for the entry.
  • scripts/commitRecords.js reads each fragment a commit adds or changes from that commit's tree and parses it with parseFragment from scripts/changelog.js. The fragments drive:
    • the category pills and entry on each card
    • the Changelog column of the summary, which shows "No changelog" when the range adds no fragment
    • the changelog draft: the last version of each fragment the range leaves, so a fragment deleted later in the range is left out
    • card checks: a fragment that changelog:check would reject (such as one still carrying the XXXX placeholder link), and an edit to CHANGELOG.md.

Tests

In scripts/commitRecords.test.js, the test records drop the changelog trailers. A new test covers a placeholder fragment that a later commit fixes, a fragment that a later commit deletes, multi-line bullets, and a CHANGELOG.md edit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01S1QKRDTRtNPeF6NB68yuGc

The `changes/<name>.<category>.md` fragment is the single source of truth for
a change's changelog category and entry. Records drop the `Changelog` trailer
and the `Changelog entry` section, and the review page reads the fragments
from the diff: card pills and entries, the summary column, the draft, and
checks for invalid fragments and `CHANGELOG.md` edits.

Area: scripts docs tests
Output: unchanged
Tests: ~scripts/commitRecords.test.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1QKRDTRtNPeF6NB68yuGc
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt
cknitt marked this pull request as ready for review October 16, 2026 15:07
@cknitt
cknitt force-pushed the semantic-diff-changelog-fragments branch from 186aff6 to c6203dc Compare October 16, 2026 15:07
@github-actions

Copy link
Copy Markdown

@cknitt
cknitt requested a review from cristianoc October 16, 2026 15:09
@pkg-pr-new

pkg-pr-new Bot commented Oct 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8881

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@8881

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8881

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8881

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8881

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8881

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8881

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8881

commit: c6203dc

@github-actions

Copy link
Copy Markdown

@cknitt
cknitt merged commit 4e11b25 into master Oct 16, 2026
30 checks passed
@cknitt
cknitt deleted the semantic-diff-changelog-fragments branch October 16, 2026 18:52
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.

2 participants