fix(merge): apply the verify gate to worktree-less approvals and report it everywhere
ApproveAndMergeAsync short-circuits to Done whenever a task has no active worktree -- which is exactly how a list-handler task works, since it commits straight into the list working dir. The verify command was skipped for the run that lands the most on the target branch at once; the loaded command was even discarded at the destructuring. It now runs under the same per-repo gate as the merge path before the task may reach Done. The two merge entry points that did not know verify_failed reported it as "Unknown status: verify_failed" (merge modal, dropping the command output) and as a generic Failed (worktrees batch, claiming the merge never happened).
This commit is contained in:
@@ -110,6 +110,12 @@ public sealed partial class MergeModalViewModel : ViewModelBase
|
||||
case "blocked":
|
||||
ErrorMessage = Loc.T("vm.merge.blocked", result.ErrorMessage ?? "");
|
||||
break;
|
||||
case "verify_failed":
|
||||
// The merge landed; only the Done transition was withheld. Deliberately not
|
||||
// treated as success -- no auto-close, because the failure text is the whole
|
||||
// point of the gate.
|
||||
ErrorMessage = result.ErrorMessage ?? Loc.T("vm.merge.verifyFailed");
|
||||
break;
|
||||
default:
|
||||
ErrorMessage = Loc.T("vm.merge.unknownStatus", result.Status);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user