Skip to content

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

fix(security): report device scope as unsearched on read error

Steven Enamakelf1e69d5a9030
diff --git a/crates/openhuman-core/src/security/devices/owner.rs b/crates/openhuman-core/src/security/devices/owner.rs
index bcb1ad5966..f2951d150d 100644
--- a/crates/openhuman-core/src/security/devices/owner.rs
+++ b/crates/openhuman-core/src/security/devices/owner.rs
@@ -63,12 +63,10 @@ pub(super) async fn owner_of(
let Ok(config) = crate::config::rpc::load_config_with_timeout().await else {
return None;
};
- Some(
- super::store::get_device(&config, channel_id)
- .ok()
- .flatten()
- .is_some(),
- )
+ // A read error is not "not here": report the scope as unsearched.
+ super::store::get_device(&config, channel_id)
+ .ok()
+ .map(|device| device.is_some())
})
.await;
if let Some(owner) = found
diff --git a/crates/openhuman-core/src/storage/agents.rs b/crates/openhuman-core/src/storage/agents.rs
index 30ec2e50fc..baeee0edfc 100644
--- a/crates/openhuman-core/src/storage/agents.rs
+++ b/crates/openhuman-core/src/storage/agents.rs
@@ -252,7 +252,7 @@ where
let mut results = Vec::new();
for (agent, context) in agent_contexts(fallback.as_ref()) {
tracing::trace!(%agent, label, "[storage::agents] visiting agent scope");
- let value = CoreContext::scope(context, step()).await;
+ let value = CoreContext::scope(context, async { step().await }).await;
results.push((agent, value));
}
results