Skip to content

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

fix(memory): qualify Result paths to avoid shadowing

Steven Enamakel1a9a4527c657
diff --git a/crates/openhuman-core/src/memory/lifecycle/hooks.rs b/crates/openhuman-core/src/memory/lifecycle/hooks.rs
index 531a808451..996b43c745 100644
--- a/crates/openhuman-core/src/memory/lifecycle/hooks.rs
+++ b/crates/openhuman-core/src/memory/lifecycle/hooks.rs
@@ -294,7 +294,7 @@ pub(crate) async fn pre_turn_work(
/// The account-wide refusal behind a recall that came back empty, if any:
/// the first refusing error, else the first refusing skipped section.
-fn refusal_of(outcomes: &[Result<ContextPack, Error>]) -> Option<Error> {
+fn refusal_of(outcomes: &[std::result::Result<ContextPack, Error>]) -> Option<Error> {
let failed = outcomes.iter().find_map(|outcome| {
outcome
.as_ref()
diff --git a/crates/openhuman-core/src/memory/schemas/handlers.rs b/crates/openhuman-core/src/memory/schemas/handlers.rs
index b5c5cc4bfb..223f50f6b1 100644
--- a/crates/openhuman-core/src/memory/schemas/handlers.rs
+++ b/crates/openhuman-core/src/memory/schemas/handlers.rs
@@ -58,7 +58,7 @@ where
})
}
-fn parse<T: DeserializeOwned>(params: Map<String, Value>) -> std::result::std::result::Result<T, String> {
+fn parse<T: DeserializeOwned>(params: Map<String, Value>) -> std::result::Result<T, String> {
serde_json::from_value(Value::Object(params))
.map_err(|error| {
StructuredRpcError::from(Error::InvalidRequest(format!("invalid params: {error}")))
diff --git a/crates/openhuman-core/src/memory/scope.rs b/crates/openhuman-core/src/memory/scope.rs
index 4e53629624..7dd2fff84c 100644
--- a/crates/openhuman-core/src/memory/scope.rs
+++ b/crates/openhuman-core/src/memory/scope.rs
@@ -282,7 +282,7 @@ fn team_root(team: &str) -> Namespace {
/// # Errors
///
/// Why it is not one.
-pub fn validate_root(root: &str) -> Result<(), String> {
+pub fn validate_root(root: &str) -> std::result::Result<(), String> {
let root: Namespace = root
.trim()
.parse()
diff --git a/crates/openhuman-core/src/memory/tool_writes.rs b/crates/openhuman-core/src/memory/tool_writes.rs
index bbdb8a73be..49b389523a 100644
--- a/crates/openhuman-core/src/memory/tool_writes.rs
+++ b/crates/openhuman-core/src/memory/tool_writes.rs
@@ -237,7 +237,7 @@ impl ListStore<Entry> for FileStore {
read_file(&self.file).map_err(|_| StoreError("queue file unreadable".into()))
}
- fn save(&self, entries: &[Entry]) -> Result<(), StoreError> {
+ fn save(&self, entries: &[Entry]) -> std::result::Result<(), StoreError> {
write_file(&self.file, entries).map_err(|_| StoreError("queue file unwritable".into()))
}
}