Skip to content

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

fix(config): allow overlay derivation when anchors are absent

Steven Enamakelbac668e31009
diff --git a/crates/openhuman-core/src/config/schema/load/context_overlay.rs b/crates/openhuman-core/src/config/schema/load/context_overlay.rs
index 6774bfb31c..7c2018d687 100644
--- a/crates/openhuman-core/src/config/schema/load/context_overlay.rs
+++ b/crates/openhuman-core/src/config/schema/load/context_overlay.rs
@@ -55,8 +55,16 @@ impl ConfigContextOverlay {
pub(crate) fn derive(parent: &Config, child: &Config) -> anyhow::Result<Arc<Self>> {
let parent_anchor = parent.document_snapshot.lock().unwrap().anchor.clone();
let child_anchor = child.document_snapshot.lock().unwrap().anchor.clone();
+ let same_source = match (&parent_anchor, &child_anchor) {
+ (Some(parent), Some(child)) => parent == child,
+ (None, None) => {
+ super::source::normalized_path(&parent.config_path)
+ == super::source::normalized_path(&child.config_path)
+ }
+ _ => false,
+ };
anyhow::ensure!(
- parent_anchor == child_anchor,
+ same_source,
"cannot derive config overrides from different persistence sources"
);
let inherited = parent.context_overlay.lock().unwrap().clone();