Skip to content

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

chore(tests): consolidate in-process e2e tests under a single module

Steven Enamakel2f38e727f254
diff --git a/crates/openhuman-cli/Cargo.toml b/crates/openhuman-cli/Cargo.toml
index 37dcd896b2..5b08656d59 100644
--- a/crates/openhuman-cli/Cargo.toml
+++ b/crates/openhuman-cli/Cargo.toml
@@ -153,37 +153,16 @@ path = "../../tests/raw_coverage_all.rs"
# gate's `tinychannels/email`) and the local inference download service.
required-features = ["voice", "inference"]
-[[test]]
-name = "agent_approval_memory_coverage_e2e"
-path = "../../tests/agent_approval_memory_coverage_e2e.rs"
-[[test]]
-name = "agent_builder_public"
-path = "../../tests/agent_builder_public.rs"
[[test]]
name = "agent_harness_e2e"
path = "../../tests/agent_harness_e2e.rs"
-[[test]]
-name = "agent_prompt_comprehension_e2e"
-path = "../../tests/agent_prompt_comprehension_e2e.rs"
-[[test]]
-name = "agent_harness_public"
-path = "../../tests/agent_harness_public.rs"
-[[test]]
-name = "agent_turn_overrides_e2e"
-path = "../../tests/agent_turn_overrides_e2e.rs"
-[[test]]
-name = "calendar_grounding_e2e"
-path = "../../tests/calendar_grounding_e2e.rs"
-[[test]]
-name = "channels_default_channel_e2e"
-path = "../../tests/channels_default_channel_e2e.rs"
[[test]]
name = "cli_model_overrides_e2e"
@@ -193,21 +172,12 @@ path = "../../tests/cli_model_overrides_e2e.rs"
name = "cli_sigpipe"
path = "../../tests/cli_sigpipe.rs"
-[[test]]
-name = "config_auth_app_state_connectivity_e2e"
-path = "../../tests/config_auth_app_state_connectivity_e2e.rs"
[[test]]
name = "cwd_jail_e2e"
path = "../../tests/cwd_jail_e2e.rs"
-[[test]]
-name = "domain_modules_e2e"
-path = "../../tests/domain_modules_e2e.rs"
-[[test]]
-name = "embeddings_rpc_e2e"
-path = "../../tests/embeddings_rpc_e2e.rs"
[[test]]
name = "inference_provider_e2e"
@@ -246,9 +216,6 @@ name = "media_generation_e2e"
path = "../../tests/media_generation_e2e.rs"
required-features = ["media"]
-[[test]]
-name = "memory_graph_roundtrip_e2e"
-path = "../../tests/memory_graph_roundtrip_e2e.rs"
[[test]]
# Memory-engine selection over JSON-RPC against a hosted-CortexDB double.
@@ -274,49 +241,22 @@ required-features = ["modules", "memory-remote"]
name = "memory_roundtrip_e2e"
path = "../../tests/memory_roundtrip_e2e.rs"
-[[test]]
-name = "memory_sources_e2e"
-path = "../../tests/memory_sources_e2e.rs"
-[[test]]
-name = "memory_tree_health_e2e"
-path = "../../tests/memory_tree_health_e2e.rs"
-[[test]]
-name = "tree_summarizer_e2e"
-path = "../../tests/tree_summarizer_e2e.rs"
[[test]]
name = "observability_wallet_expected_e2e"
path = "../../tests/observability_wallet_expected_e2e.rs"
-[[test]]
-name = "orchestrator_parallel_fanout_routing"
-path = "../../tests/orchestrator_parallel_fanout_routing.rs"
-[[test]]
-name = "orchestrator_presentation_wiring"
-path = "../../tests/orchestrator_presentation_wiring.rs"
-[[test]]
-name = "skill_registry_e2e"
-path = "../../tests/skill_registry_e2e.rs"
[[test]]
name = "skills_mcp_registry_live"
path = "../../tests/skills_mcp_registry_live.rs"
-[[test]]
-name = "transcript_search_e2e"
-path = "../../tests/transcript_search_e2e.rs"
-[[test]]
-name = "worker_b_domain_e2e"
-path = "../../tests/worker_b_domain_e2e.rs"
-[[test]]
-name = "worker_c_modules_e2e"
-path = "../../tests/worker_c_modules_e2e.rs"
[[example]]
name = "embed_headless"
diff --git a/tests/agent_approval_memory_coverage_e2e.rs b/tests/in_process/agent_approval_memory_coverage_e2e.rs
similarity index 100%
rename from tests/agent_approval_memory_coverage_e2e.rs
rename to tests/in_process/agent_approval_memory_coverage_e2e.rs
diff --git a/tests/agent_builder_public.rs b/tests/in_process/agent_builder_public.rs
similarity index 100%
rename from tests/agent_builder_public.rs
rename to tests/in_process/agent_builder_public.rs
diff --git a/tests/agent_harness_public.rs b/tests/in_process/agent_harness_public.rs
similarity index 100%
rename from tests/agent_harness_public.rs
rename to tests/in_process/agent_harness_public.rs
diff --git a/tests/agent_prompt_comprehension_e2e.rs b/tests/in_process/agent_prompt_comprehension_e2e.rs
similarity index 100%
rename from tests/agent_prompt_comprehension_e2e.rs
rename to tests/in_process/agent_prompt_comprehension_e2e.rs
diff --git a/tests/agent_turn_overrides_e2e.rs b/tests/in_process/agent_turn_overrides_e2e.rs
similarity index 100%
rename from tests/agent_turn_overrides_e2e.rs
rename to tests/in_process/agent_turn_overrides_e2e.rs
diff --git a/tests/calendar_grounding_e2e.rs b/tests/in_process/calendar_grounding_e2e.rs
similarity index 100%
rename from tests/calendar_grounding_e2e.rs
rename to tests/in_process/calendar_grounding_e2e.rs
diff --git a/tests/channels_default_channel_e2e.rs b/tests/in_process/channels_default_channel_e2e.rs
similarity index 100%
rename from tests/channels_default_channel_e2e.rs
rename to tests/in_process/channels_default_channel_e2e.rs
diff --git a/tests/config_auth_app_state_connectivity_e2e.rs b/tests/in_process/config_auth_app_state_connectivity_e2e.rs
similarity index 100%
rename from tests/config_auth_app_state_connectivity_e2e.rs
rename to tests/in_process/config_auth_app_state_connectivity_e2e.rs
diff --git a/tests/domain_modules_e2e.rs b/tests/in_process/domain_modules_e2e.rs
similarity index 100%
rename from tests/domain_modules_e2e.rs
rename to tests/in_process/domain_modules_e2e.rs
diff --git a/tests/embeddings_rpc_e2e.rs b/tests/in_process/embeddings_rpc_e2e.rs
similarity index 100%
rename from tests/embeddings_rpc_e2e.rs
rename to tests/in_process/embeddings_rpc_e2e.rs
diff --git a/tests/memory_graph_roundtrip_e2e.rs b/tests/in_process/memory_graph_roundtrip_e2e.rs
similarity index 100%
rename from tests/memory_graph_roundtrip_e2e.rs
rename to tests/in_process/memory_graph_roundtrip_e2e.rs
diff --git a/tests/memory_sources_e2e.rs b/tests/in_process/memory_sources_e2e.rs
similarity index 100%
rename from tests/memory_sources_e2e.rs
rename to tests/in_process/memory_sources_e2e.rs
diff --git a/tests/memory_tree_health_e2e.rs b/tests/in_process/memory_tree_health_e2e.rs
similarity index 100%
rename from tests/memory_tree_health_e2e.rs
rename to tests/in_process/memory_tree_health_e2e.rs
diff --git a/tests/orchestrator_parallel_fanout_routing.rs b/tests/in_process/orchestrator_parallel_fanout_routing.rs
similarity index 100%
rename from tests/orchestrator_parallel_fanout_routing.rs
rename to tests/in_process/orchestrator_parallel_fanout_routing.rs
diff --git a/tests/orchestrator_presentation_wiring.rs b/tests/in_process/orchestrator_presentation_wiring.rs
similarity index 100%
rename from tests/orchestrator_presentation_wiring.rs
rename to tests/in_process/orchestrator_presentation_wiring.rs
diff --git a/tests/skill_registry_e2e.rs b/tests/in_process/skill_registry_e2e.rs
similarity index 100%
rename from tests/skill_registry_e2e.rs
rename to tests/in_process/skill_registry_e2e.rs
diff --git a/tests/transcript_search_e2e.rs b/tests/in_process/transcript_search_e2e.rs
similarity index 100%
rename from tests/transcript_search_e2e.rs
rename to tests/in_process/transcript_search_e2e.rs
diff --git a/tests/tree_summarizer_e2e.rs b/tests/in_process/tree_summarizer_e2e.rs
similarity index 100%
rename from tests/tree_summarizer_e2e.rs
rename to tests/in_process/tree_summarizer_e2e.rs
diff --git a/tests/worker_b_domain_e2e.rs b/tests/in_process/worker_b_domain_e2e.rs
similarity index 100%
rename from tests/worker_b_domain_e2e.rs
rename to tests/in_process/worker_b_domain_e2e.rs
diff --git a/tests/worker_c_modules_e2e.rs b/tests/in_process/worker_c_modules_e2e.rs
similarity index 100%
rename from tests/worker_c_modules_e2e.rs
rename to tests/in_process/worker_c_modules_e2e.rs
diff --git a/tests/in_process_all.rs b/tests/in_process_all.rs
new file mode 100644
index 0000000000..433ee3fc4f
--- /dev/null
+++ b/tests/in_process_all.rs
@@ -0,0 +1,39 @@
+//! Aggregated integration-test target for the `tests/in_process/` suites.
+//!
+//! Each file under `tests/in_process/` boots the core router (or drives a
+//! public API) inside the test process. They used to be ~20 separate
+//! `tests/*.rs` targets, and every target statically relinks the whole
+//! `openhuman` rlib, so the test build paid ~20 full-crate link steps. Folding
+//! them into this one target links once. The module list is generated by
+//! `build.rs` (`in_process_mods.rs`), so a new `tests/in_process/*.rs` file is
+//! picked up automatically and cannot be skipped.
+//!
+//! Sharing a process is what makes three pieces of global state explicit:
+//!
+//! - **Env.** Suites that mutate process env (`HOME`, `OPENHUMAN_WORKSPACE`,
+//! backend-URL overrides, ...) hold `env_guard::env_lock()` for the whole
+//! test, so they serialize against each other while env-free tests still run
+//! in parallel.
+//! - **RPC bearer.** `core::auth::RPC_TOKEN` is first-writer-wins, so suites
+//! read the live token through `rpc_auth::rpc_token()` instead of choosing
+//! their own.
+//! - **Backend transport.** `tinyhumans_boot::boot()` installs the SDK-backed
+//! transport once for the process.
+//!
+//! Suites that need a process of their own (global `OnceCell`s, a real
+//! keyring, binary spawning) stay separate `[[test]]` targets.
+
+#![allow(dead_code, unused_imports)]
+
+#[path = "support/env_guard.rs"]
+pub mod env_guard;
+#[path = "support/memory_module.rs"]
+pub mod memory_module;
+#[path = "support/noop_memory.rs"]
+pub mod noop_memory;
+#[path = "support/rpc_auth.rs"]
+pub mod rpc_auth;
+#[path = "support/tinyhumans_boot.rs"]
+pub mod tinyhumans_boot;
+
+include!(concat!(env!("OUT_DIR"), "/in_process_mods.rs"));