Skip to content

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

style(config): wrap long signatures and assertions

Steven Enamakel0925f4bc569e
diff --git a/crates/openhuman-core/src/config/schema/load/source/document.rs b/crates/openhuman-core/src/config/schema/load/source/document.rs
index 31e0985be0..fcba50cfc9 100644
--- a/crates/openhuman-core/src/config/schema/load/source/document.rs
+++ b/crates/openhuman-core/src/config/schema/load/source/document.rs
@@ -94,7 +94,9 @@ impl DocumentConfigSource {
}
/// The decrypted stored body, or `None` when the scope has no document.
- async fn stored_body(&self) -> Result<Option<(zeroize::Zeroizing<String>, tinystoragedrivers::Version)>> {
+ async fn stored_body(
+ &self,
+ ) -> Result<Option<(zeroize::Zeroizing<String>, tinystoragedrivers::Version)>> {
self.docs
.ensure_collection(&CollectionSpec::new(CONFIG_COLLECTION))
.await
@@ -186,7 +188,11 @@ impl ConfigSource for DocumentConfigSource {
Ok(())
}
- async fn write_versioned(&self, toml: &str, expected: Option<tinystoragedrivers::Version>) -> Result<Option<tinystoragedrivers::Version>> {
+ async fn write_versioned(
+ &self,
+ toml: &str,
+ expected: Option<tinystoragedrivers::Version>,
+ ) -> Result<Option<tinystoragedrivers::Version>> {
let body = zeroize::Zeroizing::new(
strip_bootstrap(toml).context("strip bootstrap tables from the config")?,
);
@@ -199,7 +205,8 @@ impl ConfigSource for DocumentConfigSource {
.context("declare the config collection")?;
let id = document_id(self.scope.as_str())?;
let precondition = expected.map_or(Precondition::Absent, Precondition::Version);
- let version = self.docs
+ let version = self
+ .docs
.put(
CONFIG_COLLECTION,
&id,
diff --git a/crates/openhuman-core/src/config/schema/load/source/mod.rs b/crates/openhuman-core/src/config/schema/load/source/mod.rs
index 92de4641ba..05da18738d 100644
--- a/crates/openhuman-core/src/config/schema/load/source/mod.rs
+++ b/crates/openhuman-core/src/config/schema/load/source/mod.rs
@@ -85,7 +85,11 @@ pub(crate) trait ConfigSource: Send + Sync {
/// still the live one, so callers may roll back in-memory state on `Err`.
async fn write(&self, toml: &str) -> Result<()>;
- async fn write_versioned(&self, toml: &str, _expected: Option<tinystoragedrivers::Version>) -> Result<Option<tinystoragedrivers::Version>> {
+ async fn write_versioned(
+ &self,
+ toml: &str,
+ _expected: Option<tinystoragedrivers::Version>,
+ ) -> Result<Option<tinystoragedrivers::Version>> {
self.write(toml).await?;
Ok(None)
}
diff --git a/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs b/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs
index a07939dfd9..6c21341dea 100644
--- a/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs
+++ b/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs
@@ -270,7 +270,10 @@ async fn concurrent_first_config_writes_use_insert_preconditions() {
.await
.unwrap()
.contents;
- assert!(saved.contains("first") ^ saved.contains("second"), "{saved}");
+ assert!(
+ saved.contains("first") ^ saved.contains("second"),
+ "{saved}"
+ );
}
// ── Through Config ───────────────────────────────────────────────────────────
@@ -335,7 +338,10 @@ async fn stale_document_config_snapshot_returns_conflict_instead_of_overwriting(
.chain()
.find_map(|cause| cause.downcast_ref::<tinystoragedrivers::StorageError>())
.expect("CAS failure retains the typed storage error");
- assert_eq!(storage_error.kind(), tinystoragedrivers::ErrorKind::Conflict);
+ assert_eq!(
+ storage_error.kind(),
+ tinystoragedrivers::ErrorKind::Conflict
+ );
let rpc_error = crate::config::ops::config_save_error(error);
let rpc_error = crate::core::StructuredRpcError::decode(&rpc_error)
.expect("config RPC boundary exposes a structured conflict");