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
docs(tests): update references to split json_rpc e2e targets
Steven Enamakeldfbb90a44518
diff --git a/.github/workflows/test-reusable.yml b/.github/workflows/test-reusable.ymlindex b57f6e8743..a662748072 100644--- a/.github/workflows/test-reusable.yml+++ b/.github/workflows/test-reusable.yml@@ -221,10 +221,10 @@ jobs:## The same silent-skip trap the bin-tools note below describes (for openhuman-fleet) applies# here, and harder: four tests/*.rs targets carry `required-features`- # (observability_smoke, x402_twit_sh_live, json_rpc_e2e,+ # (observability_smoke, x402_twit_sh_live, json_rpc_*_e2e,# raw_coverage_all — see Cargo.toml). Without these features- # `cargo test --test json_rpc_e2e` matches NOTHING and exits 0, and- # json_rpc_e2e alone is >12k lines of RPC contract coverage.+ # `cargo test --tests` skips them without the product feature set.+ # Each JSON-RPC namespace is a separately registered test target.# `bin-tools` is a gate of the CLI crate (not the core library), so# it is added only on the `openhuman-cli` invocations below. Bare# `--features` names resolve against the package a command selects;diff --git a/build.rs b/build.rsindex 043aec6ccd..c448a361a6 100644--- a/build.rs+++ b/build.rs@@ -19,12 +19,12 @@//!//! # Second job: make an unmet `required-features` skip audible//!-//! Four `tests/*.rs` targets carry `required-features` (see `[[test]]` in+//! Several `tests/*.rs` targets carry `required-features` (see `[[test]]` in//! `Cargo.toml`), and every one of those features is default-OFF for//! contributors. Cargo treats the two ways of selecting a target differently,//! and only one of them is safe://!-//! - **Naming it** — `cargo test --test json_rpc_e2e` — is a hard error when+//! - **Naming it** — `cargo test --test json_rpc_threads_e2e` — is a hard error when//! the features are unmet (`target ... requires the features: voice`,//! exit 101). CI names its targets one at a time, so CI cannot lose one this//! way.@@ -32,7 +32,7 @@//! target out **silently and exits 0**. That is what a contributor runs, and//! it reports a green suite having compiled and run none of them.//!-//! `json_rpc_e2e` alone is >12k lines of RPC contract coverage, and+//! The JSON-RPC coverage is split across ten namespace targets, and//! `raw_coverage_all` aggregates ~76 suites. A green run that skipped both//! reads exactly like a green run that did not, which is how untested code//! comes to look covered.@@ -197,7 +197,7 @@ fn warn_about_silently_skipped_test_targets(manifest_dir: &Path) {configuration and still exits 0: {detail}. Run them with `--features {features_flag}`, \or use the product set: cargo test --features \"$(bash \scripts/ci/product-features.sh)\". Naming a target explicitly (cargo test --test \- json_rpc_e2e) errors instead of skipping — only the globbed form is silent."+ json_rpc_threads_e2e) errors instead of skipping — only the globbed form is silent.");}diff --git a/scripts/check-domain-e2e-coverage.mjs b/scripts/check-domain-e2e-coverage.mjsindex b5f4866e1f..9f856e0e3e 100644--- a/scripts/check-domain-e2e-coverage.mjs+++ b/scripts/check-domain-e2e-coverage.mjs@@ -176,7 +176,7 @@ function read(file) {* - Ignoring bare list entries: not separable by line shape. rustfmt puts a* long call's method argument on its own line, so an invocation and a list* element look identical (`"openhuman.flows_create",` is a list entry by- * shape and a real `post_json_rpc` argument at `json_rpc_e2e.rs:11049`).+ * shape and a real `post_json_rpc` argument in the JSON-RPC E2E targets).* Telling them apart needs an AST, which is a different tool than this.** So: a method credited here is *named* by an e2e target, not provably invokeddiff --git a/scripts/test-rust-with-mock.sh b/scripts/test-rust-with-mock.shindex 885bb28f5a..2334366e70 100755--- a/scripts/test-rust-with-mock.sh+++ b/scripts/test-rust-with-mock.sh@@ -363,7 +363,7 @@ run_full_suite() {run_raw_coverage_modules "$@"elif [ "$target" = "in_process_all" ]; thenrun_in_process_modules "$@"- elif [ "$target" = "json_rpc_e2e" ]; then+ elif [[ "$target" =~ ^json_rpc_.*_e2e$ ]]; thenrun_json_rpc_e2e "$@"elif [ "$target" = "tinymcp_storage_smoke_e2e" ]; thenOPENHUMAN_MODULE_PATH="$tinymcp_dir${OPENHUMAN_MODULE_PATH:+:$OPENHUMAN_MODULE_PATH}" \diff --git a/tests/README.md b/tests/README.mdindex 8fac59e09d..039ec3a01d 100644--- a/tests/README.md+++ b/tests/README.md@@ -9,7 +9,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)). |+| `*.rs` | Integration/E2E targets, one Cargo `[[test]]` per file. JSON-RPC behavior is grouped into namespace targets such as [`json_rpc_threads_e2e.rs`](./json_rpc_threads_e2e.rs); their shared setup lives in [`support/rpc_e2e_harness.rs`](./support/rpc_e2e_harness.rs). || [`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>::`. |@@ -39,7 +39,7 @@ path = "../../tests/<name>.rs"The same applies to `examples/*.rs` via `[[example]]`. Some targets carry`required-features` (e.g. `observability_smoke` needs `crash-reporting`,-`x402_twit_sh_live` needs `web3`, `json_rpc_e2e` needs `voice`,+`x402_twit_sh_live` needs `web3`, the `json_rpc_*_e2e` targets need `voice`,`raw_coverage_all` needs `voice` and `inference`); all of those are off in thedefault contributor build, and a bare `cargo test` skips such targets silently(root `build.rs` emits a `cargo::warning` naming them).diff --git a/tests/support/rpc_e2e_harness.rs b/tests/support/rpc_e2e_harness.rsindex 66ea483b42..c839a33a6f 100644--- a/tests/support/rpc_e2e_harness.rs+++ b/tests/support/rpc_e2e_harness.rs@@ -1,7 +1,7 @@//! HTTP JSON-RPC integration tests against a real axum stack and a mock upstream API.//!//! Isolates config under a temp `HOME` so auth profiles and the OpenHuman provider resolve-//! the same state directory. Run with: `cargo test --test json_rpc_e2e`+//! the same state directory. Run a namespace with `cargo test -p openhuman-cli --test json_rpc_<namespace>_e2e`.#[path = "tinyhumans_boot.rs"]pub mod tinyhumans_boot;