Skip to content

Flag stale CI on Ready for review and require a fresh-Base green run before Self-merge #2316

Closed

Description

@JacobStephens2

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Flag a PR whose green CI ran against an outdated Base branch on the Console's Ready for review, and make Self-merge require CI on a head that contains the current Base.

Current behavior:

  • GitHub::merge (src/github.rs) runs gh pr merge --merge --match-head-commit <head> without checking whether the PR's head contains the current Base.
  • Ready for review shows a PR as ready whatever its age against Base.

On Educational-Travel-Adventures/tourbot, which has no merge queue and no required checks, PRs were merged by hand from GitHub in bursts while 10 to 49 merges behind master. master went red five times in about 36 hours, and each time thirdshift filed a base-fix (#2795, #2803, #2808, #2884's base, #2900). See Educational-Travel-Adventures/tourbot for the tourbot side: a merge-queue issue was filed alongside this one. Those merges weren't Self-merges, but the Day shift reviews them from Ready for review, which gives no hint that a green result is stale.

Desired behavior:

  • Ready for review flags a stale result. A row whose PR head doesn't contain the current Base tip shows "N merges behind : CI result predates them", or similar. N counts first-parent commits on Base since the merge-base.
  • Self-merge waits for a fresh result. Before merging, if the head is behind Base, thirdshift brings Base in, or relies on an existing merge-base-fix path, and waits for green CI on the new head before merging. A Base with a merge queue can skip this, since the queue already tests the combination.

Key interfaces:

  • GitHub::merge in src/github.rs, and the Delivery code that calls it.
  • The Console's Ready for review rows (src/console/).
  • The existing merge-base-fix behaviour on Fix runs, which may already hold the Base-merge step.

Acceptance criteria:

  • A test where the PR head is behind Base shows the stale note on Ready for review, and no note when it's current.
  • A Self-merge with a head behind Base doesn't merge until green CI on a head that contains the current Base.
  • Repos with a merge queue on Base keep their current behaviour.

Activity

  1. added
    enhancement
    ready-for-agent
    on Nov 19, 2026
  2. JacobStephens2 commented on Nov 19, 2026

    @JacobStephens2
    OwnerAuthor
  3. added
    in-progress
    and removed
    ready-for-agent
    in-progress
    on Nov 19, 2026
  4. removed
    in-progress
    on Nov 19, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions