Skip to content

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

chore(storage): remove unused storage module

Steven Enamakel6f42b20496d1
diff --git a/crates/openhuman-core/src/storage/mod.rs b/crates/openhuman-core/src/storage/mod.rs
index 29248eeb42..269372d501 100644
--- a/crates/openhuman-core/src/storage/mod.rs
+++ b/crates/openhuman-core/src/storage/mod.rs
@@ -20,6 +20,8 @@
pub mod agents;
pub mod documents;
+pub mod fence;
+pub mod fenced_backend;
pub mod lease;
mod lease_documents;
mod lease_local;
@@ -87,7 +89,8 @@ pub fn url_from(env: Option<String>, config: &Config) -> Option<String> {
.find(|url| !url.is_empty())
}
-/// Parses and opens the backend `url` names.
+/// Parses and opens the backend `url` names, its writes fenced by the
+/// process's lease fences ([`fence`]).
///
/// # Errors
///
@@ -101,7 +104,9 @@ pub async fn open(url: &str) -> Result<Arc<dyn StorageBackend>, StorageError> {
url = %redact_url(url),
"[storage] opening the configured backend"
);
- tinystoragedrivers::open(&parsed).await
+ // Every opened backend checks the process's lease fences on write; with
+ // no fence registered (every single-user host) that is a pass-through.
+ Ok(fenced_backend::wrap(tinystoragedrivers::open(&parsed).await?))
}
/// Makes `backend` the process's storage backend; returns the previous one.