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:
JackChen 2026-04-02 23:43:49 +08:00
parent 01b93d9897
commit 80a8c1dcff
1 changed files with 1 additions and 1 deletions

View File

@ -356,7 +356,7 @@ export class TaskQueue {
// Re-check against the current state of the whole task set.
// 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 = {
...task,
status: 'pending',