Delete the loop checkpoint for `run_id` once the run has reached a terminal state in-process. The checkpoint exists only to survive a process crash; once the run returns (completed / failed / cancelled) it is dead weight. No-op when no store is configured. Errors are warn-logged — a failed cleanup must never mask the run's result.
(&self, run_id: &str)
| 117 | /// it is dead weight. No-op when no store is configured. Errors are |
| 118 | /// warn-logged — a failed cleanup must never mask the run's result. |
| 119 | pub(super) async fn clear_loop_checkpoint(&self, run_id: &str) { |
| 120 | let Some(store) = &self.session_store else { |
| 121 | return; |
| 122 | }; |
| 123 | if let Err(e) = store.delete_loop_checkpoint(run_id).await { |
| 124 | tracing::warn!( |
| 125 | run_id = %run_id, |
| 126 | session_id = %self.session_id, |
| 127 | "Failed to delete loop checkpoint on run completion: {}", |
| 128 | e |
| 129 | ); |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | pub(super) fn load_session_data( |
no test coverage detected