We're managing the hierarchical dependencies of Task/Stage/Job states semi-manually. This may create confusion as to when one should update which state or not.
It'd be rather more easier to evolve code when the state updates to Stage and Job are handled automatically inside the JobStateManager, and only the Task state updates are fed into the JobStateManager from the outside.
This will also have a nice side-effect of specifying the dependencies between the three states explicitly in a single class. It'd also give us an opportunity to clean up any unused or unnecessary states in the process.