mirror of
https://github.com/Comfy-Org/Comfy-PR.git
synced 2026-11-04 23:37:33 +00:00
[PR #212] [MERGED] Backport checker: don't flag dual-homed commits as needing backport #213
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/Comfy-PR#213
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/212
Author: @claude[bot]
Created: 8/17/2026
Status: ✅ Merged
Merged: 8/23/2026
Merged by: @christian-byrne
Base:
main← Head:backport-checker-dual-homed-commits📝 Commits (3)
e664cecfix: don't flag dual-homed commits as needing backport3469b1fMerge remote-tracking branch 'origin/main' into backport-checker-dual-homed-commits3d677ddfix(test): add MSW handlers for Slack users.info/conversations.info📊 Changes
4 files changed (+167 additions, -8 deletions)
View changed files
📝
app/tasks/gh-frontend-backport-checker/index.spec.ts(+17 -0)📝
app/tasks/gh-frontend-backport-checker/index.ts(+112 -6)📝
src/test/msw-setup.ts(+3 -2)➕
src/test/slack-handlers.ts(+35 -0)📄 Description
Requested via Slack thread
What changed
app/tasks/gh-frontend-backport-checker/index.tsflagged PR #14387 and #15273 as "❗ Might need backport" on the v1.52.0 release report. Christian pointed out these are "dual-homed commits" per ComfyUI_frontend'sdocs/release-process.md#dual-homed-commits: a minor-version bump (x.y.0) freezes the previous minor by branchingcore/<prevMinor>+cloud/<prevMinor>from the commit right before the bump, so every commit merged tomainsince the last release ships in the new version and already sits, byte-for-byte, on those freshly-cut branches. Nothing to backport — the branch cut already did it.I verified this directly against the repo. Both PRs' merge commits are literal ancestors of
core/1.51/cloud/1.51(which share a tip,9a54e1f0):Neither PR carries a
core/1.*/cloud/1.*label (onlysize:*/risk:*), and neither mentions "backport" — that's why they were flagged. The checker's only branch-comparison logic (compareCommits(target, commit)) runs exclusively inside the per-labeled-target-branch loop, gated onbackportStatusRaw === "needed". A PR with no explicit signal never reaches that check at all and defaults straight to "might need backport" — regardless of whether the commit is actually already on a stable branch. Notably,availableBackportTargetBranches(the full list ofcore/1.**/cloud/1.**branches) was already being fetched at the top of the run for exactly this kind of check, but was never passed anywhere — it was only used for a log line.Why not "skip all x.y.0 releases"?
That was the other option on the table, but it's the wrong fix: a minor release can ship a genuinely unbackported fix alongside dual-homed ones (there's no rule that a x.y.0 release only contains freeze-range commits — anything merged in the same window qualifies). Suppressing by release type would silence real cases along with the false positives, with no way to tell them apart from the Slack report.
The fix
Before flagging a bugfix PR with no explicit backport signal, check whether its commit is already an ancestor of any currently-existing
core/1.**/cloud/1.**branch (compareCommits(branch, commit) → "identical"/"behind"). If so, mark itcompletedon that branch instead of leaving it ambiguous.This is a same-SHA ancestry check, not a release-type guess — it works for any release type, and it can't produce a false negative: a cherry-picked backport always gets a brand-new commit SHA, so a genuinely unbackported commit can never satisfy it by coincidence. The only way the same SHA appears on two branches is if one was literally cut from a point in history that already contains it — exactly what a minor-version branch cut does on purpose.
availableBackportTargetBranchesis now threaded through toprocessTask/processBugfixPRso this check has something to run against.Before / After
Before:
might need backportshown for both PRs on the v1.52.0 report, with no way to tell (from Slack) whether that's a real gap or a dual-homed non-issue.After: both PRs resolve to
completedagainstcore/1.51/cloud/1.51and drop out of the "Might need backport" section entirely — same outcome as if someone had manually verified and labeled them. A PR in the same situation but genuinely missing from every existing branch is unaffected and still gets flagged as before.Testing
bun run typecheck(tsgo) — cleanbunx oxlinton both changed files — 0 warnings/errorsbunx oxfmton both changed files — cleanbun test app/tasks/gh-frontend-backport-checker/— 81 pass, 0 fail (3 new tests forisAlreadyOnBranchStatus; the network-callingfindDualHomedBranches/processTaskorchestration isn't unit-tested, matching this file's existing convention of only unit-testing pure helpers)No live Slack/GitHub calls were made by this change.
Generated by Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.