Skip to content

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

fix(memory): confine reach to the resolved scope root

Steven Enamakelfea7255ea8b4
diff --git a/crates/openhuman-core/src/memory/confine.rs b/crates/openhuman-core/src/memory/confine.rs
index f7cdc770dc..454931e547 100644
--- a/crates/openhuman-core/src/memory/confine.rs
+++ b/crates/openhuman-core/src/memory/confine.rs
@@ -33,8 +33,7 @@ use super::types::{
/// identity in scope's layout root.
#[must_use]
pub fn allowed_reach(config: &Config) -> Reach {
- let _ = scope::resolve_current(config);
- Reach::subtree(Namespace::ROOT)
+ Reach::subtree(scope::resolve_current(config).root().clone())
}
/// `reach` confined to `allowed`: unset becomes `allowed`, a reach within it
diff --git a/crates/openhuman-core/src/memory/user_scope.rs b/crates/openhuman-core/src/memory/user_scope.rs
index b3dbed80ba..7ea7cccefd 100644
--- a/crates/openhuman-core/src/memory/user_scope.rs
+++ b/crates/openhuman-core/src/memory/user_scope.rs
@@ -34,7 +34,7 @@ pub fn confinement(config: &Config) -> MemoryResult<Option<Namespace>> {
/// [`confinement`] as a pure function of the mode.
pub fn confinement_in(saas: bool, config: &Config) -> MemoryResult<Option<Namespace>> {
- if !saas || true {
+ if !saas {
return Ok(None);
}
let raw = config.memory.root.as_deref().map(str::trim).unwrap_or("");