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(plans): update controller parser migration plan
Steven Enamakelb657ba889431
diff --git a/docs/plans/2026-10-20-controller-parser-migration.md b/docs/plans/2026-10-20-controller-parser-migration.mdindex 180ba93ff3..39e29a7c8f 100644--- a/docs/plans/2026-10-20-controller-parser-migration.md+++ b/docs/plans/2026-10-20-controller-parser-migration.md@@ -64,7 +64,7 @@ BoundRegisteredController::typed(schemas("upsert"), parse_upsert, run_upsert)The manual gate-before-parse registration is:```rust-RegisteredController::after_gate(+BoundRegisteredController::after_gate(schemas("execute"),|ctx| Box::pin(async move { ctx.load_config().await }),parse_execute,@@ -96,7 +96,7 @@ Each step is a separately reviewable change on `epic/8089-test-ownership`; keepFiles: `crates/openhuman-core/src/core/all.rs`, `all_invoke.rs`, a sibling bound-registration test file (declared with the repository's sibling `*_tests.rs` rule), `schema_test_support.rs`, its sibling `schema_test_support_tests.rs`, and `all_schema_contract_tests.rs`; first owner migration: `crates/openhuman-core/src/threads/schemas.rs`, `threads/schemas/handlers.rs`, and `threads/schemas_tests.rs`.-First add a typed constructor test with a test parser and side-effect counter: `invoke` must call the parser and typed runner in order; `decode_params` must call that exact parser and must not call the gate or runner. Test parser errors propagate unchanged. Then implement `BoundHandler` and internal `ControllerEntry` dispatch; preserve the outer `try_invoke_registered_rpc` domain/surface gate before any parser runs. Do not change or rename legacy `RegisteredController` or `ControllerExtension` fields/literals. Add `BoundRegisteredController`, `BoundControllerExtension`, and new APIs alongside them. Add a generic `push_entries` path that accepts mixed `ControllerEntry`s while the existing `push(Vec<RegisteredController>)` converts legacy entries. Keep both APIs building during rollout. The final raw built-in/internal and all three owner extension inventories must contain no legacy entries, and their completeness tests must fail if any remain.+First add a typed constructor test with a test parser and side-effect counter: `invoke` must call the parser and typed runner in order; `decode_params` must call that exact parser and must not call the gate or runner. Test parser errors propagate unchanged. Then implement `BoundHandler` and internal `ControllerEntry` dispatch; preserve the outer `try_invoke_registered_rpc` domain/surface gate before any parser runs. Do not change or rename legacy `RegisteredController` or `ControllerExtension` fields/literals. Add `BoundRegisteredController`, `BoundControllerExtension`, and new APIs alongside them. Add a generic `push_entries` path for new registrations; retain `push(Vec<RegisteredController>)` as the legacy-to-entry adapter. Migrated domain providers return `Vec<ControllerEntry>`, while unconverted providers keep their old return type until their namespace migrates. Keep both paths building during rollout. The final raw built-in/internal and all three owner extension inventories must contain no legacy entries, and their completeness tests must fail if any remain.The first production vertical slice is `threads.upsert`. In `threads/schemas/handlers.rs`, extract `parse_upsert(params) -> Result<UpsertConversationThreadRequest, String>` from the existing generic `parse::<...>` use, and `run_upsert(ctx, request)` that retains thread-id checks before `ops::thread_upsert`. In `threads/schemas/registry.rs`, replace only the `upsert` literal with `ControllerEntry::Bound(BoundRegisteredController::typed(schema, parse_upsert, run_upsert))` and convert sibling literals using `ControllerEntry::legacy(RegisteredController { ... })`. The provider returns `Vec<ControllerEntry>` for this staged namespace; its other entries remain explicitly legacy. `push_entries` preserves those variants and runtime dispatch continues through `GroupedController`; this mixed vector is explicit, detectable debt, not complete coverage. Independently fixture `threads.upsert`, its exact required keys, and a valid request. The registry contract test calls `controller.decode_params`, not a fixture callback. Add runner regressions for missing/extra/duplicate rows, empty inventory, empty examples, wrong fixture identity, schema rejection, parser rejection, required key removal, and required-to-optional mutation. Keep current memory/wallet fixed assertions until replaced by complete rows.@@ -124,7 +124,7 @@ Files: `crates/openhuman-core/src/core/all.rs` extension types and registration;Preserve the current `RegisteredController`, `ControllerExtension`, and `register_controller_extension` APIs exactly. Add `BoundControllerExtension` with `Vec<BoundRegisteredController>` and a separate registration function; core stores both in `ControllerEntry` and never converts a bound entry back to a legacy handler pointer. TinyHumans' `hosted::extension()` migrates its proxy controllers through this new path. Separately migrate `tinyhumans/src/voice/schemas.rs`: its `voice.agent_signed_url` and `voice.cloud_transcribe` entries are a Voice-group extension, distinct from the Hosted-group proxy extension, and need their own fixed contract table and owner tests. Each extension constructor returns the actual bound extension object tested locally before install.-The extension path already crosses a fixed facade chain. Add only the necessary type/function re-exports to `openhuman_embed::__host` (`crates/openhuman-embed/src/lib.rs`), relying on `openhuman-tinyhumans/src/lib.rs`'s existing `pub use openhuman_embed::__host`; RPC already reaches that same list as `openhuman_tinyhumans::__host as core_host`. Do not add a core dependency upward or bypass the facade. Preserve the existing embed builder call `.controller_extension(ControllerExtension)` and add `.bound_controller_extension(BoundControllerExtension)` in `crates/openhuman-embed/src/runtime/seams.rs`. In the TinyHumans generated `RuntimeBuilder` (`src/runtime.rs`), add a parallel bound setter and forward it to embed. Extend internal `InstallOptions`/`Wiring` preparation and `install` so the legacy `controllers: Option<ControllerExtension>` path remains intact while a `bound_controllers: Option<BoundControllerExtension>` path carries the parser binding without conversion. Migrate hosted proxies and TinyHumans voice registration separately; preserve voice registration's current boot timing and duplicate/idempotency behavior.+The extension path already crosses a fixed facade chain. Add only the necessary type/function re-exports to `openhuman_embed::__host` (`crates/openhuman-embed/src/lib.rs`), relying on `openhuman-tinyhumans/src/lib.rs`'s existing `pub use openhuman_embed::__host`; RPC already reaches that same list as `openhuman_tinyhumans::__host as core_host`. Do not add a core dependency upward or bypass the facade. Preserve the existing embed builder call `.controller_extension(ControllerExtension)` and add `.bound_controller_extension(BoundControllerExtension)` in `crates/openhuman-embed/src/runtime/seams.rs`; store legacy and bound options in separate vectors and install each through its matching registration function. In the TinyHumans generated `RuntimeBuilder` (`src/runtime.rs`), add a parallel bound setter and forward it to embed. Extend internal `InstallOptions`/`Wiring` preparation and `install` so today's `controllers: Option<ControllerExtension>` legacy path remains intact while a `bound_controllers: Option<BoundControllerExtension>` path carries the parser binding without conversion. For `RuntimeBuilder::controller_extension`, keep its existing setter and generated forwarding from TinyHumans; add a separate bound setter in TinyHumans runtime. For `InstallOptions`, keep public fields and meanings unchanged, and migrate only its private `Wiring` controller payload to carry an additional `Option<BoundControllerExtension>` alongside the existing `Option<ControllerExtension>`. Update the `prepare` and `install` tuple/struct plumbing to retain both values until registration. Migrate hosted proxies and TinyHumans voice registration separately; preserve voice registration's current boot timing and duplicate/idempotency behavior.RPC owns a third extension: `http_host::extension()` under `DomainGroup::Platform`, not Hosted or Voice. Convert `crates/openhuman-rpc/src/http_host/schemas.rs` registrations to bound constructors and `http_host::extension()` plus `register_controllers`/`ensure_registered` to the bound extension path. Update `host.rs` builder setup to call `.bound_controller_extension(...)`, and preserve the legacy builder method for callers. Keep contract tests in `crates/openhuman-rpc/src/http_host/schemas_tests.rs`; add explicit fixed required names/examples and mutants there. Add facade forwarding tests/checks through embed → tinyhumans → rpc and verify no product Cargo feature forwarding is changed unless an existing gate actually needs forwarding. Run core, tinyhumans (including `voice` and `hosted` configurations), and rpc `server`/relevant feature tests in their owning crates.@@ -140,13 +140,13 @@ For each candidate, replace repeated generic name/count/parity/field traversal wFiles: final test inventories only; update this plan or PR description with measured results, not source API documentation.-Make the global core contract test cover every built-in and internal registered method exactly once for the enabled feature set; fail if any legacy registration remains. The disabled-feature build proves no unavailable contracts leak in. Make hosted coverage equally complete and require every extension item be bound before install. Run focused crate checks, strict all-target clippy, focused tests, and formatting for touched crates; then the issue gates: `cargo test -p openhuman --lib core::`, `cargo test -p openhuman --lib` with the repository's prescribed `RUST_MIN_STACK`, `pnpm rust:layout`, and `node scripts/check-domain-e2e-coverage.mjs`. Run a hosted crate test/check with its hosted feature enabled and the relevant disabled feature build. Long Cargo gates use `scripts/ci-cancel-aware.sh`; do not set `CARGO_TARGET_DIR`. Record unrelated existing failures separately. Calculate the final 8,401 → counted-line total and conservative total from a clean diff; acceptance requires no more than 4,200 counted lines and honest accounting of all net additions.+Make the global core contract test cover every raw built-in and internal registered method exactly once for the enabled feature set; fail if any `ControllerEntry::Legacy` remains in that snapshot. The disabled-feature build proves no unavailable contracts leak in. Independently require complete bound snapshots from (1) `openhuman_tinyhumans::hosted::extension()` (Hosted group), (2) `openhuman_tinyhumans::voice::schemas::hosted_voice_controllers()` (Voice group), and (3) `openhuman_rpc::http_host::extension()` (Platform group). Do not use the public live `all_registered_controllers()` as the coverage oracle; its ambient `DomainSet`, profile-surface filtering, and global extensions are runtime behavior intentionally preserved. Require each owner snapshot to contain no legacy entry before asserting its independent contracts. Run focused crate checks, strict all-target clippy, focused tests, and formatting for touched crates; then the issue gates: `cargo test -p openhuman --lib core::`, `cargo test -p openhuman --lib` with the repository's prescribed `RUST_MIN_STACK`, `pnpm rust:layout`, and `node scripts/check-domain-e2e-coverage.mjs`. Run tinyhumans tests with the relevant `voice`/`hosting` gates, RPC tests with `server`, and compile facade chain through embed → tinyhumans → rpc, including relevant disabled-feature checks. Long Cargo gates use `scripts/ci-cancel-aware.sh`; do not set `CARGO_TARGET_DIR`. Record unrelated existing failures separately. Calculate the final 8,401 → counted-line total and conservative total from a clean diff; acceptance requires no more than 4,200 counted lines and honest accounting of all net additions.## File groups and ownership boundaries-- Core registry and verifier: `crates/openhuman-core/src/core/all.rs`, `all_invoke.rs`, `all_schema_contract_tests.rs`, `schema_test_support.rs`, sibling `schema_test_support_tests.rs`, plus bound-registration tests.+- Core registry and verifier: `crates/openhuman-core/src/core/all.rs`, `all_invoke.rs`, `all_schema_contract_tests.rs`, `schema_test_support.rs`, sibling `schema_test_support_tests.rs`, plus bound-registration tests. The independent built-in oracle is raw `registry()` + `internal_registry()` as already used by `builtin_controller_snapshot`, never the public ambient-filtered view.- Core parser and behavior owners: `crates/openhuman-core/src/<domain>/**/schemas*.rs` and sibling `*_tests.rs`; no flat business logic under `core/`.-- Hosted extension and hosted method owners: `crates/openhuman-tinyhumans/src/hosted/**`; its tests stay in that crate. `ControllerExtension` remains a temporary compatibility adapter while `BoundControllerExtension` is rolled out; no legacy entry may remain in final core or hosted completeness sweeps.+- Hosted proxy extension: `crates/openhuman-tinyhumans/src/hosted/**`; hosted voice extension: `crates/openhuman-tinyhumans/src/voice/schemas.rs`; RPC file-host extension: `crates/openhuman-rpc/src/http_host/**`. Each test remains in its owner crate and covers its own exact extension object. The original `RegisteredController`/`ControllerExtension` APIs and builder setters remain available unchanged; new bound counterparts carry parser identity. Owner completeness sweeps require bound entries even though external callers can still use the legacy API.- Tests remain in their owning crate. Core cannot test hosted controllers by adding a dependency on tinyhumans; tinyhumans cannot reimplement core's parser or controller semantics.- No `vendor/` production changes are expected. If investigation finds a parser or module behavior owned by a vendor, stop and move that behavior and its tests to the owning repository before changing the OpenHuman adapter.