You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A ready-for-review Delivery re-runs full CI every time the Base branch moves, even when CI is green #906
When a pull request will only be left ready for review, Delivery still throws away green CI whenever the Base branch moved while CI ran. It merges the Base branch in again, pushes, and watches a full CI run on the new head. On a busy main that costs about an hour per round in today's macOS queue, and after 5 such moves the Delivery fails with "origin/main kept moving: merged it again 5 times", even though no one was going to merge the PR without the Day shift.
Evidence
Spec run #776 on stephens, delivering Spec PR #842 with the goal of leaving it ready for review, 2026-10-20 (UTC):
16:18: CI started on b34d144, the Repair's merge of main. All checks passed by 17:16 after macOS queueing.
17:52: origin/main moved while CI ran; merging it again. main had taken Research faster macOS CI without dropping macOS support #902 at 17:41. New head b5909e8, a full CI run again, including four macOS shards that queued for up to 65 minutes.
The green result on b34d144 would have left #842 ready for review about two hours earlier. The PR merged cleanly into main throughout.
Where
RepairLoop::rounds in Delivery's Repair loop: on Ci::Absent | Ci::Passed it checks base_branch_moved() first and goes round again with count_base_move("while CI ran"). The early return for Goal::ReadyForReview is only reached when the Base branch did not move.
Category: bug Summary: With the goal of leaving the pull request ready for review, green CI on a mergeable head ends Delivery's Repair loop, even if the Base branch moved while CI ran
Current behavior:
In Delivery's Repair loop, when CI on the pushed head is green or absent, the loop first asks whether the Base branch moved while CI ran. If it did, it counts an upstream move, merges the Base branch in again, pushes and watches CI on the new head, whatever the goal. Only when the Base branch did not move does a ready-for-review Delivery return. A ready-for-review Delivery on a busy Base branch can spend hours re-running full CI and then fail on the upstream-move budget (5).
Desired behavior:
For Goal::ReadyForReview (a Spec PR left for review, a Run that does not Self-merge): green or absent CI on the head ends the rounds, whether or not the Base branch moved while CI ran, provided the pull request is mergeable with the Base branch as GitHub reports it. The existing readiness and mergeability check after the rounds stays.
If GitHub reports the PR not mergeable (a conflict with the moved Base branch), behave as today: merge the Base branch in, start a conflict Repair if needed, and go round again, counting the upstream move.
A Base move that is not acted on is not counted against the upstream-move budget, and the Command log says so in one line, e.g. origin/main moved while CI ran; leaving the PR for review on <short head>, which merges cleanly.
Goal::Merged (Self-merge) is unchanged by this issue.
The glossary entry for the Repair loop and the comments on the loop and on the upstream-move budget say which goal goes round again on a Base move and which does not.
Key interfaces:
RepairLoop::rounds and its Ci::Absent | Ci::Passed arm.
The Outside seam's base_branch_moved() and whatever it uses to read the PR's mergeability (the post-rounds readiness check already reads it).
Budgets::count_base_move and MAX_UPSTREAM_MOVES.
Acceptance criteria:
An in-process Repair loop test: goal ready-for-review, CI green, Base branch moved while CI ran, PR mergeable. The loop returns that head, with no further merge, push or watch and no upstream move counted.
Same, but the PR is not mergeable: the loop merges the Base branch again and continues as today.
Goal merged, CI green, Base branch moved: behaviour unchanged (existing tests still pass).
The new Command log line appears in the first case.
Activity
JacobStephens2 commentedon Oct 20, 2026
Agent Brief
Category: bug
Summary: With the goal of leaving the pull request ready for review, green CI on a mergeable head ends Delivery's Repair loop, even if the Base branch moved while CI ran
Current behavior:
In Delivery's Repair loop, when CI on the pushed head is green or absent, the loop first asks whether the Base branch moved while CI ran. If it did, it counts an upstream move, merges the Base branch in again, pushes and watches CI on the new head, whatever the goal. Only when the Base branch did not move does a ready-for-review Delivery return. A ready-for-review Delivery on a busy Base branch can spend hours re-running full CI and then fail on the upstream-move budget (5).
Desired behavior:
Goal::ReadyForReview(a Spec PR left for review, a Run that does not Self-merge): green or absent CI on the head ends the rounds, whether or not the Base branch moved while CI ran, provided the pull request is mergeable with the Base branch as GitHub reports it. The existing readiness and mergeability check after the rounds stays.origin/main moved while CI ran; leaving the PR for review on <short head>, which merges cleanly.Goal::Merged(Self-merge) is unchanged by this issue.Key interfaces:
RepairLoop::roundsand itsCi::Absent | Ci::Passedarm.Outsideseam'sbase_branch_moved()and whatever it uses to read the PR's mergeability (the post-rounds readiness check already reads it).Budgets::count_base_moveandMAX_UPSTREAM_MOVES.Acceptance criteria:
cargo test,cargo clippy --all-targets -- -D warningsandcargo fmt --checkpass.Out of scope: