Resolve merge conflicts with AI Fix
The agent merges the default branch, resolves the conflicts and Limn checks the result before it can push.
When a pull request conflicts with its base branch, AI Fix can merge the base branch in and resolve the conflicts, then fix the other items on top. Limn checks the merge itself before anything can be pushed. You review how each conflict was resolved, apart from the other changes.
#When it is offered
The first item under What to fix reads Resolve merge conflicts with and the base branch, for example main. It is there, and ticked, when:
- GitHub says the pull request conflicts with its base branch;
- the pull request is not in a merge queue; and
- you can push to its branch.
It needs no AI review and no CI item. Ticked alone, the agent resolves the conflicts and changes nothing else.
#What the agent does
- Limn starts the merge of the base branch's latest commit in the sandbox, before the agent starts.
- The agent resolves each conflict with judgement, not by taking one side. It reads the lines around each conflict, so nothing is repeated, nothing is lost and no conflict marker is left.
- It makes the merge commit, builds and tests, then fixes the other ticked items on top.
#Limn's check
After each build turn, Limn checks the agent's commits on your computer, outside the sandbox: the merge commit must join exactly the pull request and the base branch, no conflict marker may remain, and the fixes must come after the merge. The result is shown from Limn's own copy of those commits, not from anything the agent says.
- When the merge passes, the tab says The merge commit matches git's own merge outside the conflicts.
- When it fails, the merge item is Not addressed with Limn's reason, the tab shows Merge not valid, and nothing can be pushed, not even the other fixes: The merge did not pass Limn’s check, so nothing can be pushed. Ask for more, or discard.
#Review the merge
ledger/post.py- entry = LedgerEntry(amount=amt)+ entry = Entry(amount=amt, currency=cur)
The merge commit matches git's own merge outside the conflicts.
Push to the PR branch Push
How the conflicts were resolved shows only what the agent decided inside the conflicts, compared with git's own merge. Fixes on top shows the other changes. If there are none, the tab says No other changes on top of the merge.
#Push it
Push sends the merge commit and the fixes on top to the PR's branch. A merge that fails the check sends nothing. A fix with the merge item pushes only to the pull request's own branch, never to a new branch, and never to a fork's branch.
#By hand instead
You can always resolve conflicts yourself in Limn's resolver, region by region, with nothing applied until you press a button. See Resolve conflicts.