Skip to content

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

refactor(config): re-export default_config_boxed and clean up imports

Steven Enamakel57e2c68cdf3f
diff --git a/crates/openhuman-core/src/config/schema/load/branches.rs b/crates/openhuman-core/src/config/schema/load/branches.rs
index 6be00d2ce6..0a328ce80a 100644
--- a/crates/openhuman-core/src/config/schema/load/branches.rs
+++ b/crates/openhuman-core/src/config/schema/load/branches.rs
@@ -7,9 +7,7 @@
use super::super::Config;
use super::dirs::{default_action_dir, resolve_action_dir, ConfigResolutionSource};
use super::env::EnvLookup;
-use super::impl_load::{
- parse_config_boxed, read_config_with_recovery_or_default,
-};
+use super::impl_load::{parse_config_boxed, read_config_with_recovery_or_default};
use super::migrate::{
migrate_cloud_provider_slugs, migrate_legacy_inference_url, migrate_search_settings,
};
diff --git a/crates/openhuman-core/src/config/schema/load/impl_load.rs b/crates/openhuman-core/src/config/schema/load/impl_load.rs
index 68900e24b3..489886286a 100644
--- a/crates/openhuman-core/src/config/schema/load/impl_load.rs
+++ b/crates/openhuman-core/src/config/schema/load/impl_load.rs
@@ -1,4 +1,5 @@
use super::super::Config;
+use super::branches::default_config_boxed;
use super::dirs::{
default_action_dir, default_config_and_workspace_dirs, resolve_action_dir,
resolve_config_dirs_ignoring_env, resolve_runtime_config_dirs_with, ConfigResolutionSource,
@@ -15,7 +16,6 @@ use std::sync::{Mutex, OnceLock};
use tokio::fs::{self, OpenOptions};
use tokio::io::AsyncWriteExt;
-
/// Guards the "corrupted config read, resetting to defaults" warning so it
/// fires at most once per process lifetime. Without this, a permanently
/// non-UTF-8 config file floods telemetry with hundreds of identical
@@ -33,7 +33,9 @@ static WARNED_CONFIG_READ_FAILURE: OnceLock<Mutex<bool>> = OnceLock::new();
///
/// Rate-limits the warning to at most one per process lifetime so a
/// permanently corrupted file does not flood telemetry (#5167).
-pub(super) async fn read_config_with_recovery_or_default(config_path: &Path) -> Result<(String, bool)> {
+pub(super) async fn read_config_with_recovery_or_default(
+ config_path: &Path,
+) -> Result<(String, bool)> {
let reads = || async {
match fs::read_to_string(config_path).await {
Ok(contents) => Ok(contents),
diff --git a/crates/openhuman-core/src/config/schema/load/mod.rs b/crates/openhuman-core/src/config/schema/load/mod.rs
index 5822bd4b5c..c1f94b6fe2 100644
--- a/crates/openhuman-core/src/config/schema/load/mod.rs
+++ b/crates/openhuman-core/src/config/schema/load/mod.rs
@@ -1,5 +1,6 @@
//! Config load/save and environment variable overrides.
+mod branches;
mod active_workspace;
mod dirs;
mod env;