Write a backported change up with the pull request it came from - #3079
Merged
Conversation
soutaro
force-pushed
the
claude/release-doc-backport-format-dh5jwk
branch
4 times, most recently
from
August 10, 2026 12:18
a27876b to
1abf0bc
Compare
soutaro
force-pushed
the
claude/release-doc-backport-format-dh5jwk
branch
from
August 12, 2026 16:15
1abf0bc to
4e3b9bc
Compare
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
force-pushed
the
claude/release-doc-backport-format-dh5jwk
branch
from
August 12, 2026 16:18
4e3b9bc to
cbb16d0
Compare
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.
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:changelogprints that form now, from the-xtrailer 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
-xtrailer 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.mdpoints 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 needschangelog.ymlon it.