Skip to content

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

feat(storage/import): skip module scopes during owner store migration

Steven Enamakel2c6cca978022
diff --git a/crates/openhuman-core/src/storage/import/tinyflows.rs b/crates/openhuman-core/src/storage/import/tinyflows.rs
index 2a3d57c770..3d20aea399 100644
--- a/crates/openhuman-core/src/storage/import/tinyflows.rs
+++ b/crates/openhuman-core/src/storage/import/tinyflows.rs
@@ -368,6 +368,16 @@ async fn migrate_owner_stores(
let mut reports = Vec::new();
for scope in scopes {
+ // A module's own scope (`.../module:<id>`) holds that module's
+ // documents; the catalog and schedule owners never live there, so
+ // migrating them in it would leave their markers behind and make a
+ // second import change the database.
+ if matches!(
+ scope.parsed().map(|parsed| parsed.principal),
+ Ok(Some(tinystoragedrivers::scope::Principal::Module(_)))
+ ) {
+ continue;
+ }
#[cfg(feature = "flows")]
{
let catalog = migrate_catalog_storage(&backend, &config, &scope).await;