feat(worker): chain a normal parent's children on WaitingForChildren
A standalone parent (PlanningPhase.None) with existing Idle/Queued children now runs itself first, then sequences its children instead of flat-enqueuing all of them at once: SubmitForChildrenAsync calls PlanningChainCoordinator.SetupChainAsync(enqueue: true) right after the Running -> WaitingForChildren transition, mirroring the planning path but firing immediately instead of waiting for an explicit "Queue plan". Planning parents are left untouched (they queue via QueuePlanAsync), and a child already Running makes SetupChainAsync throw, which is now caught and logged so it can't fail the parent's own transition.
This commit is contained in:
@@ -553,8 +553,6 @@ public sealed class TaskRunner
|
||||
var transition = await _state.SubmitForChildrenAsync(task.Id, finishedAt, reviewResult, CancellationToken.None);
|
||||
if (!transition.Ok)
|
||||
_logger.LogWarning("SubmitForChildrenAsync rejected for task {TaskId}: {Reason}", task.Id, transition.Reason);
|
||||
foreach (var child in pendingChildren)
|
||||
await _state.EnqueueAsync(child.Id, CancellationToken.None);
|
||||
await _broadcaster.WorkerLog(
|
||||
$"Finished #{task.Number} \"{task.Title}\" (waiting on {pendingChildren.Count} improvement(s))",
|
||||
WorkerLogLevel.Success, DateTime.UtcNow);
|
||||
|
||||
Reference in New Issue
Block a user