Skip to content

🐛 merge train seats PRs whose current head is not green or reviewed and keeps a regressed front #15825

Closed

Description

@clubanderson

Live evidence (hive's own spoke, v5 db43b1a, 2026-10-30 12:07–12:15 ET)

Merge train log:

"merge train" lane=contributor-lane base=v5 front=15748 order=[15748,15804,15812] size=3

Stage tracker at the same moment:

At 12:15 the train showed 4 members: #15757 front (rebase force-pushed 12:13, CI re-running), #15804, #15812 (opened ~11:55) and #15816 (opened ~12:10). The last two cannot have green CI yet and verdicts for their heads are not recorded.

Root cause

  • planMergeTrains seats every candidate that passes the prefilter; readiness (🐛 merge train: ready PRs lead; odometer rolls only after the bee lands #15763) only orders members (ready → unknown → unready). Unknown/unready PRs still take positions and can be front.
  • mergeTrainHeadReadiness falls back to the stage store's Stage >= 080, keyed by PR not head SHA, so a pushed PR keeps reading "ready" for its new head.
  • ClassifyStage maps any merge-train:* reason to 080 unconditionally, so a parked sibling renders in the Merge queue column regardless of its CI / verdict state.

Rule

items that have not passed the review or CI is not green should not be (a) ready for merge, (b) in a merge train.

They should not be in the merge queue column.

Required behaviour

  1. A merge train only contains PRs that are currently ready: CI green on the current head, all required perspective verdicts recorded for the current head, mergeable, not conflicting, not held. Anything else is a candidate (overlap info may be kept) with no position and never front.
  2. If a member regresses (head moved, CI pending/red, verdict owed, conflicting) it is ejected on the next evaluation; the next ready member becomes front. One INFO line merge train: member ejected pr=N why=head-moved|ci-pending|verdict-owed|conflicting. The ejected PR re-enters at the back when ready again.
  3. Stage 080 (Ready to merge / Merge queued) is only reachable with CI green + verdicts complete for the current head; otherwise the row stays in the CI / Review column with a caption saying what is owed, and the gray pill carries the lineage ("left merge train · pushed 3m ago").
  4. Ordering among ready members: readiness ordering from 🐛 merge train: ready PRs lead; odometer rolls only after the bee lands #15763, then age.

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 30, 2026
  2. added a commit that references this issue on Oct 30, 2026
    7e46492
  3. hivecommons-hive commented on Oct 30, 2026

    @hivecommons-hive
    Contributor

    🔒 Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  4. added 7 commits that reference this issue on Oct 30, 2026
    bdb96f6
    3a6f966
    f016cc0
    e2c36fd
    8abd4a2
    0c94879
    a53ed75
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions