Skip to content

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

refactor(storage): update lease collection naming

Steven Enamakelfeb9da6e91ab
diff --git a/crates/openhuman-core/src/storage/lease.rs b/crates/openhuman-core/src/storage/lease.rs
index b2149ea51b..c294fdcae2 100644
--- a/crates/openhuman-core/src/storage/lease.rs
+++ b/crates/openhuman-core/src/storage/lease.rs
@@ -4,11 +4,10 @@
//! serves a profile) and until when. Two implementations share the
//! [`LeaseStore`] contract:
//!
-//! - [`DocumentLeases`] keeps one record per key in tinystoragedrivers'
-//! `tsd.leases` ([`LEASE_COLLECTION`], scope [`CLUSTER_SCOPE`]) through
-//! its [`Leases`](tinystoragedrivers::Leases) primitive, which moves it only
-//! by compare-and-swap, so it is correct across processes on a driver
-//! with cross-process CAS ([`super::driver_has_cross_process_cas`]).
+//! - [`DocumentLeases`] keeps one host-owned record per key in
+//! [`LEASE_COLLECTION`] under [`CLUSTER_SCOPE`], using versioned document
+//! writes as a compare-and-swap so it is correct across processes on a
+//! driver with cross-process CAS ([`super::driver_has_cross_process_cas`]).
//! - [`LocalLeases`] is for hosts without a backend: an exclusive `flock` on
//! `<root>/<sha256(key) hex>/.lease`, which the OS drops when the holder dies.
//!
@@ -64,8 +63,8 @@ pub use super::lease_local::LocalLeases;
/// The storage scope lease records live under, shared by every node.
pub const CLUSTER_SCOPE: &str = "cluster";
-/// The collection lease records live in: tinystoragedrivers' `tsd.leases`.
-pub const LEASE_COLLECTION: &str = tinystoragedrivers::primitives::LEASES;
+/// The host-owned collection for process-placement lease records.
+pub const LEASE_COLLECTION: &str = "openhuman.leases";
/// The longest key a lease accepts, in bytes.
pub const MAX_KEY_LEN: usize = 200;