Pending is the initial task lifecycle state. It begins when a user submits a task and the system enqueues it, before scheduling identifies where it should run. section 2.1 section 4.6.3
A task normally progresses from Pending to Scheduled, then Running, and finally Completed; failures can move it into Failed. Pending therefore represents work accepted by the system but not yet assigned to a worker. section 2.1 section 4.6.3
The state participates in a small, explicit transition model:
- ScheduleEvent moves a task from Pending to Scheduled. section 4.6.3
- Pending has no direct transition to Running, Completed, or Failed in the transition map. section 4.6.3
- Managers and workers use task states to coordinate actions such as scheduling, starting, and stopping tasks. section 2.7
Minimal Go representation
A Go enum-like type makes Pending an explicit value in the task state machine: `type State int`, followed by `Pending State = iota`, `Scheduled`, `Running`, `Completed`, and `Failed`. section 2.1
Table 4.1 State transition table showing the valid transitions from one state to another (view table figure)
Use the transition table to check which event-driven moves are valid from Pending and which states remain unreachable directly from it. section 4.6.3
