Skip to content

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

fix(memory): resolve source-sync capability after the composio branch\n\nThe composio dispatch needs as_sources, not as_source_sync, and resolving\nthe latter first meant a driver serving sources without source_sync\nrejected composio syncs on a capability the path never uses (review\nfinding). The resolution now sits directly above its only consumer,\nrun_source_sync.\n

Shanub626c95f0ace
diff --git a/src/openhuman/memory/sources/rpc_part_01.rs b/src/openhuman/memory/sources/rpc_part_01.rs
index 0332270c57..8bd1cd0ede 100644
--- a/src/openhuman/memory/sources/rpc_part_01.rs
+++ b/src/openhuman/memory/sources/rpc_part_01.rs
@@ -513,12 +513,6 @@ pub async fn sync_rpc(req: SyncRequest) -> Result<RpcOutcome<SyncResponse>, Stri
// be a second read of the same file that can disagree with the one the
// pipeline actually applies.
let binding = crate::openhuman::memory::binding::for_config(&config)?;
- let sync = binding.provider().as_source_sync().ok_or_else(|| {
- format!(
- "the bound memory driver '{}' does not serve source sync",
- binding.driver_id()
- )
- })?;
// The enabled gate is not the driver's. `run_source_sync` runs whatever id
// it is handed; it is `sources::sync::sync_source` and the periodic loop
// that refuse a disabled entry, and this RPC is the third caller, the one
@@ -558,6 +552,16 @@ pub async fn sync_rpc(req: SyncRequest) -> Result<RpcOutcome<SyncResponse>, Stri
));
}
}
+ // Resolved after the composio branch on purpose: the connector-backed
+ // dispatch above needs `as_sources`, not `as_source_sync`, and a driver
+ // serving the former without the latter must not fail a composio sync on
+ // a capability it never uses (review finding on #5932).
+ let sync = binding.provider().as_source_sync().ok_or_else(|| {
+ format!(
+ "the bound memory driver '{}' does not serve source sync",
+ binding.driver_id()
+ )
+ })?;
sync.run_source_sync(&req.source_id)
.await
.map_err(|error| error.to_string())?;