The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(tests): rename raw coverage suites to domain names
Steven Enamakelf5b50e923834
diff --git a/crates/openhuman-cli/src/bin/README.md b/crates/openhuman-cli/src/bin/README.mdindex 386dd13a98..dc5977b04c 100644--- a/crates/openhuman-cli/src/bin/README.md+++ b/crates/openhuman-cli/src/bin/README.md@@ -41,7 +41,7 @@ through `env!("CARGO_BIN_EXE_test-mcp-stub")`, which makes Cargo build it forevery test run: [`tests/mcp_registry_e2e.rs`](../../../../tests/mcp_registry_e2e.rs),[`tests/mcp_registry_multi_server.rs`](../../../../tests/mcp_registry_multi_server.rs), [`tests/agent_harness_e2e.rs`](../../../../tests/agent_harness_e2e.rs),[`tests/json_rpc_e2e.rs`](../../../../tests/json_rpc_e2e.rs), [`tests/in_process/domain_modules_e2e.rs`](../../../../tests/in_process/domain_modules_e2e.rs) and-[`tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs`](../../../../tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs).+[`tests/raw_coverage/tool_registry_approval_e2e.rs`](../../../../tests/raw_coverage/tool_registry_approval_e2e.rs).### openhuman-fleetdiff --git a/crates/openhuman-core/src/tools/registry/README.md b/crates/openhuman-core/src/tools/registry/README.mdindex 0620e136b3..cbaf73d843 100644--- a/crates/openhuman-core/src/tools/registry/README.md+++ b/crates/openhuman-core/src/tools/registry/README.md@@ -60,7 +60,7 @@ No owned persistence. `diagnostics()` reads the MCP write-audit log through `cra- `crates/openhuman-core/src/core/all.rs`: registers controllers/schemas and routes the `tool_registry` namespace.- `crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs`: calls `tinytools::registry::denials::record(...)` when a tool call is denied or requires approval.- `crates/openhuman-core/src/platform/about_app/catalog_conversation_intelligence.rs`: the `intelligence.tool_registry` capability entry points users at `openhuman.tool_registry_list` / `openhuman.tool_registry_get`.-- `tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs` and siblings: exercise `denials`, `ops::diagnostics_for_config`, and the provider registry directly.+- `tests/raw_coverage/tool_registry_approval_e2e.rs` and siblings: exercise `denials`, `ops::diagnostics_for_config`, and the provider registry directly.## Notes / gotchasdiff --git a/scripts/test-rust-with-mock.sh b/scripts/test-rust-with-mock.shindex d2c142a423..706505843e 100755--- a/scripts/test-rust-with-mock.sh+++ b/scripts/test-rust-with-mock.sh@@ -240,10 +240,8 @@ run_raw_coverage_modules() {# Most Composio raw-coverage modules explicitly exercise the absent-module# path. These groups verify the host-to-module round trip, so inject the# pinned connector only for their processes.- if { [ "$module" = "composio_credentials_state_raw_coverage_e2e" ] ||- [ "$module" = "composio_tools_direct_raw_coverage_e2e" ] ||- [ "$module" = "tools_composio_large_round25_raw_coverage_e2e" ]; } &&- true; then+ if [ "$module" = "composio_direct_client_e2e" ] ||+ [ "$module" = "composio_direct_tools_e2e" ]; thenOPENHUMAN_MODULE_PATH="$connectors_module_path" \cargo_test --test raw_coverage_all -- "${module}::" --test-threads=1 "$@"elif [ "$module" = "automation_scheduling_e2e" ]; thendiff --git a/tests/README.md b/tests/README.mdindex 43b7374ec7..8fac59e09d 100644--- a/tests/README.md+++ b/tests/README.md@@ -10,7 +10,7 @@ the crate, but every file here compiles against and links `openhuman_core::`| Path | Purpose || --- | --- || `*.rs` | Integration/E2E targets, one Cargo `[[test]]` per file. [`json_rpc_e2e.rs`](./json_rpc_e2e.rs) is the canonical home for JSON-RPC behavior (see [`AGENTS.md`](../AGENTS.md)). |-| [`raw_coverage/*.rs`](./raw_coverage) | Coverage suites (~30 files, mostly `*_raw_coverage_e2e.rs` plus some `*_e2e.rs`) compiled as modules of a single `raw_coverage_all` target instead of standalone binaries. `raw_coverage/w4_shared/mod.rs` is a shared harness three of them pull in with `#[path]`, not a suite. |+| [`raw_coverage/*.rs`](./raw_coverage) | Domain-named coverage suites compiled as modules of a single `raw_coverage_all` target instead of standalone binaries. `raw_coverage/w4_shared/mod.rs` is a shared harness three of them pull in with `#[path]`, not a suite. || [`raw_coverage_all.rs`](./raw_coverage_all.rs) | Aggregator: includes every top-level `raw_coverage/*.rs` file as a module. The module list is generated by root [`build.rs`](../build.rs) into `$OUT_DIR/raw_coverage_mods.rs`, so a new `raw_coverage/` file is picked up automatically with no manual registration. A file's own `#![cfg(...)]` gate still applies to just that module, and suites that mutate process-global env serialize on `SHARED_ENV_LOCK`, since they now share one process instead of one per file (see the file's own doc comment for the full rationale). || [`in_process/*.rs`](./in_process) | The in-process router and public-API suites (~20 files, formerly one `[[test]]` each) compiled as modules of a single `in_process_all` target, globbed by `build.rs` into `$OUT_DIR/in_process_mods.rs` exactly like `raw_coverage/`. No `required-features`. They share one process, so env mutation holds `env_guard::env_lock()`, the RPC bearer comes from `rpc_auth::rpc_token()` (never a per-file constant: `RPC_TOKEN` is first-writer-wins), and the backend transport is installed once through `tinyhumans_boot::boot()`. CI runs one process per module (`-- <module>::`). Run one with `cargo test -p openhuman-cli --test in_process_all <module>::`. || [`support/`](./support) | Helpers pulled into targets with `#[path]` ([`env_guard.rs`](./support/env_guard.rs) for `EnvVarGuard` + `env_lock`, [`rpc_auth.rs`](./support/rpc_auth.rs), [`tinyhumans_boot.rs`](./support/tinyhumans_boot.rs), `noop_memory.rs`, `memory_module.rs`, ...) because integration targets can't see `pub(crate)` items from the crate under test. |diff --git a/tests/in_process/agent_approval_memory_coverage_e2e.rs b/tests/in_process/agent_approval_memory_coverage_e2e.rsindex 922f701657..cc92ee8f8b 100644--- a/tests/in_process/agent_approval_memory_coverage_e2e.rs+++ b/tests/in_process/agent_approval_memory_coverage_e2e.rs@@ -6,7 +6,7 @@//! The eight controllers here span three families whose existing raw-coverage//! files are already 2–4k lines each, and several of these tests need a//! *clean* process-global approval gate. Sharing a file with-//! `tool_registry_approval_raw_coverage_e2e.rs` would make them order-dependent+//! `tool_registry_approval_e2e.rs` would make them order-dependent//! on whether a sibling test already installed the gate — the exact reason that//! file documents for skipping `preauthorize_flow`'s success path//! (see its `approval_schema_handlers_validate_params_and_surface_empty_gate_state`).@@ -235,7 +235,7 @@ async fn approval_get_gate_state_returns_a_consistent_boot_snapshot() {/// installs a **process-global** `OnceLock`. Doing that here would change what/// `approval_get_gate_state_returns_a_consistent_boot_snapshot` observes in the/// same binary, making the pair order-dependent — the identical reason-/// `tool_registry_approval_raw_coverage_e2e.rs` gives for skipping this path.+/// `tool_registry_approval_e2e.rs` gives for skipping this path./// Grant idempotency ("already-trusted tools are reported, not re-granted") is/// covered by the unit tests in `approval::rpc` / `approval::store`, which own/// the gate lifecycle.diff --git a/tests/raw_coverage_all.rs b/tests/raw_coverage_all.rsindex 4d4e359629..60d79140c1 100644--- a/tests/raw_coverage_all.rs+++ b/tests/raw_coverage_all.rs@@ -1,6 +1,6 @@//! Aggregated integration-test target for the `tests/raw_coverage/` suites.//!-//! Each `tests/raw_coverage/*_raw_coverage_e2e.rs` file is included here as a+//! Each `tests/raw_coverage/*.rs` suite is included here as a//! module instead of being its own `tests/*.rs` target. Cargo builds one test//! binary for this file rather than ~76, so the (large) `openhuman` rlib is//! linked once instead of once per file. The module list is generated by