feat(worker): approve a unit parent like a single task, orchestrator only for legacy units

This commit is contained in:
mika kuns
2026-10-01 11:25:48 +02:00
parent 9da522b0c9
commit 1f373a5a67
3 changed files with 26 additions and 11 deletions
@@ -134,7 +134,9 @@ public sealed class PlanningMergeOrchestrator : IActiveMergeState
throw new InvalidOperationException("working tree has uncommitted changes");
var idsToMerge = new List<string>();
if (!isPlanning && parentHasWorktree)
// A planning parent owns a worktree too since the unit branch -- a mixed unit (absorbed
// children in it, legacy children beside it) must land it before the legacy children.
if (parentHasWorktree)
idsToMerge.Add(parentTaskId);
idsToMerge.AddRange(
children