Skip to content

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

fix(review): conversation batch rides the bulk deadline; layout re-balanced\n\nThe typed conversation ingest dispatches through module_call_slow! for\nthe reason its ingest_chat twin already does -- a large batch on the\ndefault 30s deadline is the AcceptSourceItems timeout all over again\n(review finding). And publish_cli_boot_policy moves to memory_part_02,\nputting part_01 back under the 750-line layout gate its five new\naccessors had tipped.\n

Shanu988ceaf06467
diff --git a/src/openhuman/modules/memory_part_01.rs b/src/openhuman/modules/memory_part_01.rs
index 7f0c68eaa5..9cab25a367 100644
--- a/src/openhuman/modules/memory_part_01.rs
+++ b/src/openhuman/modules/memory_part_01.rs
@@ -209,25 +209,6 @@ static MODULES_POLICY: std::sync::OnceLock<Arc<Config>> = std::sync::OnceLock::n
/// Call once during boot, before any workspace is bound. Later calls are
/// ignored — a driver already resolved against the first value must not have the
/// policy change underneath it.
-/// Load config and publish the module host policy, for a CLI process.
-///
-/// The server does this during boot; every CLI family that crosses the memory
-/// module binding (`memory`, `tree-summarizer`, the raw `call` dispatcher) is
-/// its own process and must do the same before its first driver call, or that
-/// call fails with "the module host policy was never published". One helper so
-/// the sequence lives in the openhuman layer — `src/core/` is transport and
-/// carries a one-line call, not the business of loading config and installing
-/// sinks (review finding on #5932).
-pub async fn publish_cli_boot_policy() -> Result<Config, String> {
- let mut config = Config::load_or_init()
- .await
- .map_err(|error| format!("load config for module policy: {error}"))?;
- config.apply_env_overrides();
- crate::openhuman::memory::host::install_memory_event_sink();
- set_modules_policy(Arc::new(config.clone()));
- Ok(config)
-}
-
pub fn set_modules_policy(config: Arc<Config>) {
let _ = MODULES_POLICY.set(config);
}
diff --git a/src/openhuman/modules/memory_part_02.rs b/src/openhuman/modules/memory_part_02.rs
index ddd30c554c..982812f8fc 100644
--- a/src/openhuman/modules/memory_part_02.rs
+++ b/src/openhuman/modules/memory_part_02.rs
@@ -723,3 +723,23 @@ impl ModuleMemoryProvider {
})
}
}
+
+/// Load config and publish the module host policy, for a CLI process.
+///
+/// The server does this during boot; every CLI family that crosses the memory
+/// module binding (`memory`, `tree-summarizer`, the raw `call` dispatcher) is
+/// its own process and must do the same before its first driver call, or that
+/// call fails with "the module host policy was never published". One helper so
+/// the sequence lives in the openhuman layer — `src/core/` is transport and
+/// carries a one-line call, not the business of loading config and installing
+/// sinks (review finding on #5932).
+pub async fn publish_cli_boot_policy() -> Result<Config, String> {
+ let mut config = Config::load_or_init()
+ .await
+ .map_err(|error| format!("load config for module policy: {error}"))?;
+ config.apply_env_overrides();
+ crate::openhuman::memory::host::install_memory_event_sink();
+ set_modules_policy(Arc::new(config.clone()));
+ Ok(config)
+}
+
diff --git a/src/openhuman/modules/memory_part_03.rs b/src/openhuman/modules/memory_part_03.rs
index 298e9430af..39feb2795e 100644
--- a/src/openhuman/modules/memory_part_03.rs
+++ b/src/openhuman/modules/memory_part_03.rs
@@ -533,8 +533,11 @@ impl MemoryConversationIngest for ModuleMemoryProvider {
messages: Vec<IngestItem>,
) -> Result<IngestOutcome, MemoryError> {
// The wire member is the chat batch: the conversation trait is the
- // typed rename of the same ordered-batch operation.
- module_call!(
+ // typed rename of the same ordered-batch operation — and it rides the
+ // bulk deadline for the same reason ingest_chat does (review finding:
+ // a large batch on the default 30s deadline is the AcceptSourceItems
+ // timeout all over again).
+ module_call_slow!(
self,
"typed_ingest_conversation",
methods::INGEST_CHAT,