Skip to content

📝 merge train: duplicate/claim-conflict holds show "needs human decision" while CI is running and flip winners on transient red checks #17439

Closed

Description

@clubanderson

Symptom

#17414 (v5) and #17415 (v6) both showed "needs human decision · Let hive decide" while CI was at 19/64 running and the hive reviewer had not re-reviewed. Within a few minutes the hold flipped: first #17415 was duplicate-of#17414, then after a changelog-bullet push #17414 was duplicate-of#17415, and for a while each pointed at the other. The cross-line false positive is #17436 / #17437; this issue is about the layer underneath.

Why it happens

  • planDuplicateHolds / planClaimConflicts run on every automerge sweep over all open candidates, independent of CI or review state. The winner is "greener, else earlier" (mergeTrainDuplicateBetter), and Green flips the moment one head has a red required check — which during an in-progress CI run is noise, not a verdict.
  • stageTrackerApplyDuplicateHold / stageTrackerApplyClaimConflict (src/pkg/dashboard/stage_tracker_merge_train.go) unconditionally add needs-decision, so the tracker row shows "needs human decision" and the "Let hive decide" button even though the only thing anyone could decide is which of two unfinished heads to keep — and that answer changes with the next check.
  • The recorded merge-train:duplicate-of#N reason persists on the losing PR's stage record until the next sweep rewrites it, so after a flip both PRs can wear each other's number.

Options (decision requested)

A. Defer evaluation: skip the duplicate/claim-conflict pass for any candidate whose required checks are still pending or whose hive review is outstanding; evaluate only once both PRs are at the merge gate. Simplest, matches "the merge gate decides".

B. Keep the hold, drop the pill: evaluate as today, but the tracker adds needs-decision only when both PRs' CI is complete and reviewed; before that the row reads "held · yields to #N while CI runs" with no human call-to-action.

C. Stable winner: once a winner is recorded for an issue, keep it until that PR closes or goes terminally red (not merely "a check is red right now"); no flip on transient CI state.

A + C together seem right to me. Either way, a row should not say "needs human decision" while its own CI is still running and no review has happened.

Expected

A PR with CI running and review pending shows CI running and review pending. Duplicate / claim-conflict holds and their "Let hive decide" affordance appear only when the competing PRs are both ready to merge and genuinely need a pick.

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 9, 2026
  2. hivecommons-hive commented on Nov 9, 2026

    @hivecommons-hive
    Contributor

    🔓 Claim by @Karibhou released (covering PR merged or closed).

    Claim history
    • 2026-11-09 20:56 UTC — claimed by Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-09 23:20 UTC — released by Karibhou (contributor; covering PR merged or closed)
  3. added
    stage/020-claimedClaimed by the scanner or a relay contributor
    and removed
    stage/018-open-for-discussionOpen for discussion: proposal / design issue with no live claim; claimable, no agent work queued
    on Nov 9, 2026
  4. clubanderson commented on Nov 9, 2026

    @clubanderson
    MemberAuthor

    /hive decision

    Decision: A + C.

    • A — defer evaluation. The duplicate and claim-conflict passes consider only candidates that have reached the merge gate: required checks complete and the hive review done. A PR with CI running or a review outstanding is neither a competitor nor a loser; its row keeps showing CI/review state and never wears needs-decision from the merge train.
    • C — stable winner. Once a winner is recorded for an issue (on one base branch, per 🐛 merge train: release-line sibling PRs (v5 + v6, same Fixes #N) are held as duplicates → "needs human decision" #17436), it stays the winner until that PR closes or is terminally refused. A red required check on an in-progress head does not flip it.
    • Not B: a "held · yields to #N while CI runs" caption still implies a verdict that hasn't been reached.

    Order of landing: #17437 (per-base grouping) first, then A + C as one change with a test that a pending-CI sibling pair produces no hold and a transiently red head does not change a recorded winner.

  5. github-actions commented on Nov 9, 2026

    @github-actions
    Contributor

    @clubanderson this issue was closed by @hivecommons-hive[bot] as completed.

    If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.

    If you are still seeing the problem, comment /reopen and it will be reopened for you — you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    approved-directionhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.proposalRFC / design proposal for discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions