| 364 | } |
| 365 | |
| 366 | async fn load_verification_reports(&self, id: &str) -> Result<Option<Vec<VerificationReport>>> { |
| 367 | let path = self.verification_path(id); |
| 368 | if !path.exists() { |
| 369 | return Ok(None); |
| 370 | } |
| 371 | |
| 372 | let json = fs::read_to_string(&path).await.with_context(|| { |
| 373 | format!( |
| 374 | "Failed to read verification reports from {}", |
| 375 | path.display() |
| 376 | ) |
| 377 | })?; |
| 378 | let reports = serde_json::from_str(&json).with_context(|| { |
| 379 | format!( |
| 380 | "Failed to parse verification reports from {}", |
| 381 | path.display() |
| 382 | ) |
| 383 | })?; |
| 384 | Ok(Some(reports)) |
| 385 | } |
| 386 | |
| 387 | async fn save_subagent_tasks(&self, id: &str, tasks: &[SubagentTaskSnapshot]) -> Result<()> { |
| 388 | let path = self.subagent_tasks_path(id); |