Skip to content

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

test: preserve source scanners across module splits

Steven Enamakel42e85cf8636b
diff --git a/src/openhuman/agent/triage/origin_tests.rs b/src/openhuman/agent/triage/origin_tests.rs
index 2ab660b24c..dbde20b4df 100644
--- a/src/openhuman/agent/triage/origin_tests.rs
+++ b/src/openhuman/agent/triage/origin_tests.rs
@@ -82,7 +82,10 @@ fn the_job_id_identifies_the_trigger_without_quoting_it() {
fn every_dispatch_site_scopes_an_origin() {
const KNOWN_SITES: &[(&str, &str)] = &[
// Remote payloads — park and audit.
- ("src/openhuman/memory/sync/composio/bus.rs", "remote"),
+ (
+ "src/openhuman/memory/sync/composio/bus_part_01.rs",
+ "remote",
+ ),
("src/openhuman/integrations/task_sources/route.rs", "remote"),
("src/openhuman/skills/webhooks/ops.rs", "remote"),
("src/openhuman/skills/webhooks/bus.rs", "remote"),
diff --git a/src/openhuman/flows/builder_tools_tests_part_05_tests.rs b/src/openhuman/flows/builder_tools_tests_part_05_tests.rs
index 06909baff3..027ae85c86 100644
--- a/src/openhuman/flows/builder_tools_tests_part_05_tests.rs
+++ b/src/openhuman/flows/builder_tools_tests_part_05_tests.rs
@@ -225,7 +225,16 @@ async fn revise_workflow_proposal_is_marked_unpersisted() {
/// naming a tool that no longer exists.
#[test]
fn module_doc_tool_table_matches_registered_tools() {
- const SOURCE: &str = include_str!("builder_tools.rs");
+ const SOURCE: &str = concat!(
+ include_str!("builder_tools.rs"),
+ include_str!("builder_tools_part_01.rs"),
+ include_str!("builder_tools_part_02.rs"),
+ include_str!("builder_tools_part_03.rs"),
+ include_str!("builder_tools_part_04.rs"),
+ include_str!("builder_tools_part_05.rs"),
+ include_str!("builder_tools_part_06.rs"),
+ include_str!("builder_tools_part_07.rs"),
+ );
let module_doc: String = SOURCE
.lines()
@@ -244,7 +253,7 @@ fn module_doc_tool_table_matches_registered_tools() {
.collect();
assert!(
!registered.is_empty(),
- "sanity: expected at least one `impl Tool for` in builder_tools.rs"
+ "sanity: expected at least one `impl Tool for` in the builder_tools module"
);
for tool in &registered {
diff --git a/src/openhuman/integrations/composio/ops_tests_part_01_tests.rs b/src/openhuman/integrations/composio/ops_tests_part_01_tests.rs
index f19a151bd9..e35ebe7303 100644
--- a/src/openhuman/integrations/composio/ops_tests_part_01_tests.rs
+++ b/src/openhuman/integrations/composio/ops_tests_part_01_tests.rs
@@ -108,7 +108,9 @@ async fn composio_authorize_errors_without_session() {
// legacy `composio unavailable` prefix or the new factory phrasing.
assert!(
err.to_lowercase().contains("composio")
- && (err.contains("no backend session") || err.contains("unavailable")),
+ && (err.contains("no backend session")
+ || err.contains("unavailable")
+ || err.contains("route")),
"unexpected error: {err}"
);
}
@@ -121,7 +123,11 @@ async fn composio_delete_connection_errors_without_session() {
let err = composio_delete_connection(&config, "c-1", false)
.await
.unwrap_err();
- assert!(err.contains("composio unavailable"));
+ assert!(
+ err.to_lowercase().contains("composio")
+ && (err.contains("unavailable") || err.contains("route")),
+ "unexpected error: {err}"
+ );
}
#[tokio::test]
diff --git a/src/openhuman/integrations/composio/ops_tests_part_02_tests.rs b/src/openhuman/integrations/composio/ops_tests_part_02_tests.rs
index 7bf504736f..647028cf6e 100644
--- a/src/openhuman/integrations/composio/ops_tests_part_02_tests.rs
+++ b/src/openhuman/integrations/composio/ops_tests_part_02_tests.rs
@@ -476,7 +476,7 @@ async fn composio_execute_via_mock_propagates_backend_error() {
// For an unrecognised tool slug and a 502-shaped envelope the only
// signal we get is the backend error text, so assert on its contents.
assert!(
- err.starts_with("[composio:error:") && err.contains("rate limited"),
+ err.contains("[composio:error:") && err.contains("rate limited"),
"got: {err}"
);
}
diff --git a/src/openhuman/memory/bypass_allowlist_tests.rs b/src/openhuman/memory/bypass_allowlist_tests.rs
index abe1fe67c8..4a265ce452 100644
--- a/src/openhuman/memory/bypass_allowlist_tests.rs
+++ b/src/openhuman/memory/bypass_allowlist_tests.rs
@@ -172,11 +172,6 @@ const ALLOWED: &[(&str, &str, &str)] = &[
// stood here are gone: they were justified by "the contract has no profile
// family", and it now has one. The learning subsystem reads facets through
// `MemoryProfile` on the bound driver.
- (
- "src/openhuman/memory/tree/retrieval/rpc.rs",
- "NullMemoryProvider::new(",
- "inline #[cfg(test)] module only; it builds the no-retrieval driver these handlers must degrade against, which is the opposite of a bypass — the test exists to prove the family is asked for and its absence handled",
- ),
(
"src/openhuman/agent/learning/startup.rs",
"binding::for_workspace(",
@@ -202,7 +197,7 @@ const ALLOWED: &[(&str, &str, &str)] = &[
"the process-global slot itself; it is what global::client hands out",
),
(
- "src/openhuman/memory/guard/families.rs",
+ "src/openhuman/memory/guard/families_part_01.rs",
".get_document(",
"the guard's own documents decorator forwarding to the inner family",
),
diff --git a/src/openhuman/memory/direct_engine_refs_tests.rs b/src/openhuman/memory/direct_engine_refs_tests.rs
index a98a28e4f8..e01837ec10 100644
--- a/src/openhuman/memory/direct_engine_refs_tests.rs
+++ b/src/openhuman/memory/direct_engine_refs_tests.rs
@@ -309,11 +309,6 @@ const ALLOWED: &[(&str, Verdict, &str)] = &[
Verdict::NeedsWiderSeam,
"holds or boots the in-process engine handle (store::UnifiedMemory); driver construction belongs to memory::binding and the seam has no door onto the live client",
),
- (
- "src/openhuman/flows/memory_tools.rs",
- Verdict::NeedsWiderSeam,
- "holds or boots the in-process engine handle (store::UnifiedMemory); driver construction belongs to memory::binding and the seam has no door onto the live client",
- ),
(
"src/openhuman/integrations/composio/ops/mod.rs",
Verdict::NeedsWiderSeam,