Merges a task's stored state into the in-memory one: messages and artifacts are the union of both
(by ID, in creation order), and a status that is terminal in storage stays terminal — so a pod that
finishes a task another pod already cancelled cannot write Complete over Cancelled, and a stale
pod cannot move a finished task back to in_progress.
Merges a task's stored state into the in-memory one: messages and artifacts are the union of both (by ID, in creation order), and a status that is terminal in storage stays terminal — so a pod that finishes a task another pod already cancelled cannot write
CompleteoverCancelled, and a stale pod cannot move a finished task back toin_progress.