Skip to content

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

fix(flows): validate and migrate existing graph on update

Steven Enamakele6fcb9d9cdd9
diff --git a/crates/openhuman-core/src/flows/ops/updates.rs b/crates/openhuman-core/src/flows/ops/updates.rs
index 92503dd1d1..7968fbba36 100644
--- a/crates/openhuman-core/src/flows/ops/updates.rs
+++ b/crates/openhuman-core/src/flows/ops/updates.rs
@@ -107,8 +107,12 @@ async fn flows_update_inner(
graph
}
None => {
- tinyflows::validate::validate(&existing.graph).map_err(|e| e.to_string())?;
- existing.graph.clone()
+ validate_and_migrate_graph(
+ &crate::core::runtime::DispatchCtx::ambient(),
+ config,
+ serde_json::to_value(&existing.graph).map_err(|error| error.to_string())?,
+ )
+ .await?
}
};
// B29 Rule 1 analogue: disarm every manual/none → automatic trigger