fix(worker): mark task Done on every successful merge path, not just approve

Generalizes the previous merge_task fix: the WaitingForReview->Done transition
now lives in TaskMergeService.MergeAsync/ContinueMergeAsync, so the UI Merge
button (WorkerHub.MergeTask), conflict-merge, continue-merge and the external
MCP all land a merged task in Done. ApproveAndMergeAsync no longer double-approves.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-06-09 10:41:08 +02:00
parent ca8326c4c5
commit f56cc617c3
2 changed files with 14 additions and 13 deletions

View File

@@ -468,12 +468,6 @@ public sealed class ExternalMcpService
if (result.Status == TaskMergeService.StatusMerged)
{
// MergeAsync only flips the worktree to Merged; a merged task must also
// reach Done. If it was still awaiting review, approve it now (a Done task
// is already terminal and needs no transition).
if (task.Status == TaskStatus.WaitingForReview)
await _state.ApproveReviewAsync(taskId, cancellationToken);
string? mergeCommit = null;
try
{