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
Reinstall the memory host seams: this process does still embed the engine
Shanu00fc1fba2cdf
diff --git a/.github/workflows/test-reusable.yml b/.github/workflows/test-reusable.ymlindex aa4aaecd05..60f830b805 100644--- a/.github/workflows/test-reusable.yml+++ b/.github/workflows/test-reusable.yml@@ -203,16 +203,7 @@ 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.- # `memory-embedded-test-seams` is deliberately NOT a product feature- # (#5560): it exposes `memory::host_impls`, the embedded-engine host- # seams, which the shipped build no longer installs now that memory is- # served over the bus. Three tests/*.rs targets still drive the embedded- # path through mocks and name that module, so this lane must add it or- # they fail to COMPILE — the same class of gap as `bin-tools` above,- # only louder, since a missing test seam is a hard error rather than a- # silent skip. Adding it here keeps it out of the product graph that- # scripts/ci/product-features.txt and the clippy lanes select.- FEATURES="$(bash scripts/ci/product-features.sh),bin-tools,memory-embedded-test-seams"+ FEATURES="$(bash scripts/ci/product-features.sh),bin-tools"echo "[test-reusable] feature set: ${FEATURES}"# `--features bin-tools` is load-bearing, not cosmetic: the ops binariesdiff --git a/Cargo.toml b/Cargo.tomlindex 3c60de8b9f..58e36ceb53 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -1165,12 +1165,6 @@ e2e-test-support = []# Unit tests get it from `cfg(test)`. Integration tests under `tests/` are# separate crates and `cfg(test)` does NOT reach them, which is the whole reason# this feature exists rather than a bare `#[cfg(test)]`.-#-# Deliberately absent from `scripts/ci/product-features.txt` and from `default`,-# and allow-listed in `check-feature-forwarding.mjs`: forwarding it to the-# desktop shell would put the engine back into the shipped graph, which is the-# single thing #5560 exists to prevent.-memory-embedded-test-seams = []# Builds the `rss-bench` benchmark binary (#5046). Default-OFF, so it is never# part of the shipped desktop/library build and the feature-forwarding gate# (which only inspects the `default` list) never requires forwarding it.diff --git a/scripts/ci/rust-coverage-changed.sh b/scripts/ci/rust-coverage-changed.shindex 6201ada7e3..2a5173e8ae 100755--- a/scripts/ci/rust-coverage-changed.sh+++ b/scripts/ci/rust-coverage-changed.sh@@ -50,15 +50,7 @@ log() { echo "[ci][rust-cov-changed] $*"; }# measuring code that ships, and the diff-coverage gate would pass a PR whose# changed lines were never compiled. Source of truth:# scripts/ci/product-features.txt.-# `memory-embedded-test-seams` rides along because this lane compiles-# `tests/*.rs`, and 25 of those targets name `memory::host_impls` — the-# embedded-engine host seams, which the shipped build no longer installs and-# which are therefore deliberately NOT a product feature (#5560). Without it-# those targets fail to COMPILE here while passing every other lane, because-# every other lane that builds them adds the feature too (test-reusable.yml).-# It cannot leak into what is measured as product code: the feature gates one-# module of test support and nothing else.-PRODUCT_FEATURES="$(bash scripts/ci/product-features.sh),memory-embedded-test-seams"+PRODUCT_FEATURES="$(bash scripts/ci/product-features.sh)"# The CI job normally supplies a linker-only RUSTFLAGS value. cargo-llvm-cov# owns this variable while it compiles coverage-instrumented crates; preservingdiff --git a/scripts/test-rust-with-mock.sh b/scripts/test-rust-with-mock.shindex c44b15f0a3..90c388b4a3 100755--- a/scripts/test-rust-with-mock.sh+++ b/scripts/test-rust-with-mock.sh@@ -75,18 +75,9 @@ fi# Source of truth: scripts/ci/product-features.txt.PRODUCT_FEATURES="$(bash "$REPO_ROOT/scripts/ci/product-features.sh")"-# `memory-embedded-test-seams` is added on top of the product set, and only-# here. It compiles `memory::host_impls`, the host side of the seam traits the-# memory ENGINE declares, which the integration tests under `tests/` need-# because they bind the in-process TinyCortex driver. `cfg(test)` cannot serve-# them — an integration test is a separate crate and never sees it.-#-# It must NOT reach the product build: forwarding it to the desktop shell would-# put the engine back into the shipped dependency graph, which is precisely what-# #5560 removed. That is why it lives here rather than in product-features.txt.cargo_test() {cargo test --manifest-path Cargo.toml --workspace \- --features "${PRODUCT_FEATURES},bin-tools,memory-embedded-test-seams" "$@"+ --features "${PRODUCT_FEATURES},bin-tools" "$@"}integration_test_targets() {diff --git a/src/core/memory_cli.rs b/src/core/memory_cli.rsindex e78bb45c93..de2852bfb4 100644--- a/src/core/memory_cli.rs+++ b/src/core/memory_cli.rs@@ -545,10 +545,14 @@ async fn create_memory_binding(}}- // The `[modules]` policy, which a module-backed driver needs published- // before it can load and which only the runtime bootstrap otherwise sets.- // Idempotent. The engine seams that used to be installed alongside it are- // gone: this process embeds no engine, so there is nothing to call back.+ // The engine seams, plus the `[modules]` policy a module-backed driver+ // needs published before it can load. Both idempotent. The seams are back+ // because this process does still embed the engine — see the note in+ // `runtime::context::init_stores`; a `memory` subcommand that reached one+ // unwired would report a broken subsystem rather than a missing one.+ crate::openhuman::memory::host_impls::install_memory_host_seams(std::sync::Arc::new(+ config.clone(),+ ));#[cfg(feature = "modules")]crate::openhuman::modules::memory::set_modules_policy(std::sync::Arc::new(config.clone()));diff --git a/src/core/runtime/context.rs b/src/core/runtime/context.rsindex 4583100da1..c780b22fb0 100644--- a/src/core/runtime/context.rs+++ b/src/core/runtime/context.rs@@ -596,11 +596,24 @@ pub async fn init_stores(domains,);if plan.memory {- // No seam installation here any more. Those seams exist so an engine- // running INSIDE this process can call back into it, and this process- // no longer runs one: the driver is the loaded TinyMemory module, which- // installs its own seams and reaches this host over the bus through- // `modules::memory_host` instead.+ // The seams the in-process engine calls back through. They must be+ // installed BEFORE the first memory call: they fail loudly when+ // unwired rather than degrading, because a quiet degrade would write+ // vectors into the wrong embedding space or make a sync run look empty+ // instead of broken.+ //+ // #5560 removed this on the reasoning that "this process embeds no+ // engine, so there is nothing to call back". That is not true yet.+ // `tinymemory-core` is still a normal dependency of this crate, and+ // `session::builder::factory` still reaches+ // `store::factories::create_session_memory_with_local_ai`, which calls+ // `require_embedding_host()` on the chat hot path — so every chat turn+ // failed with "no EmbeddingHost installed". The module installing its+ // own seams does not help: a `cdylib` has its own statics, so what it+ // sets is invisible here.+ //+ // These go when the last in-process engine caller goes, not before.+ crate::openhuman::memory::host_impls::install_memory_host_seams(Arc::new(cfg.clone()));// Publish the config a module-backed memory driver should load// against, before the binding below can construct one. Boot-only and// idempotent (first call wins) — see `modules::memory::set_modules_policy`diff --git a/src/openhuman/agent/debug/mod.rs b/src/openhuman/agent/debug/mod.rsindex cfa2139725..0a07cf720e 100644--- a/src/openhuman/agent/debug/mod.rs+++ b/src/openhuman/agent/debug/mod.rs@@ -234,9 +234,9 @@ async fn load_dump_config(// `dump-all` invocation aborts before rendering a single prompt.// Idempotent, so calling it per invocation is safe. Same rationale as// `memory_cli` / `subconscious_cli`.- // The seams are the module's to install now — this process embeds no- // engine, and the embedding seam a session agent needs is served back to- // the module over the bus by `modules::memory_host`.+ crate::openhuman::memory::host_impls::install_memory_host_seams(std::sync::Arc::new(+ config.clone(),+ ));Ok(config)}diff --git a/src/openhuman/inference/embeddings/mod.rs b/src/openhuman/inference/embeddings/mod.rsindex ecf609f3f8..7a4cfa39bc 100644--- a/src/openhuman/inference/embeddings/mod.rs+++ b/src/openhuman/inference/embeddings/mod.rs@@ -49,8 +49,7 @@ pub use factory::{// `pub(crate)` helper — reused by the memory-tree OpenAI-compat adapter to gate// configs whose dimension the fixed-1024 tree can't store (#4056). Not part of// the public surface, so it can't ride the `pub use` above (E0364).-// Only compiled when `host_impls` is: the sole caller is behind that same gate.-#[cfg(any(test, feature = "memory-embedded-test-seams"))]+// Its sole caller is `memory::host_impls`, which is unconditional again.pub(crate) use factory::model_supports_dimensions;// #002 FR-015: the memory-tree OpenAI-compat embedder reuses the same key// resolution the embeddings RPC uses, so there is one source of truth.diff --git a/src/openhuman/memory/host_impls.rs b/src/openhuman/memory/host_impls.rsindex 6e92f0fb29..c65a561a1d 100644--- a/src/openhuman/memory/host_impls.rs+++ b/src/openhuman/memory/host_impls.rs@@ -485,3 +485,43 @@ pub(crate) fn install_for_tests() {.expect("seam installer panicked");});}++#[cfg(test)]+mod boot_seam_tests {+ use super::*;++ /// Installing the seams must satisfy the engine's `require_embedding_host`.+ ///+ /// This is the regression for the outage #5560 shipped and had to take back:+ /// the seam install was removed from all three boot sites on the reasoning+ /// that "this process embeds no engine, so there is nothing to call back".+ /// It does embed one — `tinymemory-core` is a normal dependency, and+ /// `session::builder::factory` reaches `store::factories::+ /// create_session_memory_with_local_ai`, which calls+ /// `require_embedding_host()`. Every chat turn then died with+ ///+ /// no EmbeddingHost installed — the host must call+ /// memory::embedding_host::set_embedding_host during startup wiring+ ///+ /// The loaded module installing its own seams does not cover this: a+ /// `cdylib` has its own statics, so what it sets is invisible in this+ /// process. Nothing in a build or a type check said so, which is why the+ /// assertion is here.+ ///+ /// It asserts the engine's own accessor rather than a local flag, so it+ /// keeps testing the thing the engine actually reads.+ #[test]+ fn installing_the_seams_satisfies_the_engines_embedding_host() {+ install_for_tests();++ assert!(+ tinymemory_core::embedding_host::embedding_host().is_some(),+ "boot installed no EmbeddingHost; the session memory factory on the \+ chat path calls require_embedding_host() and will fail every turn"+ );+ assert!(+ tinymemory_core::embedding_host::require_embedding_host().is_ok(),+ "require_embedding_host must succeed once the boot seams are in"+ );+ }+}diff --git a/src/openhuman/memory/mod.rs b/src/openhuman/memory/mod.rsindex 0f00169fce..c5bc8648da 100644--- a/src/openhuman/memory/mod.rs+++ b/src/openhuman/memory/mod.rs@@ -46,7 +46,6 @@ pub mod host;/// is the test suite, which binds the in-process TinyCortex driver directly —/// legitimate, because `tinymemory-core` is a dev-dependency there and a/// dev-dependency is not linked into the shipped binary.-#[cfg(any(test, feature = "memory-embedded-test-seams"))]pub mod host_impls;/// Host desktop policy: is the memory content root a vault Obsidian already/// knows about? See the module docs for why this is OpenHuman's and not the