I think I don't follow the semantics of task_states. I thought it was

task_states = list of child_states, one for each way in which the task could be graded (peer, self, ai)
child_state = dictionary storing info about current attempt at this task grading, plus history attempts and their assessment results.

That seems like it's not the case, though, given you examples. Can you clarify?