Repository navigation
feat(changelog): dedupe generated entries against curated lines and repeated subjects - #7
Merged
Merged
Conversation
…epeated subjects Draft entries are normalized (bullet, trailing commit-hash annotation, punctuation, case) into a dedupe key; a commit is skipped when its text already appears as a curated [Unreleased] bullet or repeats an earlier commit's subject (oldest kept, cross-bucket).
Verified against the actual CHANGELOG.md: curated prose is worded nothing like the commit subjects it covers, so normalized-text matching alone still appended semantic duplicates (e.g. the mtime-poll fix next to its own curated write-up). Curated entries now claim covered commits with backtick hashes (`aaa1111`, abbreviated or full); the generator skips claimed commits. dedupeKey also strips GitHub's '(#N)' squash suffix. The current [Unreleased] entries are annotated per the new convention.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds automatic deduplication to the changelog draft generator (
scripts/changelog.ts), verified against this repo's realCHANGELOG.md:… as described. (\aaa1111`)(multi-hash forms like(`aaa1111`, `bbb2222`)work; abbreviated and full hashes prefix-match each other). The generator skips claimed commits. This is the only deterministic way to dedupe real curated prose, which is worded nothing like the commit subjects — confirmed by simulating the script on the current[Unreleased]` section (the mtime-poll fix and the hermetic-tests commits were drafted next to their own hand-written entries).dedupeKey(entry)normalizes for comparison: strips the leading-, trailing commit-hash annotations, GitHub's(#N)squash-merge suffix, trailing punctuation, and case. Generated entries matching a curated line, or repeating an earlier same-subject commit (oldest kept, cross-bucket), are dropped.The current
[Unreleased]entries are annotated with claims per the new convention (visible in the diff of CHANGELOG.md); claims may be trimmed at release review like any generated hash annotation.Verification
Simulated
renderChangelogon the real repo state (version 0.5.1, range v0.5.0..HEAD): before, the draft contained 3 semantic duplicates of the 2 curated entries; after,78134e8/8bdfe06/d0cb49fare skipped and all other commits still draft.Behavior contract (unchanged)
chore: releasecommits still excluded; re-runs still no-op once the section exists; bucket-merge logic untouched.package.jsonversion bump (per repo policy; semver level for the next release: minor, this is a feat).Tests
dedupeKeynormalization (hashes, PR refs, punctuation, case, prefix-only lookalikes kept).%h, unclaimed sibling kept, claims carried verbatim.(#N)suffix does not defeat matching.tsc --noEmitclean.Docs: AGENTS.md changelog-writeup synced (READMEs only link CHANGELOG.md, no change needed).