Repository navigation
Run OpenHuman seats as supervised processes - #139
Conversation
Register the new tinyhivemind-openhuman-process crate as a workspace member and add a default-features-off reqwest dependency for its loopback HTTP and SSE client, keeping TLS, HTTP/2 and proxy lookup out so a seat's token never reaches a proxy. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a Refused variant to the harness error enum so a seat that asks for something the harness cannot honour is reported without being started, with the client's own error preserved as the source for downcasting. The openhuman-process crate gains tokio's net and io-util features to support this. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a test asserting that a refused seat renders the client's own error message and keeps the original source available for downcasting, so the wrapping behaviour stays intact. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a capability module that exposes the process crate's capabilities to the rest of the system. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a TOML-based configuration loader for the openhuman process crate, parsing config files into the existing config structures. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…uman child processes Introduce a new crate that launches the OpenHuman runtime as a child process and manages its lifecycle, including conformance and live tests against a fake child. The lockfile gains the crate's dependency set so the workspace builds it. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The skill fixture now carries only an id, and the memory fixture is built with a full identity and settings and unwrapped instead of being silently skipped when parsing fails, so the unsupported-field assertions always run. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a fixture for the openhuman process crate so tests can exercise the process handling against a stable, reusable setup. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test fixture had a stray leading space before the second data line, which made the sample payload invalid SSE. Removing it keeps the split-anywhere test exercising well-formed frames. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Wire the new rpc module into the crate and expose the shared test support, fake surface, and fixture modules under cfg(test) so unit tests can reuse them. Also make the fake surface's tools check tolerant of read errors instead of comparing against a Result. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a turn module in the openhuman process crate to handle turn-level processing. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…rminal The follow loop now reports whether the instance's turn is over alongside the outcome, so a failure raised while the turn keeps running no longer clears the active turn. Empty strings in the fake surface are treated as absent, matching how the real binary omits optional fields. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Wire the new error and instance modules into the crate so the process supervision code can use them. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The fake now keeps a handle to its shared state so that dropping it clears the subscriber registry, matching a process that has gone away where nothing answers and every stream ends. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The active turn now records its own thread, so cancel no longer takes the thread as a separate argument and reads it from the turn instead. This keeps the cancellation parameters together with the turn they describe. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add the instance module that lays out the state directories, writes the config and keyring key, builds the child environment, and runs the two-start discovery and verification flow so each instance gets an exact MCP tool allowlist before it is used. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…andling Reworked the launcher to build the child process arguments in a loop and to destructure the probe result directly, which keeps the start-up path easier to follow without changing behaviour. Added tests pinning the exact environment recipe and the turn timeout floor so regressions in the sandbox configuration are caught. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a harness module to the openhuman process crate, providing the scaffolding needed to drive and manage the process. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a seat abstraction in the harness so openhuman processes can be assigned and tracked per seat. This lays the groundwork for managing process placement within the harness. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds Resume and Render error variants so a missing thread and an unrenderable turn surface as distinct failures, and expands the crate docs to describe how a seat is started, verified, and driven. Also renames the seat's active-turn helper to current and marks the fixture root as intentionally held. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The conformance placeholder is replaced by a suite that runs every host case against a fake openhuman-core child, so supervision is exercised for real, plus checks that seat refusals happen before anything starts and that start and stop are idempotent. The fake child's shared surface module is marked dead-code-allowed for the binary, and the live test file keeps its placeholder note. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The shared http module is now also used by the fake surface, so the dead_code lint is silenced to keep the live model tests compiling without warnings. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move the seat builder and process helpers out of the fake subject into a shared support module so both the fake and live suites can use them. The live subject now imports the scripted model and seat helpers through crate paths instead of its own module tree. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds a live test runner that drives every conformance case through the real openhuman-core binary and Node fixture, gated on THM_OPENHUMAN_CORE and THM_NODE so the suite skips with a reason when either is absent. Also adds a spike gate test that repeats the original spike's checks through the runner, and fixes the subject helper's expectations to match. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
… config The written config now sets context.compaction_enabled to false, because 0.64.15 otherwise adds juice_retrieve to every allowlist. Verification accounts for that recovery tool when compaction is on, and tests cover both the config and the visible-tool behaviour. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce a script that downloads the pinned harness artifacts and a lock file recording their versions, so CI runs against reproducible harness builds instead of whatever is fetched at run time. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Redirect stderr to /dev/null alongside stdout so a cache miss no longer prints a checksum failure message during the harness fetch step. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The purity check now treats tinyhivemind-openhuman-process as a host crate, since the process harness clients may hold a runtime and an HTTP client but must never link one. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The dependency scan matched the crate under test itself when its name shared a prefix with a forbidden adapter family, so the crate's own line is now filtered out. The failure message was also updated to mention the process harness clients alongside the host crate. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…nd tests Document the crate's top-level layout along with its capability, config, harness, instance, rpc, and turn modules, and describe the test directories including the fake, live, and support helpers. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The harness spec and process-harness plan now record the `openhuman` client in `tinyhivemind-openhuman-process`, which passes the conformance suite offline and on the pinned 0.64.15 binary, along with the behaviours that implementing it settled. AGENTS.md lists the new crate and notes that it links no harness. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted the crate's source and test files to satisfy rustfmt, wrapping long method chains and type annotations without changing any behaviour. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…rectory The crate's error type now lives in an `error/` module directory with its own README and test module, and the crate README points at the new location. A test was added covering the TOML writer's handling of nulls, empty arrays, mixed arrays, and nested tables. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a test asserting that the start check counts tools contributed by deferred tool search, the REPL handle tools, the orchestrator summary stage, extra_tools, and subagent delegation, matching what resolved_scope adds to an allowlist. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…llowlist The visible-tool check now looks up the configured chat agent instead of a fixed id, and mirrors 0.64.15's resolved_scope by adding deferred, delegation, recovery and REPL tools under the conditions the binary uses. This keeps the live tests honest about what the model actually sees. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a conformance case asserting that when a seat's first turn fails, the next turn starts the thread afresh and completes rather than failing to resume. The fake surface now records a user message only once a turn ends, matching 0.64.15, and a shared helper builds turn requests for the test seat. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
A turn that fails before its thread has a transcript now returns a dedicated error instead of a session id, so the next turn is not asked to resume a thread that never existed. The transcript lookup is shared between the resume check and this new check. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The Debug implementations for the config input, written config, and RPC client now hide the bearer, prompt, and core token, since these values carry the seat's and instance's authority and were previously printed in full. Tests cover both the types directly and a running harness. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…d after close Seats are now inserted into the registry before their instance starts, so a concurrent start is refused and a stop can find the seat to stop, with the entry removed again if the start fails. A seat closed while its instance was starting now stops that instance instead of leaving it running, and approvals gained a configurable timeout. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ailures The keyring key is now rejected unless it is a regular file with mode 0600 holding 64 hex digits, and the config is chmodded to 0600 even when it already exists. Stop failures during launch are no longer swallowed but reported alongside the original error, and the harness fetch script rejects ambiguous lock entries and forbids non-HTTPS redirects. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…l limits Update the harness, instance and turn READMEs and the harness spec to describe the behaviour settled on 0.64.15: seats are reserved by id so a second start is refused, the model-visible tool list is computed from the effective config since no RPC reports it, and approvals time out into denials while stale ones are denied before a turn starts. Also note that a failed start reports a failed stop alongside it, keyring key files must be 0600 with 64 hex digits, and a turn failing before its thread has a transcript reports no session. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Renamed the local permission helper in the keyring test to chmod with a clearer parameter name, and removed an unused AGENT_ID import from the verify module. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Brings in #137 (harness schema) and #138 (hive tool server). Conflicts: - Cargo.toml: both new members, and both dependency blocks (hyper and its helpers for tinyhivemind-mcp, reqwest for this crate). - assert-pure.sh: host_crates now guards tinyhivemind-host, tinyhivemind-mcp and tinyhivemind-openhuman-process. - docs/specs/harnesses.md: "Implemented so far" covers steps 1, 2, 3 and 4b. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Step 4b of the process harness plan. The new crate
tinyhivemind-openhuman-processruns OpenHuman seats as supervisedopenhuman-core run --headless-apiprocesses, one per seat, behind theHarnessport from #136. It names no OpenHuman, openhuman-embed or tinyagents type, andassert-pure.shchecks that. It is a sibling crate, not a module oftinyhivemind-openhuman, so removingvendor/openhumanand the linked adapter later will not touch it.Before start.
openaiwith an explicit endpoint and no credential; for more than 8 iterations, a budget, a sandbox, built-in tool groups or skills.config.toml. Memory, search, Composio, suggestions, hooks and context compaction are off, and the OpenHuman sandbox stays on. The core token, encrypted keyring key and MCP bearer are random.Start.
/health.pidagainst the child;config_getagainst every leaf written;Turns.
/eventsbeforechannel_web_chat, scoped to the returnedrequest_id, with usage fromchat_done. The 8thiteration_startis a failed turn.channel_web_cancel, or its instance is killed. A turn is never resubmitted.Pins.
harnesses.lockrecords version, target, tarball sha256 and binary sha256 for v0.64.15 on x86_64 and aarch64..github/scripts/fetch-harness.shfetches over HTTPS only and verifies both checksums; the library never downloads.An independent review found four important defects, all fixed with tests that failed first:
Debug;Stacked on #136.
Related issue
None. Refs #136.
API or behavior changes
tinyhivemind-openhuman-process.harness::Error::Refused.Dependencies
reqwest0.12 with no default features (no TLS, no HTTP/2, no proxy lookup), for loopback JSON-RPC and SSE. It was already in the lockfile.Validation
At
6b38ad50:cargo fmt --all -- --check: passcargo clippy --all-targets --all-features -- -D warnings: passcargo build --all-targets --all-features: passcargo test --all-features: 1952 passed, 0 failed, 0 ignoredassert-pure.sh(now guards this crate), rustdoc-D warnings: passTHM_OPENHUMAN_CORE=<v0.64.15 binary> THM_NODE=<node 24> cargo test -p tinyhivemind-openhuman-process --features conformance --test live: 15 passed, against the checksum-verified binary and the experiment's scripted model. The live tests stand in for CI, which has no harness binary; they skip with a message when the variables are unset.fetch-harness.shfetched and verified both targets, and refused an unknown target and a duplicate lock entryCI will show the same red checks as #136, all already on
main.Tests
Covered:
openhuman-corechild, so supervision is real.Uncovered here:
turnand call-identity cases, and the autonomy gates.Privacy risk, not solved here: v0.64.15 has a built-in Sentry address no setting removes, and resets
embeddings_providerto the hosted default on load (memory is off, so nothing embeds). The live tests do not block egress. Blocking egress from seats is now a gate for the removal PR, and an upstream off switch is needed.OpenHuman gap:
approval_decidetakes no reason, so a denial cannot tell the model why.Documentation
Crate and module READMEs, crate overview with doctest,
AGENTS.md, anddocs/specs/harnesses.md(settled OpenHuman details, the computed tool list, approvals). The plan now records the sibling-crate decision.Checklist
#[allow(...)],#[ignore], or relaxed lints.envcontents in the diff or the descriptionCo-authored-by: Medulla medulla@tinyhumans.ai