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
fix(ci): separate CLI features from core features in test workflow
Steven Enamakel7a8fca84aa05
diff --git a/.github/workflows/test-reusable.yml b/.github/workflows/test-reusable.ymlindex f436780ec0..d1bab5bf91 100644--- a/.github/workflows/test-reusable.yml+++ b/.github/workflows/test-reusable.yml@@ -218,17 +218,22 @@ jobs:# 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.- FEATURES="$(bash scripts/ci/product-features.sh),bin-tools"- echo "[test-reusable] feature set: ${FEATURES}"+ # `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;+ # naming a gate the package lacks is a hard error.+ FEATURES="$(bash scripts/ci/product-features.sh)"+ CLI_FEATURES="${FEATURES},bin-tools"+ echo "[test-reusable] feature set: ${FEATURES} (cli: ${CLI_FEATURES})"# `--features bin-tools` is load-bearing, not cosmetic: the ops binaries- # under crates/openhuman-core/src/bin/ declare `required-features = ["bin-tools"]`, so without+ # under crates/openhuman-cli/src/bin/ declare `required-features = ["bin-tools"]`, so without# it `--bins` silently skips them and this lane goes green having# compiled none of them. fleet.rs carries a `#[cfg(test)] mod`, so those# tests would vanish too, with no error.bash scripts/ci-cancel-aware.sh cargo test -p openhuman --lib --features "${FEATURES}"# The core binary and developer bins live in the CLI crate.- bash scripts/ci-cancel-aware.sh cargo test -p openhuman-cli --bins --features "${FEATURES}"+ bash scripts/ci-cancel-aware.sh cargo test -p openhuman-cli --bins --features "${CLI_FEATURES}"bash scripts/ci-cancel-aware.sh cargo test -p openhuman --doc --features "${FEATURES}"while IFS= read -r target; do@@ -237,7 +242,7 @@ jobs:while IFS= read -r module; do[ -n "${module}" ] || continueecho "[test-reusable] raw coverage module: ${module}"- bash scripts/ci-cancel-aware.sh cargo test -p openhuman-cli --features "${FEATURES}" --test "${target}" -- "${module}::" --test-threads=1+ bash scripts/ci-cancel-aware.sh cargo test -p openhuman-cli --features "${CLI_FEATURES}" --test "${target}" -- "${module}::" --test-threads=1done < <(raw_coverage_modules)elif [ "${target}" = "json_rpc_e2e" ]; then# JSON-RPC E2E cases change process-global provider routes and@@ -253,7 +258,7 @@ jobs:| sed -n 's/: test$//p')else- bash scripts/ci-cancel-aware.sh cargo test -p openhuman-cli --features "${FEATURES}" --test "${target}"+ bash scripts/ci-cancel-aware.sh cargo test -p openhuman-cli --features "${CLI_FEATURES}" --test "${target}"fidone < <(integration_test_targets)diff --git a/AGENTS.md b/AGENTS.mdindex 97fdb9526d..a75869e342 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -17,7 +17,7 @@ Architecture: [overview](gitbooks/developing/architecture.md),| `crates/openhuman-core/` | Package `openhuman`: business domains under `src/<domain>/`, transport/dispatch/auth under `src/core/` || `crates/openhuman-core/src/<domain>/` | Flat business-domain modules (agent, memory, tools, security, channels, ...) || `crates/openhuman-core/src/core/` | CLI, JSON-RPC and HTTP dispatch, controller registry, event bus, runtime composition; no business logic |-| `crates/openhuman-core/src/main.rs` | `openhuman-core` CLI |+| `crates/openhuman-cli/` | The `openhuman-core` binary (`src/main.rs`), the developer/benchmark bins (`src/bin/`), and every root `tests/*.rs` / `examples/*.rs` target; depends on `openhuman-tinyhumans` for the backend transport the core does not carry || `crates/openhuman-embed/` | Typed library facade for embedding the core in another product || `crates/openhuman-rpc/` | Shared RPC contracts, response decoding, and HTTP client used by app and TUI || `crates/openhuman-tinyhumans/` | The TinyHumans layer above embed: SDK-backed backend transport, a `RuntimeBuilder` that boots connected, and the host-side login/session owner (login-token exchange, `/auth/me`, current-user cache, credential handoff) used by app and TUI |@@ -61,7 +61,7 @@ pnpm test:coveragepnpm test:rustcargo check --manifest-path Cargo.toml-cargo build --manifest-path Cargo.toml --bin openhuman-core+cargo build --manifest-path Cargo.toml -p openhuman-cli --bin openhuman-corecargo check --manifest-path crates/openhuman-app/Cargo.toml# Standard root-crate validation@@ -107,15 +107,22 @@ coverage must be at least 80 percent.element types.- Tests must not call real backend or third-party services.- Avoid time-based flakes and real network access in unit tests.-- Root `tests/*.rs` and `examples/*.rs` are NOT auto-discovered (`autotests =- false`, `autoexamples = false` in `crates/openhuman-core/Cargo.toml`). Every- new file needs an explicit `[[test]]` / `[[example]]` entry with `path =- "../../tests/<name>.rs"`; `pnpm rust:layout`- (`scripts/ci/check-openhuman-rust-layout.mjs`) fails on missing or stale- entries, on inline `#[cfg(test)] mod` blocks, and on files named- `tests.rs`/`test.rs`. Files under `tests/raw_coverage/` are aggregated by- the root `build.rs` (`build = "../../build.rs"`) into the single- `raw_coverage_all` target and need no entry.+- Root `tests/*.rs` and `examples/*.rs` are targets of **`crates/openhuman-cli`**+ (the core is a library and declares no bin/test/example targets). They are+ NOT auto-discovered (`autotests = false`, `autoexamples = false`); every new+ file needs an explicit `[[test]]` / `[[example]]` entry in+ `crates/openhuman-cli/Cargo.toml` with `path = "../../tests/<name>.rs"`;+ `pnpm rust:layout` (`scripts/ci/check-openhuman-rust-layout.mjs`) fails on+ missing or stale entries, on any target table in the core manifest, on+ inline `#[cfg(test)] mod` blocks, and on files named `tests.rs`/`test.rs`.+ Files under `tests/raw_coverage/` are aggregated by the root `build.rs`+ (`build = "../../build.rs"`) into the single `raw_coverage_all` target and+ need no entry. Run them as `cargo test -p openhuman-cli --test <name>`.+- A suite that boots the core **in-process** and reaches the backend (mock)+ must call `tinyhumans_boot::boot()` from `tests/support/tinyhumans_boot.rs`+ first; the core has no backend transport of its own, and without it every+ backend call answers `BACKEND_UNAVAILABLE:`. Suites that spawn the+ `openhuman-core` binary get it from `main.rs`.Shared mock backend:diff --git a/package.json b/package.jsonindex e404819056..93a122208c 100644--- a/package.json+++ b/package.json@@ -56,7 +56,7 @@"profile:tauri": "cargo run --manifest-path crates/openhuman-app/profiling/Cargo.toml --","test:install-ps1": "pwsh -NoProfile -File scripts/tests/OpenHumanWindowsInstall.Tests.ps1","rust:check": "pnpm --filter openhuman-app rust:check",- "rust:clippy": "cargo clippy -p openhuman -- -D warnings && pnpm --filter openhuman-app rust:clippy",+ "rust:clippy": "cargo clippy -p openhuman -p openhuman-cli -p openhuman-tinyhumans -- -D warnings && pnpm --filter openhuman-app rust:clippy","rust:layout": "node scripts/ci/check-openhuman-rust-layout.mjs","dep:audit": "bash scripts/dep-audit/run.sh","agent:runtime-boundary": "node scripts/ci/check-agent-runtime-boundary.mjs",