Jump to a problem, path or page
Jump to a problem, path or page
01 · Develop the design
Validate the whole DAG, maintain a ready queue and serialize task-state changes while executing work outside the scheduler lock. Conditional terminal transitions preserve dependency counts and concurrency limits.
Stage 1
Validate the full graph
Require unique task IDs and known dependency IDs. Use topological sorting or a recursion-stack cycle detector before execution starts.
Stage 2
Track remaining successful dependencies
Initialize an indegree-like counter for each task. Only a newly committed success releases outgoing dependencies.
Stage 3
Separate executor work from state transitions
Reserve a RUNNING slot under the scheduler lock, execute outside it, then apply one completion transition. Failed descendants become SKIPPED under an explicit policy.
02 · Work through the method
03 · Justify the choices
When should cycle validation happen?
Before execution using the complete declared graph
Early graph validation avoids partial side effects from an invalid dependency specification.
When is a task ready?
When every declared dependency has succeeded
Completion alone is insufficient: failed dependencies must block dependants under the chosen success-only policy.
How should duplicate completion events behave?
Only the first valid RUNNING-to-terminal transition changes dependants
Conditional state transitions prevent repeated callbacks from making dependency counters negative or triggering duplicate runs.
04 · Plan the evidence