Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(storage_import_tinymcp): gate test-only imports behind cfg(test)

Steven Enamakel0fed7c95c91c
diff --git a/crates/openhuman-core/src/modules/storage_import_tinymcp.rs b/crates/openhuman-core/src/modules/storage_import_tinymcp.rs
index 3054ae1782..1f6f1335e9 100644
--- a/crates/openhuman-core/src/modules/storage_import_tinymcp.rs
+++ b/crates/openhuman-core/src/modules/storage_import_tinymcp.rs
@@ -29,7 +29,9 @@
use std::path::{Path, PathBuf};
use std::sync::Arc;
-use crate::storage::{CollectionSpec, DocumentStore, Precondition, Storage, StorageBackend};
+use crate::storage::{CollectionSpec, DocumentStore, Precondition, Storage};
+#[cfg(test)]
+use crate::storage::StorageBackend;
use anyhow::{Context, Result, anyhow};
use serde_json::{Value, json};
use sha2::Digest;
@@ -135,6 +137,7 @@ pub(crate) async fn import_legacy(ctx: &DispatchCtx, data_dir: &Path) -> Result<
Ok(imported.unwrap_or(Outcome::InProgress))
}
+#[cfg(test)]
async fn import_into(
backend: &Arc<dyn StorageBackend>,
scope: &crate::storage::Scope,