Skip to content

Write a backported change up with the pull request it came from - #3079

Merged
soutaro merged 1 commit into
masterfrom
claude/release-doc-backport-format-dh5jwk
Aug 13, 2026
Merged

Write a backported change up with the pull request it came from#3079
soutaro merged 1 commit into
masterfrom
claude/release-doc-backport-format-dh5jwk

Conversation

@soutaro

@soutaro soutaro commented Aug 10, 2026

Copy link
Copy Markdown
Member

A backported entry names both the pull request the change came from and the one that carried it onto the line, as 3.5.2's did. gem:changelog prints that form now, from the -x trailer it already resolves.

Verified by dispatching #3086 on the 4.1.3 cycle, which also turned up a second bug: a backport's merge commit has no -x trailer to resolve, so #3076 was listed as a change of its own beside the entry it annotates. Backports that annotate something are dropped from the list now, and the run then matches what 4.1.3 shipped.

docs/release.md points at that workflow instead of describing how to assemble the changelog by hand, so the traps of doing it by hand go with it. What replaces them: the ref picks the copy of the task as well as the history, so a release branch needs changelog.yml on it.

@soutaro soutaro added the skip-changelog Skip PRs in CHANGELOGs label Aug 10, 2026 — with Claude
@soutaro
soutaro force-pushed the claude/release-doc-backport-format-dh5jwk branch 4 times, most recently from a27876b to 1abf0bc Compare August 10, 2026 12:18
@soutaro soutaro changed the title Say how a backported change is written up in the changelog Write a backported change up with the pull request it came from Aug 10, 2026
@soutaro
soutaro force-pushed the claude/release-doc-backport-format-dh5jwk branch from 1abf0bc to 4e3b9bc Compare August 12, 2026 16:15
soutaro pushed a commit that referenced this pull request Aug 12, 2026
Not for merge. Puts changelog.yml and the gem:changelog change of #3079
on top of aaa-4.1.x, so the workflow can be dispatched on a ref whose
recent history is cherry-picks and checked against what 4.1.3 shipped.
The Backports section explains what `-x` buys — that the changelog
reaches the pull request the change was written and reviewed in — but
not what the entry ends up looking like, so the annotation naming the
backport was rediscovered while preparing 4.1.3, and got it wrong first.

`gem:changelog` now prints the form rather than leaving it to be
remembered. It already had both halves: `changelog_origins` resolves the
`-x` trailer to where the change was written, and the `fallbacks` path
already looked the cherry-pick's own pull request up, calling it in
passing "at least the backport that brought it here". Both ends are now
asked for together — one query rather than two, since the second was
only ever a retry — and the cherry-pick's becomes the entry's second
link instead of being discarded.

A backport also stops appearing beside the entries it carried. Its merge
commit is in the history too and has no `-x` trailer to resolve, so it
read as an ordinary commit of its own pull request: dispatching this on
the 4.1.3 cycle listed #3076 as a change of its own, above the entry it
annotates. A backport is how a change arrived rather than a change, so
the ones that annotate something are dropped from the list.

On the development line there are no origins, so entries keep the single
link they have today. A backport carrying several changes at once falls
out of the same handling: each entry names its own origin and shares the
one backport link, which is what 4.0.3 should have looked like.

docs/release.md loses the procedure it carried for assembling the
changelog by hand, which existed because the task could not run from a
Claude Code on the web session. `changelog.yml` runs it on a runner now,
so the section says to dispatch that instead — and the traps it
documented, all of them about hand-rolling the match, go with it. What
replaces them is the one thing the workflow adds: the ref picks the copy
of the task as well as the history, so a release branch needs the file
on it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QAgPhpLrU9Z4bENCR9RUub
@soutaro
soutaro force-pushed the claude/release-doc-backport-format-dh5jwk branch from 4e3b9bc to cbb16d0 Compare August 12, 2026 16:18
@soutaro
soutaro added this pull request to the merge queue Aug 13, 2026
Merged via the queue into master with commit 91601f1 Aug 13, 2026
25 checks passed
@soutaro
soutaro deleted the claude/release-doc-backport-format-dh5jwk branch August 13, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skip PRs in CHANGELOGs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants