You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(source-control): changelog fragment writer duplicates headings and edits other plugins' fragments #7218
The source-control commit skill's scripts/write-changelog-fragments.sh has two defects. Both were seen repeatedly on 2026-10-11 (#7204, #7208, and the #7150 branch).
A duplicate heading on every releasing commit. A second releasing commit on a branch appends another ### Fixed (or ### Added/### Changed) heading to the branch's fragment instead of adding its entry under the existing heading. markdownlint MD024 then fails lint-repo, and someone has to merge the headings by hand.
It writes into other plugins' fragments during a merge. When run during a merge of main, it appended the commit's entry to fragments that the merge had just brought in from other plugins (.changes/harness-ops/fix-7203-..., .changes/source-control/feat-check-affected-push-hook-... on fix(work-items): filter list reads in the provider and order work by created_at #7208). The entries had to be removed by hand.
Fix
Add each entry under the matching existing heading, creating the heading only when it is absent, and raise the bump level only upward.
Only touch fragments this branch created: ones not present on the merge base. Write nothing during an in-progress merge.
Thanks for the detailed report. As I understand it, scripts/write-changelog-fragments.sh in the source-control commit skill has two bugs on repeated-commit/merge scenarios:
A second releasing commit on the same branch adds a duplicate ### Fixed/### Added/### Changed heading instead of appending under the existing one, which trips markdownlint MD024 in lint-repo.
When run during a main merge, it also appends entries to fragments the merge brought in from other plugins, rather than only the fragments this branch itself created.
You've cited concrete evidence (#7204, #7208, and the #7150 branch) and proposed a fix: append under the existing heading (creating it only if absent, and only raising the bump level upward), and scope writes to fragments not present on the merge base, skipping writes during an in-progress merge, with a test for each case. Nothing else looks missing from the report.
I didn't find an existing open issue describing the same defects.
Owner batch-ratified this admission in an attended session on 2026-10-12: work-class: scoped. Rule: class C1-C3, no trust surface, the independent check confirmed the recorded decision, and no owner step remains.
Type: Bug Summary: Make the changelog fragment writer reuse existing headings and touch only this branch's fragments.
Current behavior:
A second releasing commit on a branch appends another ### Fixed (or Added/Changed) heading to the branch's fragment, which fails markdownlint MD024. Run during a merge of main, the writer appends entries to fragments the merge brought in from other branches and plugins.
Desired behavior:
Each entry goes under the matching existing heading in the branch's fragment, and the heading is created only when absent. The bump level only rises. The writer touches only fragments absent from the merge base, and writes nothing while a merge is in progress.
Key interfaces:
The fragment writer's heading merge and its fragment selection.
Acceptance criteria:
A test with two releasing commits of the same type finds one heading holding both entries.
A test finds the bump level unchanged when a lower-level commit follows a higher one.
A test with a fragment present on the merge base finds that fragment unchanged.
A test with a merge in progress finds no fragment written.
scripts/run-test-file.sh passes on the writer's test file.
scripts/check-changelog-fragments.sh passes.
Out of scope:
The fragment format and the release tooling that consumes fragments.
The commit skill's text, unless it states the old behavior.
This was generated by AI during backlog shaping. The owner approved this in an attended backlog-shaping session on 2026-10-17.
The work-resolve-issue run that agent-ready started failed before it reported, or the token broker refused it because its workflow files differ from main's. work-unblock removed and added agent-ready back to start a fresh run on main's workflow files. It does this once per version of those files, so if this run fails the same way, a person looks at it.
Activity
github-actions commentedon Oct 11, 2026
Thanks for the detailed report. As I understand it,
scripts/write-changelog-fragments.shin the source-control commit skill has two bugs on repeated-commit/merge scenarios:### Fixed/### Added/### Changedheading instead of appending under the existing one, which trips markdownlint MD024 inlint-repo.mainmerge, it also appends entries to fragments the merge brought in from other plugins, rather than only the fragments this branch itself created.You've cited concrete evidence (#7204, #7208, and the #7150 branch) and proposed a fix: append under the existing heading (creating it only if absent, and only raising the bump level upward), and scope writes to fragments not present on the merge base, skipping writes during an in-progress merge, with a test for each case. Nothing else looks missing from the report.
I didn't find an existing open issue describing the same defects.
Automated triage. A maintainer reviews it.
kyle-sexton commentedon Oct 13, 2026
Owner batch-ratified this admission in an attended session on 2026-10-12: work-class: scoped. Rule: class C1-C3, no trust surface, the independent check confirmed the recorded decision, and no owner step remains.
kyle-sexton commentedon Oct 18, 2026
Agent Brief
Type: Bug
Summary: Make the changelog fragment writer reuse existing headings and touch only this branch's fragments.
Current behavior:
A second releasing commit on a branch appends another
### Fixed(or Added/Changed) heading to the branch's fragment, which fails markdownlint MD024. Run during a merge of main, the writer appends entries to fragments the merge brought in from other branches and plugins.Desired behavior:
Each entry goes under the matching existing heading in the branch's fragment, and the heading is created only when absent. The bump level only rises. The writer touches only fragments absent from the merge base, and writes nothing while a merge is in progress.
Key interfaces:
Acceptance criteria:
scripts/run-test-file.shpasses on the writer's test file.scripts/check-changelog-fragments.shpasses.Out of scope:
This was generated by AI during backlog shaping. The owner approved this in an attended backlog-shaping session on 2026-10-17.
melodic-automation-lanes commentedon Oct 18, 2026
The work-resolve-issue run that
agent-readystarted failed before it reported, or the token broker refused it because its workflow files differ from main's. work-unblock removed and addedagent-readyback to start a fresh run on main's workflow files. It does this once per version of those files, so if this run fails the same way, a person looks at it.