Repository navigation
feat(pr-triage): check backport PRs are direct cherry-picks of fixes - #1456
Merged
Merged
Conversation
Projects that maintain release branches by cherry-picking receive backport PRs mostly from bots, which pre-filters F1/F2 drop, so triage never looked at the two questions a release branch depends on: whether the backport is exactly what landed on the default branch, and whether a release branch should take the change at all. A new-feature, deprecation or removal backport slipped through as easily as a fix. Step 0.7 runs only when an adopter sets backport_branches. It compares -U0 patch-ids against the source commit (context lines differ between branches, so full patch-ids flag faithful picks as modified), drops commits already on the base, and under the default fixes-only policy flags source changes that are not fixes for closing. Generated-by: Claude Opus 5
…ment spec Generated-by: Claude Opus 5
2 tasks done
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.
Summary
backport-check.md) runs early, only when the adopter setsbackport_branches. It resolves each commit's source, compares-U0patch-ids (context lines differ between branches, so full patch-ids flag faithful picks as modified), drops commits already on the base, and under the defaultbackport_policy: fixes-onlyflags non-fix source changes for closing. Everything is a proposal; triage still never merges.backport_branchesandbackport_policyto thepr-management-config.mdtemplate.tools/spec-loop/specs/pr-management-family.md(Behaviour & contract, and acceptance criterion 9).Type of change
Test plan
prek run --from-ref origin/mainpassesbackport-checkeval suite (5 cases: direct fix, hand-adapted backport, faithful cherry-pick of a deprecation, already landed, unresolvable source) passes 5/5 withclaude -pThe cases come from a real
v3-3-testbackport sweep on apache/airflow, where 4 of 11 faithful cherry-picks turned out not to be fixes.🤖 Generated with Claude Code