Description
In WorkflowExecutor, there is a safety check loop (lines 75-80) that breaks if no tasks are running but pending tasks remain.
When this break occurs, the code falls through to cancelAllPending("Workflow cancelled."). This is misleading because the workflow wasn't cancelled by the user; it stopped because the runner couldn't proceed (effectively a deadlock or unreachable dependency state).
Reproduction Steps
- Manually construct a graph that passes validation but has a logic issue preventing a task from becoming ready (hard to do if validator is correct, but possible with runtime condition anomalies or manual manipulation).
- Alternatively, modify processLoop to artificially not pick up a ready task.
- Observe that the result status for remaining tasks is
cancelled and the message says "Workflow cancelled.", confusing it with a user-initiated abort.
Expected Behavior
The runner should throw an error or mark the tasks with a specific status like deadlocked or unreachable, with a clear message: "Workflow stopped: pending tasks exist but none can be executed."
Environment
No response
Description
In WorkflowExecutor, there is a safety check loop (lines 75-80) that breaks if no tasks are running but pending tasks remain.
When this
breakoccurs, the code falls through tocancelAllPending("Workflow cancelled."). This is misleading because the workflow wasn't cancelled by the user; it stopped because the runner couldn't proceed (effectively a deadlock or unreachable dependency state).Reproduction Steps
cancelledand the message says "Workflow cancelled.", confusing it with a user-initiated abort.Expected Behavior
The runner should throw an error or mark the tasks with a specific status like
deadlockedorunreachable, with a clear message: "Workflow stopped: pending tasks exist but none can be executed."Environment
No response