Expand description
Rebasing the winning branch onto a moved base, with a fixer for conflicts.
Both graph::Runner::sync_to_base (before review) and land::Step::Rebase
(after the pull request exists) used to stop on a conflict and leave it to
a person. A conflict is often a chore - two pub mod lines on the same
spot - and what follows it (a rule the base gained meanwhile) is exactly
what the gate-fix round handles, so both callers now come through
rebase_with_fixer, which hands the standing conflict to the fixer seat.
The rules, none optional:
- magi resolves nothing itself. No taking one side, no line merging: the agent decides. Everything here is scaffolding around that call.
- The round is judged by what git says, never by the fixer’s report:
the rebase is no longer in progress, nothing is unmerged, no conflict
marker is left in a path that conflicted, and the base is an ancestor of
the result (an agent that ran
git rebase --abortleaves a tidy tree that contains no base at all). Whether the tree builds is left to the review and gate that follow, which already know how to fix a breakage. - The budget is
graph.review_rounds, counted inRunState::rebase_fixesand saved before the fixer is called, shared by both callers, so a park or a crash cannot hand a round back. It touches neither the task’s attempts nor land’s own rebase budget. - A failure restores the branch. Whatever the fixer left, the branch ref goes back to where it was and the throwaway worktree is removed, so the fallback is exactly the old “conflict, a person decides”.
Enums§
- Rebased
- How
rebase_with_fixerended.
Functions§
- rebase_
with_ fixer - Rebase
branchontoontoinscratch, giving a conflict to the fixer.