Skip to content

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

fix(scoring): gate ARTIFACT_CAPABILITIES ref on modules feature + fmt

shanu5cbe86b4d582
diff --git a/src/openhuman/agent/harness/archivist/lifecycle.rs b/src/openhuman/agent/harness/archivist/lifecycle.rs
index 9c367c388b..9a32fdb1dc 100644
--- a/src/openhuman/agent/harness/archivist/lifecycle.rs
+++ b/src/openhuman/agent/harness/archivist/lifecycle.rs
@@ -516,21 +516,24 @@ impl ArchivistHook {
return;
};
let Some(scoring) = provider.as_scoring() else {
- use tinymemory_api::capabilities::Capability;
- if crate::openhuman::modules::memory::ARTIFACT_CAPABILITIES
- .contains(&Capability::Scoring)
+ #[cfg(feature = "modules")]
{
- tracing::warn!(
- "[archivist] driver does not expose scoring but the pinned artifact is \
- expected to serve it — check module version; \
- skipping segment embedding segment={segment_id}"
- );
- } else {
- tracing::debug!(
- "[archivist] driver does not support scoring — skipping segment embedding \
- segment={segment_id}"
- );
+ use tinymemory_api::capabilities::Capability;
+ if crate::openhuman::modules::memory::ARTIFACT_CAPABILITIES
+ .contains(&Capability::Scoring)
+ {
+ tracing::warn!(
+ "[archivist] driver does not expose scoring but the pinned artifact is \
+ expected to serve it — check module version; \
+ skipping segment embedding segment={segment_id}"
+ );
+ return;
+ }
}
+ tracing::debug!(
+ "[archivist] driver does not support scoring — skipping segment embedding \
+ segment={segment_id}"
+ );
return;
};
let model_signature = match scoring.embedder_slug().await {
diff --git a/src/openhuman/agent/harness/archivist_tests.rs b/src/openhuman/agent/harness/archivist_tests.rs
index a0650a55fe..2101694f6f 100644
--- a/src/openhuman/agent/harness/archivist_tests.rs
+++ b/src/openhuman/agent/harness/archivist_tests.rs
@@ -1037,7 +1037,8 @@ async fn embed_segment_recap_skips_whitespace_summary() {
let provider: Arc<dyn MemoryProvider> = recording.clone();
let hook = hook_with_stubs(provider);
- hook.embed_segment_recap("seg-ws-recap", " \n\t ", 3.0).await;
+ hook.embed_segment_recap("seg-ws-recap", " \n\t ", 3.0)
+ .await;
let calls = recording.calls();
let methods: Vec<&str> = calls.iter().map(|c| c.method.as_str()).collect();
diff --git a/src/openhuman/modules/memory.rs b/src/openhuman/modules/memory.rs
index 806b6a022c..2f1a255b42 100644
--- a/src/openhuman/modules/memory.rs
+++ b/src/openhuman/modules/memory.rs
@@ -56,6 +56,14 @@ pub(crate) const ARTIFACT_CAPABILITIES_PIN: &str = "1.13.2";
/// *contract crate this host compiles against* declares; the loaded `cdylib` is
/// a specific release and may serve fewer families.
///
+/// Re-read at tag `v1.13.2` (openhuman#5820). v1.13.0 added a `MemoryEvent`
+/// variant and two additive audit fields, v1.13.1 fixed the module's
+/// source-registry path, v1.13.2 fixed the `Embed` wire order; none of those
+/// touched families. tinymemory#110 (in v1.13.2) did: it added `Scoring`
+/// (`ExtractEntities`, `EmbedText`, `EmbedderSlug`), which the artifact serves
+/// and which `as_scoring` below forwards, so it is advertised here in the same
+/// change, the way `Episodic` arrived with `as_episodic`.
+///
/// Read at tag `v1.3.0`. Unchanged from v1.2.0 — the release added members
/// within existing families (`retry_failed`, the diagnostics trio,
/// `backfill_in_progress`), not families — verified with
@@ -101,10 +109,9 @@ pub(crate) const ARTIFACT_CAPABILITIES: &[Capability] = &[
// module's declared `methods` list at that tag, which serves all ten.
Capability::SourceSync,
Capability::CodingSessions,
- // Arrived in v1.13.2 — the scoring family (ExtractEntities, EmbedText,
- // EmbedderSlug). PR #110 merged 2026-08-27T12:20Z; v1.13.1 was released
- // 95 min earlier (10:45Z) so it predates the merge. v1.13.2 (13:31Z) is the
- // first artifact to include it.
+ // Arrived in v1.13.2 (tinymemory#110): entity extraction, text embedding
+ // and embedder identification, served by the module's engine and forwarded
+ // by `MemoryScoring for ModuleMemoryProvider` below.
Capability::Scoring,
];
@@ -1094,6 +1101,26 @@ impl MemoryMaintenance for ModuleMemoryProvider {
}
}
+/// Bus deadline for the three calls that run a whole source sync inside the
+/// module: `RunConnectionSync`, `RunSourceSync` and `BootstrapConnection`.
+///
+/// tinybus gives every call a 30 s default deadline if nobody sets one, and a
+/// sync is routinely longer than that: one Gmail page is ~31 s end to end, an
+/// initial bootstrap of a connection is minutes. With the default, the caller
+/// was released with "call to `RunSourceSync` timed out after 30000ms" while
+/// the module kept fetching and ingesting, and finished; the UI reported a
+/// failure for work that succeeded (openhuman#5820). Same failure class, same
+/// fix as `IngestCodingSessions` above: the deadline here is the wedged-forever
+/// backstop tinybus requires, not a ceiling anyone is meant to hit.
+///
+/// Sized from the frontend's clamp, `PER_CALL_TIMEOUT_MAX_MS = 600 s`
+/// (`app/src/services/coreRpcClient.ts`): that is the longest wait any RPC
+/// caller can observe, so the bus must outlast it, plus [`INGEST_BUS_GRACE`]
+/// so the client's own abort, with its clean message, is the one that fires
+/// first when a run really does wedge.
+const SOURCE_SYNC_BUS_TIMEOUT: std::time::Duration =
+ std::time::Duration::from_secs(600).saturating_add(INGEST_BUS_GRACE);
+
#[async_trait]
impl MemorySourceSync for ModuleMemoryProvider {
async fn run_connection_sync(
@@ -1101,27 +1128,32 @@ impl MemorySourceSync for ModuleMemoryProvider {
toolkit: &str,
connection_id: &str,
) -> Result<SyncRunOutcome, MemoryError> {
- module_call!(
- self,
- "run_connection_sync",
- "RunConnectionSync",
- (toolkit, connection_id)
- )
+ self.proxy("run_connection_sync")
+ .await?
+ .with_timeout(SOURCE_SYNC_BUS_TIMEOUT)
+ .call("RunConnectionSync", (toolkit, connection_id))
+ .await
+ .map_err(|error| from_bus(&error))
}
async fn run_source_sync(&self, source_id: &str) -> Result<SyncRunOutcome, MemoryError> {
- module_call!(self, "run_source_sync", "RunSourceSync", (source_id,))
+ self.proxy("run_source_sync")
+ .await?
+ .with_timeout(SOURCE_SYNC_BUS_TIMEOUT)
+ .call("RunSourceSync", (source_id,))
+ .await
+ .map_err(|error| from_bus(&error))
}
async fn bootstrap_connection(
&self,
toolkit: &str,
connection_id: &str,
) -> Result<(), MemoryError> {
- module_call!(
- self,
- "bootstrap_connection",
- "BootstrapConnection",
- (toolkit, connection_id)
- )
+ self.proxy("bootstrap_connection")
+ .await?
+ .with_timeout(SOURCE_SYNC_BUS_TIMEOUT)
+ .call("BootstrapConnection", (toolkit, connection_id))
+ .await
+ .map_err(|error| from_bus(&error))
}
async fn is_toolkit_syncable(&self, toolkit: &str) -> Result<bool, MemoryError> {
module_call!(self, "is_toolkit_syncable", "IsToolkitSyncable", (toolkit,))