chore(dedup): extend CC-bullet dedup to handle fix(#NNN): scope-as-issue-ref shape #293

Closed
opened 2026-07-02 17:20:53 +02:00 by quartermaster · 0 comments

Scope

scripts/lib/changelog.sh::changelog_dedup_cc_by_fragment_refs dedups CC-derived bullets against fragment filenames by keying on (#NNN) trailer format. This misses commits that put the issue ref in the CC scope instead of a trailer:

fix(#282): drop toolkit-self dogfood wrapper (Surveyor 96d8d385 REQUEST_CHANGES)

produces bullet:

- **#282**: drop toolkit-self dogfood wrapper (Surveyor 96d8d385 REQUEST_CHANGES)

The dedup looks for substring (#282) in the bullet; the scope-as-issue-ref shape only has **#282**: (bold, no parens). No match → no dedup → the CC bullet appears alongside any fragment for the same issue.

Empirical anchor

release-toolkit v0.21.0 Cold Read (release-toolkit#287) surfaced two opaque reviewer-code Fixed bullets that leaked from fix(#282): ... and fix(cut): ... commit subjects on main between v0.20.0 and v0.21.0. Fix pass (c5c610a) worked around by hand-editing CHANGELOG.md's v0.21.0 section + PATCH'ing the PR body. The workaround is durable for v0.21.0; the substrate-side fix is this tracker.

Plan

Extend the dedup awk in scripts/lib/changelog.sh::changelog_dedup_cc_by_fragment_refs:

  1. Build BOTH ref sets: (#NNN) (trailer format) AND **#NNN** (bolded scope format)
  2. Check for either substring in each candidate bullet
  3. Suppress if either matches

Tests: extend tests/changelog.bats with mutation-verify for the scope-as-issue-ref shape (baseline pass + fixture with fix(#282): foo commit + 282.fixed.md fragment → CC bullet suppressed).

Refs

## Scope `scripts/lib/changelog.sh::changelog_dedup_cc_by_fragment_refs` dedups CC-derived bullets against fragment filenames by keying on `(#NNN)` trailer format. This misses commits that put the issue ref in the CC **scope** instead of a trailer: ``` fix(#282): drop toolkit-self dogfood wrapper (Surveyor 96d8d385 REQUEST_CHANGES) ``` produces bullet: ``` - **#282**: drop toolkit-self dogfood wrapper (Surveyor 96d8d385 REQUEST_CHANGES) ``` The dedup looks for substring `(#282)` in the bullet; the scope-as-issue-ref shape only has `**#282**:` (bold, no parens). No match → no dedup → the CC bullet appears alongside any fragment for the same issue. ## Empirical anchor release-toolkit v0.21.0 Cold Read ([release-toolkit#287](https://git.frankenbit.de/frankenbit/release-toolkit/pulls/287)) surfaced two opaque reviewer-code Fixed bullets that leaked from `fix(#282): ...` and `fix(cut): ...` commit subjects on main between v0.20.0 and v0.21.0. Fix pass (`c5c610a`) worked around by hand-editing `CHANGELOG.md`'s v0.21.0 section + PATCH'ing the PR body. The workaround is durable for v0.21.0; the substrate-side fix is this tracker. ## Plan Extend the dedup awk in `scripts/lib/changelog.sh::changelog_dedup_cc_by_fragment_refs`: 1. Build BOTH ref sets: `(#NNN)` (trailer format) AND `**#NNN**` (bolded scope format) 2. Check for either substring in each candidate bullet 3. Suppress if either matches Tests: extend `tests/changelog.bats` with mutation-verify for the scope-as-issue-ref shape (baseline pass + fixture with `fix(#282): foo` commit + `282.fixed.md` fragment → CC bullet suppressed). ## Refs - Empirical anchor: [release-toolkit#287](https://git.frankenbit.de/frankenbit/release-toolkit/pulls/287) Pilot Cold Read + fix-pass `c5c610a` - Related: [release-toolkit#258](https://git.frankenbit.de/frankenbit/release-toolkit/issues/258) (fragment-ref dedup mechanism origin) - Milestone: Set F candidate (post-v0.21.0-cut)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
frankenbit/release-toolkit#293
No description provided.