Skip to content

Decide what Self-merge does when the Base branch moves after CI went green #907

Open

Description

@JacobStephens2

This was generated by AI during triage.

A Self-merging Run on a busy main discards green CI every time main moves while CI runs, and fails after 5 such moves. Whether that should change is a policy decision for the Day shift, because ADR 0004 makes "merge only a head thirdshift watched pass" the reason Self-merge is done by thirdshift and not GitHub auto-merge.

Evidence

Run #878 on thirdshift.app ("notice emails don't contain any info in the subject that is not also in the body"), goal Self-merge into main, 2026-10-20 (EDT), from its Command log:

Time Event
08:41 Pickup run started
10:29 CI red on 9da5d5b; Repair 1 of 5
12:56 origin/main moved while CI ran; merging it again (new head df53613)
13:59 origin/main moved while CI ran; merging it again (bf3010d)
15:06 origin/main moved while CI ran; merging it again (ee9b57c)

Each round took roughly an hour, most of it waiting for macOS runners. By 15:06 the Run had used 3 of its 5 upstream moves. Two Self-merging Runs on different machines also restart each other: each one's merge moves main for the other.

Options

  1. Keep the rule; stop charging clean re-merges to the budget. Safest, still slow: every move costs a full CI round, but a busy day no longer fails the Run.
  2. Self-merge the green head when GitHub reports it mergeable. Fastest. gh pr merge --match-head-commit <green head> still merges exactly the code that passed; the push-to-main CI catches a semantic break between the two changes, which is then fixed forward. Needs an amendment to ADR 0004.
  3. Re-merge only when the incoming Base changes touch files the PR also changes. A middle ground; heuristic, and a semantic conflict can still hide in untouched files.
  4. Cap the re-merges by time instead of count, e.g. accept a green head whose merge base is less than N hours old.

Related

Activity

  1. added
    enhancement
    needs-triage
    on Oct 20, 2026
  2. added
    ready-for-human
    and removed
    needs-triage
    on Nov 9, 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

    enhancementready-for-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions