Skip to content

Activity Monitor draws a merge train over PRs still at CI / Review (#15637 / #15633) #15653

Closed

Description

@clubanderson

What the page showed

hive's own spoke (roll 9 = v5), 2026-10-29 ~20:00 EDT, issue #15563's row: child #15633 (hive's adopted copy of #15566, chevron CI / Review) and, below the row, a train header:

⛁ merge train · 2 PRs · 1st: #15637 — overlapping: sidebar.html, index.html

#15637 (Twitch community links) was itself at CI / Review. Neither PR was at 080 (merge queue). Maintainer: "why is this in the merge train?"

Why

The automerge planner (planMergeTrains) groups every PR that passes the lane's cheap prefilter — open, no blocking label, not under repair — by overlapping changed files, before CI or the review verdict has run. #15633 and #15637 both touch sidebar.html / index.html on v5, so the planner ordered them (#15637 front, #15633 merge-train:queued-behind#15637:2/2). The tracker then seated both: stageTrackerMergeTrainPostPass dropped only PRs under repair (070/071/072/085, red checks — #15405/#15616) and kept 050/060 members as provisional slots (#15581, "CI / Review · queued 2nd once ready"), still drawing the rail, the ordinal and the "merge train · 2 PRs · 1st:" header. v5 HEAD after #15616 still produces this grouping (unit test with these two records fails on HEAD).

Being adopted is not the cause: #15633 inherited nothing from #15566; it simply shares files with #15637.

Expected

The merge train is a merge-queue concept: only PRs at ≥080 (green, approved, soaking, merging) ride one, and the header counts only them. A PR still at CI / Review that overlaps another open PR should show a lightweight hint on its row — overlaps #15637 (sidebar.html, index.html) — will queue behind it — with no rail, no ordinal, no "1st:" header.

Fix

  • stageTrackerBelowMergeQueue: any planner-ordered PR below 080 leaves the train in the view; the members that do ride close ranks; a train of one 080 member is no train.
  • Such a row carries overlap: {behind, with, files, note} instead of merge_train; the SPA draws one muted overlaps #N badge with the note as hover (and the hover line Not in the merge queue yet: …).
  • The front's gate/caption say the size of the train that rides, not the planner's.
  • merge_train.provisional and "merges first once it is ready" are gone (nothing below 080 is seated).

Not changed here: the planner still orders CI-pending PRs with ready ones, so a ready 080 PR can wait behind a CI-pending front on the lane side; that is a separate automerge question.

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 30, 2026
  2. added 2 commits that reference this issue on Oct 30, 2026
    a796fef
    1293fa2
  3. added a commit that references this issue on Oct 30, 2026
    03483af
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

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions