Skip to content

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

fix(embed): re-export the layout auto-migration only with legacy-import

M3gA-Mind123776c74cfc
diff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rs
index 2783f95c37..fcafcba212 100644
--- a/crates/openhuman-embed/src/host_internals.rs
+++ b/crates/openhuman-embed/src/host_internals.rs
@@ -508,7 +508,9 @@ pub mod storage {
};
/// The layout v1 -> v2 migration the host runs at boot when
- /// `[storage] auto_migrate_layout` is set.
+ /// `[storage] auto_migrate_layout` is set. The core builds it only with
+ /// `legacy-import`.
+ #[cfg(feature = "legacy-import")]
pub mod layout {
pub use openhuman_core::storage::layout::auto_migrate;
}
diff --git a/crates/openhuman-rpc/src/session_store/mod.rs b/crates/openhuman-rpc/src/session_store/mod.rs
index 8132ac1e58..47406f99af 100644
--- a/crates/openhuman-rpc/src/session_store/mod.rs
+++ b/crates/openhuman-rpc/src/session_store/mod.rs
@@ -106,13 +106,17 @@ async fn configured_storage_url() -> anyhow::Result<Option<String>> {
anyhow::anyhow!("loading the config to resolve the storage url: {error}")
})
};
- let mut config = load().await?;
+ let config = load().await?;
// `[storage] auto_migrate_layout`: move a layout-v1 profile to v2 before
// the backend opens, then re-read the config, whose workspace is now the
- // profile's `files/` directory.
- if crate::core_host::storage::layout::auto_migrate(&config).await {
- config = load().await?;
- }
+ // profile's `files/` directory. The migration exists only with
+ // `legacy-import`.
+ #[cfg(feature = "legacy-import")]
+ let config = if crate::core_host::storage::layout::auto_migrate(&config).await {
+ load().await?
+ } else {
+ config
+ };
Ok(storage_url_from(env, &config))
}