Skip to content

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

docs: update documentation to reflect binary and test ownership moved to openhuman-cli

Steven Enamakel16b295629eef
diff --git a/crates/openhuman-cli/src/bin/README.md b/crates/openhuman-cli/src/bin/README.md
index 47ddcedac9..a2526435c4 100644
--- a/crates/openhuman-cli/src/bin/README.md
+++ b/crates/openhuman-cli/src/bin/README.md
@@ -1,7 +1,7 @@
# bin
Auxiliary binaries declared as `[[bin]]` targets in
-`crates/openhuman-core/Cargo.toml` next to the primary `openhuman-core`
+`crates/openhuman-cli/Cargo.toml` next to the primary `openhuman-core`
binary (`src/main.rs`). None of these ship in the desktop product.
## Primary binary (not in this directory)
diff --git a/crates/openhuman-core/README.md b/crates/openhuman-core/README.md
index 506581454b..e609163254 100644
--- a/crates/openhuman-core/README.md
+++ b/crates/openhuman-core/README.md
@@ -1,11 +1,13 @@
# `openhuman-core`
-Cargo package `openhuman`, library `openhuman_core`, binary `openhuman-core`
-(`src/main.rs`). Owns business rules, persistence, execution policy, the
-JSON-RPC/Socket.IO server, and the CLI for OpenHuman. Hosted in-process by
-`crates/openhuman-app` (the Tauri shell), `crates/openhuman-embed` (the typed
-facade for third-party embedders such as Medulla and OpenCompany), and
-`crates/openhuman-tui`.
+Cargo package `openhuman`, library `openhuman_core`. Owns business rules,
+persistence, execution policy, the JSON-RPC/Socket.IO server, and the CLI
+dispatcher for OpenHuman. The `openhuman-core` binary itself lives in
+`crates/openhuman-cli` (it needs the `openhuman-tinyhumans` backend transport
+this library does not carry). Hosted in-process by `crates/openhuman-app`
+(the Tauri shell), `crates/openhuman-embed` (the typed facade for third-party
+embedders such as Medulla and OpenCompany), `crates/openhuman-tui`, and
+`crates/openhuman-cli`.
See `crates/openhuman-core/src/lib.rs` for the crate-level doc comment and
AGENTS.md ("Rust domain structure") for the preferred per-domain module shape.
@@ -61,13 +63,9 @@ they are not redefined in this crate.
## Binaries
-| Binary | Path | Required features |
-| --- | --- | --- |
-| `openhuman-core` | `src/main.rs` | none |
-| `test-mcp-stub` | `src/bin/test_mcp_stub.rs` | none |
-| `openhuman-fleet` | `src/bin/fleet.rs` | `http-server`, `bin-tools` |
-| `rss-bench` | `src/bin/rss_bench.rs` | `rss-bench` |
-| `library-profile` | `src/bin/library_profile/main.rs` | `rss-bench` |
+None. This package is the library only; `crates/openhuman-cli` declares the
+`openhuman-core` binary, `test-mcp-stub`, `openhuman-fleet`, `rss-bench` and
+`library-profile`, plus every root `tests/*.rs` / `examples/*.rs` target.
`openhuman-fleet` is a process-per-user supervisor and reverse proxy, part of
the pluggable-core work (see `src/core/runtime/`). `test-mcp-stub` is the
@@ -99,7 +97,7 @@ feature list.
```bash
cargo 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-core
cargo test -p openhuman
pnpm debug rust [filter]
scripts/test-rust-with-mock.sh # tests that need the shared mock backend
@@ -119,7 +117,8 @@ what ships.
## Public entry points
- [`run_core_from_args`](src/lib.rs) — the CLI entry point used by both
- `src/main.rs` and the desktop shell binary's `core` and `mcp` subcommands.
+ `crates/openhuman-cli/src/main.rs` and the desktop shell binary's `core`
+ and `mcp` subcommands.
Order: load dotenv, apply the startup restart delay, initialize the keyring
master key, then dispatch to `core::cli`.
- [`CoreBuilder` → `CoreRuntime`](src/core/runtime/builder.rs) — the
diff --git a/gitbooks/developing/testing-strategy.md b/gitbooks/developing/testing-strategy.md
index 7abcaef064..032cffbc22 100644
--- a/gitbooks/developing/testing-strategy.md
+++ b/gitbooks/developing/testing-strategy.md
@@ -14,7 +14,7 @@ How OpenHuman tests its product. Source of truth for "where does my test go?". C
| Layer | Where it lives | What it tests | Driver |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| **Rust unit** | Sibling `<module>_tests.rs` files beside the module under `crates/openhuman-core/src/<domain>/`, or a `tests/` subdir under a domain (e.g. `crates/openhuman-core/src/channels/tests/`); inline `#[cfg(test)] mod` blocks and files named `tests.rs`/`test.rs` fail `pnpm rust:layout` | Pure domain logic, schemas, RPC handler shape, in-memory state machines | `cargo test` |
-| **Rust integration** | `tests/*.rs` at repo root, each an explicit `[[test]]` target in `crates/openhuman-core/Cargo.toml` (`autotests = false`); `tests/raw_coverage/*.rs` is globbed by `build.rs` into the single `raw_coverage_all` target | Full domain wiring with real Tokio runtime, mock external services, JSON-RPC end-to-end (`tests/json_rpc_e2e.rs`), domain × domain interactions | `pnpm test:rust` (which calls `bash scripts/test-rust-with-mock.sh`) |
+| **Rust integration** | `tests/*.rs` at repo root, each an explicit `[[test]]` target in `crates/openhuman-cli/Cargo.toml` (`autotests = false`); `tests/raw_coverage/*.rs` is globbed by `build.rs` into the single `raw_coverage_all` target | Full domain wiring with real Tokio runtime, mock external services, JSON-RPC end-to-end (`tests/json_rpc_e2e.rs`), domain × domain interactions | `pnpm test:rust` (which calls `bash scripts/test-rust-with-mock.sh`) |
| **Vitest unit** | Co-located as `*.test.ts(x)` next to source under `app/src/**`, or under `app/src/**/__tests__/` | React components, hooks, store slices, pure utilities, service-layer adapters | `pnpm test:unit` |
| **WDIO E2E** | `app/test/e2e/specs/*.spec.ts` | Full desktop flow: UI → Tauri → in-process core → JSON-RPC; user-visible behaviour | All platforms: Linux CI drives the Wry-based debug build (macOS/Windows desktop E2E is disabled until a native driver lands, #5485). See [E2E Testing](e2e-testing.md). |
| **Manual smoke** | [`docs/RELEASE-MANUAL-SMOKE.md`](../../docs/RELEASE-MANUAL-SMOKE.md) | OS-level surfaces drivers cannot assert: TCC permission prompts, Gatekeeper, code signing, DMG install, OS-native toasts | Human at release-cut, signed off in release PR |
diff --git a/tests/README.md b/tests/README.md
index bc3010a193..dec685f59c 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -20,11 +20,13 @@ member — don't add one.
## Registering a new target (read this before adding a file)
-`crates/openhuman-core/Cargo.toml` sets `autotests = false` and
-`autoexamples = false`, because Cargo's autodiscovery only scans beside the
-manifest and this crate's tests live at the repo root instead. That means
-`cargo test` silently runs **nothing** for a new `tests/<name>.rs` until it is
-declared:
+These targets belong to **`crates/openhuman-cli`** — the crate that owns the
+`openhuman-core` binary and depends on `openhuman-tinyhumans` for the backend
+transport the core library does not carry. Its manifest sets
+`autotests = false` and `autoexamples = false`, because Cargo's autodiscovery
+only scans beside the manifest and the tests live at the repo root instead.
+That means `cargo test` silently runs **nothing** for a new `tests/<name>.rs`
+until it is declared in `crates/openhuman-cli/Cargo.toml`:
```toml
[[test]]
@@ -42,11 +44,22 @@ default contributor build, and a bare `cargo test` skips such targets silently
`tests/raw_coverage/` need no `[[test]]` entry — they ride in through
`raw_coverage_all`.
+Run a target as `cargo test -p openhuman-cli --test <name>` (a bare
+`cargo test --test <name>` at the workspace root also resolves, since the
+name is unique across members).
+
+A suite that boots the core **in-process** and reaches the mock backend must
+call `tinyhumans_boot::boot()` (`tests/support/tinyhumans_boot.rs`) before
+its first backend-touching call; the core answers `BACKEND_UNAVAILABLE:`
+otherwise. Suites that spawn the binary (`CARGO_BIN_EXE_openhuman-core`) get
+the transport from `main.rs`.
+
`pnpm rust:layout` (`scripts/ci/check-openhuman-rust-layout.mjs`, run in CI
Lite) fails the build on:
- a `tests/*.rs` file with no matching `[[test]]` entry
- a stale `[[test]]` entry pointing at a removed file
+- any `[[bin]]` / `[[test]]` / `[[example]]` table in the core manifest
- inline `#[cfg(test)] mod` blocks in `src/`
- files named `tests.rs` or `test.rs`