fix: blocked tasks never unblocked when dependencies complete
isTaskReady() rejects non-pending tasks on its first line, but unblockDependents() passed blocked tasks directly to it. This meant dependent tasks stayed blocked forever after their dependencies completed, breaking any workflow with task dependencies. Fix: pass a pending-status copy so isTaskReady only checks the dependency condition.
This commit is contained in:
parent
01b93d9897
commit
80a8c1dcff
|
|
@ -356,7 +356,7 @@ export class TaskQueue {
|
||||||
|
|
||||||
// Re-check against the current state of the whole task set.
|
// Re-check against the current state of the whole task set.
|
||||||
// Pass the pre-built map to avoid rebuilding it for every candidate task.
|
// Pass the pre-built map to avoid rebuilding it for every candidate task.
|
||||||
if (isTaskReady(task, allTasks, taskById)) {
|
if (isTaskReady({ ...task, status: 'pending' }, allTasks, taskById)) {
|
||||||
const unblocked: Task = {
|
const unblocked: Task = {
|
||||||
...task,
|
...task,
|
||||||
status: 'pending',
|
status: 'pending',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue