pub fn apply_task_update(
task: &mut SessionTask,
update: SessionTaskUpdate,
now: DateTime<Utc>,
)Expand description
Apply a partial update to a task, enforcing lifecycle invariants.
All registry backends route updates through this function so semantics stay identical across PostgreSQL, in-memory, and gRPC modes:
- terminal states are final: state changes on a terminal task are ignored (content fields like summary/result still apply);
- first transition out of
queuedstampsstarted_at; - transition into a terminal state stamps
finished_at; - setting
input_requestforcesawaiting_input; leavingawaiting_inputclears it.