MCPcopy Create free account
hub / github.com/AI45Lab/Code / save_verification_reports

Method save_verification_reports

core/src/store/file_store.rs:342–364  ·  view source on GitHub ↗
(
        &self,
        id: &str,
        reports: &[VerificationReport],
    )

Source from the content-addressed store, hash-verified

340 }
341
342 async fn save_verification_reports(
343 &self,
344 id: &str,
345 reports: &[VerificationReport],
346 ) -> Result<()> {
347 let path = self.verification_path(id);
348 if let Some(parent) = path.parent() {
349 fs::create_dir_all(parent).await.with_context(|| {
350 format!(
351 "Failed to create verification report directory: {}",
352 parent.display()
353 )
354 })?;
355 }
356
357 let json = serde_json::to_string_pretty(reports).with_context(|| {
358 format!("Failed to serialize verification reports for session {id}")
359 })?;
360 fs::write(&path, json).await.with_context(|| {
361 format!("Failed to write verification reports to {}", path.display())
362 })?;
363 Ok(())
364 }
365
366 async fn load_verification_reports(&self, id: &str) -> Result<Option<Vec<VerificationReport>>> {
367 let path = self.verification_path(id);

Calls 3

writeFunction · 0.85
verification_pathMethod · 0.80
with_contextMethod · 0.80