feat(worker): let review_task/merge_task leave conflicts in tree via MCP

This commit is contained in:
mika kuns
2026-07-24 14:21:26 +02:00
parent 2a3ab5504a
commit f4f7c81059
3 changed files with 163 additions and 25 deletions
@@ -342,7 +342,11 @@ public sealed class TaskMergeService
return new MergePreviewResult(PreviewClean, Array.Empty<string>(), count);
}
public async Task<MergeResult> ApproveAndMergeAsync(string taskId, string targetBranch, CancellationToken ct)
public Task<MergeResult> ApproveAndMergeAsync(string taskId, string targetBranch, CancellationToken ct)
=> ApproveAndMergeAsync(taskId, targetBranch, leaveConflictsInTree: false, ct);
public async Task<MergeResult> ApproveAndMergeAsync(
string taskId, string targetBranch, bool leaveConflictsInTree, CancellationToken ct)
{
var (task, list, wt) = await LoadMergeContextAsync(taskId, ct);
@@ -367,7 +371,7 @@ public sealed class TaskMergeService
// MergeAsync transitions the task WaitingForReview -> Done on a successful merge.
// Remove the worktree on approve (matching the unit-merge path) so merged
// worktrees don't pile up; the merge commit on the target branch is the record.
return await MergeAsync(taskId, target, removeWorktree: true, $"Merge {wt.BranchName}", ct);
return await MergeAsync(taskId, target, removeWorktree: true, $"Merge {wt.BranchName}", leaveConflictsInTree, ct);
}
private static MergeResult Blocked(string reason) =>