Skip to content

feat(pr-triage): check backport PRs are direct cherry-picks of fixes - #1456

Merged
potiuk merged 2 commits into
apache:mainfrom
potiuk:pr-triage-backport-check
Sep 28, 2026
Merged

potiuk merged 2 commits into
apache:mainfrom
potiuk:pr-triage-backport-check

Conversation

@potiuk

@potiuk potiuk commented Sep 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Projects that maintain release branches by cherry-picking get backport PRs mostly from bots, which pre-filters F1/F2 drop. So triage never checked whether a backport is exactly what landed on the default branch, or whether a release branch should take it at all. A feature, deprecation or removal slipped through as easily as a fix.
  • New Step 0.7 — backport check (backport-check.md) runs early, only when the adopter sets backport_branches. It resolves each commit's source, compares -U0 patch-ids (context lines differ between branches, so full patch-ids flag faithful picks as modified), drops commits already on the base, and under the default backport_policy: fixes-only flags non-fix source changes for closing. Everything is a proposal; triage still never merges.
  • Adds backport_branches and backport_policy to the pr-management-config.md template.
  • Records the new behaviour in tools/spec-loop/specs/pr-management-family.md (Behaviour & contract, and acceptance criterion 9).

Type of change

  • Skill change — eval fixtures updated below

Test plan

  • prek run --from-ref origin/main passes
  • New backport-check eval suite (5 cases: direct fix, hand-adapted backport, faithful cherry-pick of a deprecation, already landed, unresolvable source) passes 5/5 with claude -p
  • For skill behaviour changes: a new eval fixture is included in this PR

The cases come from a real v3-3-test backport sweep on apache/airflow, where 4 of 11 faithful cherry-picks turned out not to be fixes.

🤖 Generated with Claude Code

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
@potiuk
potiuk merged commit cc5e488 into apache:main Sep 28, 2026
10 checks passed
@potiuk potiuk mentioned this pull request Oct 3, 2026
2 tasks done
@potiuk potiuk added capability:triage Sweep + classify + propose disposition family:docs Docs, MISSION.md, READMEs family:pr-management pr-management-* skills family:setup setup-* skills family:tools tools/* substrate:framework-dev Tool substrate: build / validate / eval the framework itself labels Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:triage Sweep + classify + propose disposition family:docs Docs, MISSION.md, READMEs family:pr-management pr-management-* skills family:setup setup-* skills family:tools tools/* substrate:framework-dev Tool substrate: build / validate / eval the framework itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant