Skip to content

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

Bind a driver where the routed reads need one, and persist the config the probe re-reads\n\nThree test failures from routing these paths onto the contract, each a fixture\nthat no longer matched what the code does.\n\nThe two Notion cleanup tests wrote sync state through a client over their\nworkspace and then read the targets back through `binding::for_config`. With no\ndriver bound that resolves to the null driver, which serves nothing, so the read\nreported no targets — a green-looking assertion failure that says nothing about\nthe cleanup logic. They bind the TinyCortex driver, the same engine the module\nwraps.\n\n`api_key_falls_back_to_config_key_when_credential_store_is_empty` set the key on\na config it only ever held in memory. `api_key` answers from a LIVE re-read so a\nkey the user changes mid-session is followed, falling back to the install-time\nsnapshot only when that read fails; against a path with no file the re-read\nsucceeds with a default config and answers `None`. That is the fallback never\nfiring, not the fallback working, so the test now writes the config it expects to\nbe read.\n\nThe episodic redaction test used an untrusted external policy, which refuses the\ncall before redaction is reached — it asserted a refusal while claiming to assert\na scrub. Trusted is the state where the question is live.\n

Shanu5404ac1328ee
diff --git a/src/core/memory_cli.rs b/src/core/memory_cli.rs
index be0fa61070..e78bb45c93 100644
--- a/src/core/memory_cli.rs
+++ b/src/core/memory_cli.rs
@@ -15,7 +15,6 @@ use anyhow::Result;
use std::io::Read;
use std::path::PathBuf;
-use crate::openhuman::memory::api::provider::MemoryDocuments;
use crate::openhuman::memory::api::types::NamespaceDocumentInput;
/// Entry point for `openhuman memory <subcommand>`.
diff --git a/src/openhuman/integrations/composio/ops_tests.rs b/src/openhuman/integrations/composio/ops_tests.rs
index 723775bd3e..c2cf24f13e 100644
--- a/src/openhuman/integrations/composio/ops_tests.rs
+++ b/src/openhuman/integrations/composio/ops_tests.rs
@@ -921,6 +921,11 @@ async fn notion_cleanup_targets_include_synced_page_sources() {
crate::openhuman::memory::host_impls::install_for_tests();
let tmp = tempfile::tempdir().unwrap();
let config = test_config(&tmp);
+ // The cleanup targets are read back through the bound driver now, so the
+ // test has to bind one — the writes below go through a client over the
+ // same workspace, and an unbound config resolves to the null driver,
+ // which serves nothing and would report no targets at all.
+ crate::openhuman::memory::test_support::install_tinycortex_for_test(&config);
let memory = std::sync::Arc::new(
MemoryClient::from_workspace_dir(config.workspace_dir.clone())
.expect("memory client should initialise"),
@@ -958,6 +963,11 @@ async fn notion_cleanup_targets_surface_corrupt_sync_state() {
crate::openhuman::memory::host_impls::install_for_tests();
let tmp = tempfile::tempdir().unwrap();
let config = test_config(&tmp);
+ // The cleanup targets are read back through the bound driver now, so the
+ // test has to bind one — the writes below go through a client over the
+ // same workspace, and an unbound config resolves to the null driver,
+ // which serves nothing and would report no targets at all.
+ crate::openhuman::memory::test_support::install_tinycortex_for_test(&config);
let memory = std::sync::Arc::new(
MemoryClient::from_workspace_dir(config.workspace_dir.clone())
.expect("memory client should initialise"),
@@ -993,10 +1003,9 @@ async fn drive_cleanup_targets_are_connection_scoped() {
.expect("memory client should initialise"),
);
- let targets =
- composio_memory_targets_for_connection(&config, Some("google_drive"), "conn-1")
- .await
- .expect("drive cleanup targets should resolve");
+ let targets = composio_memory_targets_for_connection(&config, Some("google_drive"), "conn-1")
+ .await
+ .expect("drive cleanup targets should resolve");
assert!(targets.contains(&MemoryCleanupTarget::Exact(
SourceKind::Document,
diff --git a/src/openhuman/modules/memory_host_tests.rs b/src/openhuman/modules/memory_host_tests.rs
index da26907ebc..7baea0bcf8 100644
--- a/src/openhuman/modules/memory_host_tests.rs
+++ b/src/openhuman/modules/memory_host_tests.rs
@@ -189,6 +189,20 @@ async fn api_key_falls_back_to_config_key_when_credential_store_is_empty() {
config.workspace_dir = dir.path().join("workspace");
config.config_path = dir.path().join("config.toml");
config.composio.api_key = Some("direct-key-from-config".to_owned());
+
+ // Persisted, not only constructed. `api_key` answers from a LIVE re-read so
+ // that a key the user changes mid-session is followed, and falls back to the
+ // install-time snapshot only when that read fails. A config that exists only
+ // in memory is not the case this test means to cover — the re-read would
+ // succeed against an empty file and quietly answer `None`, which is the
+ // fallback never firing rather than the fallback working.
+ std::fs::create_dir_all(dir.path()).expect("config dir");
+ std::fs::write(
+ &config.config_path,
+ toml::to_string(&config).expect("serialise config"),
+ )
+ .expect("write config");
+
let callbacks = ComposioCallbacks(Arc::new(config));
let answer = call(&callbacks, "ApiKey", json!([]))