Why do some tasks go straight to 'Failed' state?

My assumption about task states is that a task should start from ‘Draft’, then switch to ‘Ready’, then either ‘Cancelled’/‘Completed’/‘Failed’. But then why are there some tasks where the only item in the stateHistory is ‘Failed’? Does that mean that they were never ‘Ready’, and therefore never shown to the user?

Related to Difference between task dueDate and endDate - #2 by derick

This could be as a result one of the following:

  • An upgrade was done. Old, current and future tasks are created. Anything whose endDate is in the past would be marked as Failed
  • A task that was generated with a dueDate in the past (outside of an upgrade context)