Repository navigation
Description
This was generated by AI during triage.
From the 2026-11-11 fleet retrospective across thirdshift 0.27.2–0.29.0.
Agent Brief
Category: bug
Summary: A Review run treats any advance of the target Base branch (main / master) on GitHub as "pull request changed during Review run", aborting in-flight reviews and stranding their committed fixes whenever an unrelated pull request merges.
Current behavior:
GitHub::review_pull_request populates ReviewPullRequest.base_head from GitHub's base.sha field, which is the live tip commit of the target Base branch (main / master) at the moment of the API query rather than the pull request's merge-base. During and after the Review session, compatible asserts current.base_head == snapshot.base_head && current.base == snapshot.base && current.branch == snapshot.branch.
On an active repository where unrelated pull requests merge every 15–30 minutes, current.base_head advances during a 25–40 minute Review run even when current.head, current.branch, and current.base are completely unchanged. compatible then fails with pull request changed during Review run, aborting Delivery (or recommend-only posting) and stranding any committed review fixes in a retained Review worktree.
Desired behavior:
Advancing base_head (base.sha on the target Base branch) while a Review run is in flight does not cause compatible or unchanged to fail as long as:
- the pull request remains open and reviewable,
current.base == snapshot.base(the target branch name has not been retargeted),current.branch == snapshot.branch(the head branch ref has not changed), and- for
unchanged/ pre-push head safety,current.head == snapshot.head.
ReviewDelivery continues to use snapshot.base_head (captured at acquisition) for its merge-base / diff scope and continues to enforce mergeability (require_mergeable) before pushing or Self-merging, so a true merge conflict introduced by an advancing Base branch is still caught cleanly as a merge conflict rather than misreported as "pull request changed during Review run".
Key interfaces:
ReviewPullRequestandcompatible/unchangedin the Review process: keep target-branch-name (base), head-branch-name (branch), and pull-request-head (head) guards, while removing the requirement that the live Base branch tip (base_head) stay frozen for the duration of the Review run.ReviewDelivery: keepsnapshot.base_headfor localmerge-basecalculation and keep mergeability checks intact.
Acceptance criteria:
- When
base.shaon the target Base branch advances on GitHub during aReview runwhilehead.sha,head.ref, andbase.refremain unchanged and the pull request remains mergeable, theReview runcompletes normally (pushes fixes and posts its review comment, or posts its recommend-only comment). - When the pull request's own
head.shachanges, itsbase.refis retargeted to a different branch name, or the pull request closes/merges mid-run, theReview runstill refuses to publish as before. - When an advancing Base branch introduces a merge conflict on the pull request,
ReviewDelivery's mergeability check catches and reports the conflict without pushing onto a conflicted pull request. - Integration tests exercise advancing
base.shaduring aReview runthrough the CLI against the fakegh.
Out of scope:
- Preventing a
Review Passfrom taking a pull request while a live Ticket run or Spec run is still delivering (A Review Pass takes a pull request that a live Ticket run or Spec run is still delivering #2037). - Recovering or publishing fixes already stranded by a moved pull request head (Review run: a pull request that changes mid-run strands its fixes in a retained worktree and is never reviewed again #1961).
Activity
JacobStephens2 commentedon Nov 11, 2026
This comment was generated by AI.
thirdshift's Run on this issue failed, so it waits for the Day shift.
issue-2044on origin, with pull request Let Review runs survive Base branch advances #2055Put
ready-for-agentback to retry.