(path: &Path)
| 465 | } |
| 466 | |
| 467 | async fn read_comment_result_markdown(path: &Path) -> Result<String> { |
| 468 | let raw = tokio::fs::read_to_string(path) |
| 469 | .await |
| 470 | .with_context(|| format!("failed to read result file {}", path.display()))?; |
| 471 | let normalized = raw.trim(); |
| 472 | if normalized.is_empty() { |
| 473 | anyhow::bail!("result file is empty: {}", path.display()); |
| 474 | } |
| 475 | Ok(normalized.to_string()) |
| 476 | } |
| 477 | |
| 478 | fn build_comment_result_file_path(result_dir: &Path, task_id: &str) -> PathBuf { |
| 479 | let safe_task_id = sanitize_task_id_for_path(task_id); |
no test coverage detected