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
feat(memory): shed tinycortex and tinymemory-core from the product build\n\nCloses the last step of openhuman#5560. The memory engine crates leave the\nnormal dependency graph; the engine keeps running, inside the prebuilt\ntinymemory TinyBus module, reached over tinymemory-api.\n\nThe three production callers of `install_memory_host_seams` are gone, because\nevery path that used to drive an in-process engine has drained:\n`session::builder::factory` stopped booting\n`global::init(workspace).memory_handle()`, so\n`create_session_memory_with_local_ai` — the chat-hot-path caller whose\n`require_embedding_host()` turned the first attempt at this removal into an\noutage — has no call site left; `ops::helpers::active_memory_client` was\ndeleted; and `memory_cli`'s `ingest`/`query` engine-client resolver went with\nit (its doc comment had been orphaned onto `print_memory_help`).\n\nThe contract event sink is deliberately NOT removed with them. It installs into\ntinymemory-api, still a normal dependency, and `memory::sync::composio::bus`\npublishes ComposioIntegrationsChanged through it from production host code.\n`tinymemory_api::events::publish` drops silently when unwired, so folding it in\nwould have removed a live event path with no error anywhere. Each boot site\ncalls `memory::host::install_memory_event_sink()` instead.\n\n`memory::host_impls` moves behind a new `memory-engine-seams` feature —\ndefault-ON, product-OFF, allow-listed in INTENTIONALLY_NOT_FORWARDED. A feature\nand not `#[cfg(test)]`: a `tests/*.rs` target links this crate as an ordinary\ndependency where `cfg(test)` is false, so a `cfg(test)` module is invisible to\nit however the engine is declared, and ~24 of those targets install these\nseams. Three raw_coverage cases genuinely drive a real engine and fail with\n"no EmbeddingHost installed" without it — measured, after an earlier revision\nof this change tried `cfg(test)` and broke exactly those. It lives in `default`\nbecause three separate places compose the test feature string and one\nraw_coverage invocation passes `--features` not at all; none passes\n`--no-default-features`, so `default` reaches them all. It costs the\ncontributor inner loop nothing new — both crates were unconditional before.\n\nManifest:\n - tinycortex, tinycortex-api, the tinymemory facade and\n tinymemory-tinycortex leave [dependencies]. tinycortex and tinymemory-core\n stay `optional = true`, reached only by `memory-engine-seams` and\n `rss-bench` (the library_profile bins measure the in-process engine and a\n [[bin]] cannot use a dev-dependency).\n - tinycortex and tinymemory-tinycortex join [dev-dependencies] for the ~11\n test files that name them directly.\n - BOTH [patch] entries stay. Dropping a direct dependency and dropping its\n patch are different things: the crates are unpublished and the\n dev-dependency engine crates still name them by version requirement, so\n removing a patch fails resolution before anything compiles.\n - `contacts` forwards nothing (the reader lives in the module now); the gate\n name stays for the Feature Forwarding Gate.\n\nProof is `cargo tree -e normal -i <crate>` under the product feature set, which\nprints "nothing to print" for all four survivors and no longer resolves the\nfacade at all, and returns tinycortex under `--features flows,rss-bench`.\n\nFloor: 294/276/2 -> 288/270/2 (-6 packages, -6 names). kernel-floor.limits goes\n286 -> 288 on packages, which is a raise against the file and a 6-package drop\nagainst reality: main measured 294/276 against limits of 286/270, so both gates\nwere already failing before this branch. dep-sim's `--expect-names 270` is left\nuntouched — the shed lands names on exactly that number, turning it green; its\ncomment claimed a 273 raise that was never applied and never matched the\nmeasurement, and is corrected in place.\n\nThe direct-engine-refs ratchet stays at 10 entries and green, and its central\nclaim is corrected: a non-empty list no longer implies a linked engine, because\nthe scanner reads source text and every surviving entry is test-only.\n\nVerified: both clippy lanes clean at -D warnings; the gates-off, gates-off+tui\nand flows-lib CI lanes clean; 945 gate-contract tests green with gates off; 981\nmemory + embeddings lib tests green (1 pre-existing failure,\n`conformant_custom_endpoint_verifies_and_sends_expected_request`, reproduced at\n7c5780e0e); raw_coverage_all 422 passed / 33 failed with a failure name set\nbyte-identical to the 7c5780e0e baseline.\n\n
Shanu019f2ecac6ad
diff --git a/.github/workflows/ci-lite.yml b/.github/workflows/ci-lite.ymlindex 290cfbd0af..d77e2a394f 100644--- a/.github/workflows/ci-lite.yml+++ b/.github/workflows/ci-lite.yml@@ -504,8 +504,9 @@ jobs:- name: Check core builds with the default domain gates disabled# Lib-scoped on purpose. `--all-targets` would additionally compile the# `tests/` integration crates, which today name gated symbols- # (voice::reply_speech::test_seam, mcp::registry::store, web3::x402::tools) without- # a #[cfg] and so do not compile with the gates off. That cleanup is tracked+ # (voice::reply_speech::test_seam, mcp::registry::store, web3::x402::tools,+ # and since openhuman#5560 memory::host_impls behind `memory-engine-seams`)+ # without a #[cfg] and so do not compile with the gates off. That cleanup is tracked# in #5021 alongside running the full gates-off suite; until it lands, this# lane checks the lib and RUNS the gate-contract lib tests below.run: bash scripts/ci-cancel-aware.sh cargo check --manifest-path Cargo.toml --no-default-features@@ -587,7 +588,7 @@ jobs:# 2026-08-29: `tinytools` becomes the dependency behind the `Tool`# trait/types, which cannot be gated because `tools/` is kernel# surface — zero transitive additions, native build count unchanged- # at 2. 270 -> 273 on 2026-08-30: the `tinyflows` crate's catalog/+ # at 2. 267 -> 270 on 2026-08-30: the `tinyflows` crate's catalog/# storage/copilot surface split into three sibling path-crates in the# SAME vendored workspace (`tinyflows-catalog`, `tinyflows-sqlite`,# `tinyflows-copilot`) — one name each, no new external crate, native@@ -596,6 +597,21 @@ jobs:# the host skew recorded in the limits history — this expects the CI# host.#+ # That line read `270 -> 273` until 2026-08-31 and was wrong twice+ # over: the split took NAMES from 267 to 270, not 270 to 273, and the+ # argument below was never moved to 273 to match it. Corrected rather+ # than acted on — 270 is and was the right number, and bumping the+ # argument to follow the prose would have masked the drift described+ # next.+ #+ # UNCHANGED by openhuman#5560, deliberately. That change sheds the+ # memory engine crates and takes the measured name count from 276 back+ # down to exactly 270, so this guard goes from failing to passing+ # without the argument moving. It had been red on main: the profile+ # measured 276 names against this 270 while `kernel-floor.limits`+ # separately measured 294 packages against its 286. Only the packages+ # limit needed a write-back; see the 2026-08-31 entry there.+ ## This number MUST move in lockstep with scripts/kernel-floor.limits —# it is a second source of truth for the same Linux name count and is# not derived from that file. Bump both in the same PR that raisesdiff --git a/AGENTS.md b/AGENTS.mdindex 7771d357ab..1f157740f1 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -1019,13 +1019,45 @@ than in someone's memory. **Do not widen `memory::api` back out to the wholecrate** — if a new path needs something not exported there, the question toanswer first is whether it crosses the bus.-**`tinymemory-api` stays; `tinymemory-core` has not left yet.** The API crate is-the host-owned contract and is meant to be a dependency. The *engine* crate is-still linked (1.44 MB of `.text`) because ~71 lines across 38 production files-name `tinymemory_core::` directly, and ~687 more paths reach it through the-twenty-five module re-exports in `memory/mod.rs`. `memory/direct_engine_refs_tests.rs`-is the ratchet over the first number, with every file classified as a re-export-shim, a host-seam installation, or a call that needs a wider bus surface.+**`tinymemory-api` stays; `tinymemory-core` has left the product build (#5560,+2026-08-31).** The API crate is the host-owned contract and is meant to be a+dependency. The *engine* crate used to be linked beside it — 1.44 MB of `.text`+— and is not any more: it, `tinycortex`, `tinycortex-api`, the `tinymemory`+facade and `tinymemory-tinycortex` are all out of the **normal** dependency+graph. Verify rather than trust the manifest, because the two can disagree:+`cargo tree -e normal -i <crate>` under the product feature set prints "nothing+to print" for each.++Two survivals are deliberate and neither puts the engine back in the product:++- **`[dev-dependencies]`** carries `tinycortex`, `tinymemory-core` and+ `tinymemory-tinycortex` for the ~11 test files that drive a real in-process+ engine. Cargo does not link dev-dependency features into the shipped binary —+ the same precedent the root `tinywallet` entry already sets.+- **`optional = true`**, reached by two default-OFF-for-the-product features.+ `rss-bench` keeps `tinycortex` and `tinymemory-core` available to the two+ `library_profile` bins, which measure the in-process engine and cannot use a+ dev-dependency because a `[[bin]]` never sees one. `memory-engine-seams`+ compiles `memory::host_impls` for the ~24 `tests/*.rs` integration targets+ that install the host seams — a `tests/` target links this crate as an+ ordinary dependency, where `cfg(test)` is false, so `#[cfg(test)]` would not+ have reached them however the engine was declared. It is in `default`+ (so every test lane picks it up without composing a new feature string) and+ allow-listed in `INTENTIONALLY_NOT_FORWARDED`; neither feature is in+ `scripts/ci/product-features.txt`.++The `[patch]` entries for `tinycortex` / `tinycortex-api` stay in both manifests+and must not be removed with the dependencies. Dropping a direct dependency and+dropping its patch are different things: the crates are unpublished and the+engine crates still reached as dev-dependencies name them by version+requirement, so removing a patch fails **resolution** ("no matching package+named `tinycortex-api` found") before anything compiles.++`memory/direct_engine_refs_tests.rs` is still the ratchet over direct+`tinymemory_core::` references, but **its non-empty list no longer implies a+linked engine** — it scans source text and cannot see `cfg`, and all nine+remaining entries are test-only. Draining them is a correctness goal (a second,+unpoliced door into the subsystem), not a binary-size one.**Most of what remains is blocked upstream, not here.** `modules::registry` pinsthe TinyMemory module to a released, SHA-256-verified artifact, so a new busdiff --git a/Cargo.lock b/Cargo.lockindex c7fc2debd3..cf66c94467 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3839,17 +3839,6 @@ dependencies = ["objc2-foundation 0.3.2",]-[[package]]-name = "objc2-contacts"-version = "0.3.2"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b034b578389f89a85c055eacc8d8b368be5f04a6c1b07f672bf3aec21d0ef621"-dependencies = [- "block2 0.6.2",- "objc2 0.6.4",- "objc2-foundation 0.3.2",-]-[[package]]name = "objc2-core-data"version = "0.2.2"@@ -4184,7 +4173,6 @@ dependencies = ["tinychannels-bus","tinyconnectors-bus","tinycortex",- "tinycortex-api","tinydocs-bus","tinyflows","tinyflows-catalog",@@ -4196,7 +4184,6 @@ dependencies = ["tinyjuice-bus","tinymcp","tinymcp-bus",- "tinymemory","tinymemory-api","tinymemory-bus","tinymemory-core",@@ -6568,14 +6555,10 @@ version = "0.1.2"dependencies = ["anyhow","async-trait",- "block2 0.6.2","chrono","dirs 6.0.0","futures","log",- "objc2 0.6.4",- "objc2-contacts",- "objc2-foundation 0.3.2","parking_lot","rand 0.10.2","regex",@@ -6747,18 +6730,6 @@ dependencies = ["serde_json",]-[[package]]-name = "tinymemory"-version = "1.13.6"-dependencies = [- "anyhow",- "async-trait",- "log",- "serde",- "serde_json",- "tinymemory-api",-]-[[package]]name = "tinymemory-api"version = "0.1.1"diff --git a/Cargo.toml b/Cargo.tomlindex 866480c876..8b6a7d9427 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -16,23 +16,27 @@ autobins = false# collapsing them into one target removes ~75 full-crate link steps per test run.build = "build.rs"-# `cargo machete` reports a dependency as unused when no `use` names it. These-# two have no `use` and are still load-bearing, so they are suppressed here-# rather than deleted — an unsuppressed false positive is how a real finding-# gets ignored next time.-#-# `tinymemory` (the facade) and `tinymemory-tinycortex` (the TinyCortex-# adapter) exist for DRIVER ADMISSION: the memory subsystem resolves its-# engine through `tinymemory`'s driver registry, and the adapter is what makes-# TinyCortex admissible as that engine. Both must stay linked so a second host-# embedding the `flows` kernel profile can still bind a memory engine — see-# the 2026-08-10 entry in `scripts/kernel-floor.limits`, which ratchets them in-# deliberately. Dropping either would compile clean and fail at runtime.-#-# `tinymemory-api` and `tinymemory-core` are NOT listed: they are named-# directly by `src/openhuman/memory/`, so machete is already satisfied.+# `cargo machete` reports a dependency as unused when no `use` names it, and+# this list is empty because there is nothing left to excuse (#5560).+#+# It used to hold `tinymemory` (the facade) and `tinymemory-tinycortex` (the+# TinyCortex adapter), on the reasoning that both were load-bearing for DRIVER+# ADMISSION — the memory subsystem resolved its engine through `tinymemory`'s+# driver registry, and the adapter made TinyCortex admissible as that engine —+# so that dropping either would compile clean and fail at runtime.+#+# **That reasoning expired rather than being wrong.** `memory::binding::admit`+# is pure string matching against `MODULE_ID` and refuses+# `DriverClass::Embedded` outright, so nothing here resolves an engine through+# the facade's registry any more; the engine runs in the `tinymemory` TinyBus+# module. The facade is deleted and the adapter moved to `[dev-dependencies]`,+# where its only consumers (test fixtures) already lived.+#+# The principle it was written to protect still holds for whatever lands here+# next: an unsuppressed false positive is how a real finding gets ignored the+# time after.[package.metadata.cargo-machete]-ignored = ["tinymemory", "tinymemory-tinycortex"]+ignored = [][[bin]]name = "openhuman-core"@@ -240,7 +244,24 @@ tinytools = { path = "vendor/tinyagents/vendor/tinytools/crates/tinytools" }# out of every configuration. tinycortex remains the sole libgit2 link in the# graph, and nothing in this crate enables it. Everything else tinycortex needs# is unconditional.-tinycortex = { version = "0.1", features = [+# `tinycortex` has left the product build (openhuman#5560). The engine still+# runs — inside the prebuilt `tinymemory` TinyBus module, which links it and+# enables its `contacts` feature for the macOS address-book reader. This host+# reaches all of it through `tinymemory-api` over the bus.+#+# It is `optional` rather than deleted for one reason only: the two+# `library_profile` bins measure the in-process engine and a `[[bin]]` cannot+# use a dev-dependency, so `rss-bench` turns it on. `rss-bench` is NOT in+# `scripts/ci/product-features.txt`, so nothing shipped enables it. Every test+# that names the crate is served by the [dev-dependencies] entry instead.+#+# Its `[patch]` entry below stays, and that is not the same decision. Dropping+# the direct dependency and dropping the patch are different things: the crate+# is unpublished, and the engine crates still reached as [dev-dependencies]+# name it by version requirement, so removing the patch fails *resolution* with+# "no matching package named `tinycortex-api` found" long before anything is+# compiled.+tinycortex = { version = "0.1", optional = true, features = ["obsidian","persona","sync",@@ -254,7 +275,10 @@ tinycortex = { version = "0.1", features = [# so a third-party driver can compile against the contract without pulling in# the embedded engine. No `[patch.crates-io]` entry is needed: cargo unifies# this with the `path = "api"` dependency the engine crate already declares.-tinycortex-api = { path = "vendor/tinycortex/api" }+# `tinycortex-api` is gone with it. It had become a deprecated re-export of+# `tinymemory-bus`, so its one host use (`goals::GoalsDoc`) resolves to the+# identical item through the contract. Its `[patch]` entry stays too, for the+# reason given above.# tinymemory — the engine-neutral memory layer# (https://github.com/tinyhumansai/tinymemory). Owns the parts of the memory@@ -288,7 +312,10 @@ tinycortex-api = { path = "vendor/tinycortex/api" }# After cloning: `git submodule update --init --recursive vendor/tinyruntime`.tinyruntime-bus = { path = "vendor/tinyruntime/crates/tinyruntime-bus" }-tinymemory = { path = "vendor/tinymemory/crates/tinymemory" }+# The `tinymemory` facade is gone: no file in `src/` ever named it. It was+# kept for driver admission, but `memory::binding::admit` is pure string+# matching against `MODULE_ID` and refuses `DriverClass::Embedded` outright,+# so nothing here resolves an engine through the facade's registry.tinymemory-api = { path = "vendor/tinymemory/crates/tinymemory-api" }# tinyconnectors-bus — the OAuth connector wire contract# (https://github.com/tinyhumansai/tinyconnectors). Payload types and member@@ -306,28 +333,26 @@ tinyconnectors-bus = { path = "vendor/tinyconnectors/crates/tinyconnectors-bus"# directly (EXTRACT_ENTITIES, EMBED_TEXT, EMBEDDER_SLUG) — prefer compile# errors on renaming over MemberNotFound at runtime.tinymemory-bus = { path = "vendor/tinymemory/crates/tinymemory-bus" }-# MEASURED 2026-08-31, and it changes the endgame of #5560: this entry has **no-# production consumer**. Every `tinymemory_tinycortex::` reference in the tree is-# test code — `memory::test_support` (a `#[cfg(test)] pub(crate) mod`),-# `agent::harness::archivist_tests`, and `tests/raw_coverage/` — and-# `cargo tree -e normal -i tinymemory-tinycortex` reports `openhuman` as its only-# parent. cargo-machete already flags it, which is why it sits in `ignored` at-# the top of this file.-#-# It matters because it is a **second, independent normal edge onto-# `tinymemory-core`**: `cargo tree -e normal -i tinymemory-core` reports two-# parents, `openhuman` and this crate. So dropping the `tinymemory-core` entry-# below on the day `memory/host_impls.rs` and `memory/tree/tree_runtime/mod.rs`-# stop naming the engine will **not** take the engine out of the shipped graph —-# this line will still pull it. Moving this to `[dev-dependencies]` (which is-# where its consumers already live) is what actually sheds it, and it is a-# prerequisite for #5560, not a tidy-up after it.-#-# Deliberately NOT done in this change: it lowers the normal-graph package count,-# and `scripts/check-kernel-floor.sh` fails on a shed that was not written back-# to `scripts/kernel-floor.limits`. That write-back belongs with the manifest-# flip, which is gated on a module release and a registry re-pin.-tinymemory-tinycortex = { path = "vendor/tinymemory/crates/tinymemory-tinycortex" }+# DONE 2026-08-31, and the measurement that forced it is worth keeping, because+# it is the trap anyone auditing a shed here will fall into next.+#+# This entry had **no production consumer** — every `tinymemory_tinycortex::`+# reference in the tree is test code (`memory::test_support`,+# `agent::harness::archivist_tests`, `tests/raw_coverage/`) — yet it was a+# **second, independent normal edge onto `tinymemory-core`**: `cargo tree -e+# normal -i tinymemory-core` reported two parents, `openhuman` and this crate.+# Dropping the `tinymemory-core` entry alone would therefore NOT have taken the+# engine out of the shipped graph; this line would still have pulled it. Both+# halves had to move together, and they did.+#+# The general lesson, which the `rss-bench` comment further down states from the+# other direction: **a manifest that reads correctly is not a shed.** Verify with+# `cargo tree -e normal -i <crate>` under the product feature set — it prints+# "nothing to print" when a crate is genuinely gone.+# `tinymemory-tinycortex` is a dev-dependency now (see [dev-dependencies]).+# Its only host uses are the test fixtures that stand up an in-process engine,+# and cargo does not link dev-dependency features into the shipped binary —+# the same precedent the root `tinywallet` crate already sets.# `tinymemory-core` is the *substance* of the memory subsystem, extracted out of# `src/openhuman/memory/` — the SQLite/vector store, the markdown summary tree,# the provider sync pipelines, ingestion, recall/query/search, the ingest queue,@@ -344,7 +369,12 @@ tinymemory-tinycortex = { path = "vendor/tinymemory/crates/tinymemory-tinycortex# The `schemars` feature is enabled because the memory config *section* structs# (`MemoryConfig`, `MemoryTreeConfig`, …) now live in `tinymemory_api::host` and# are still fields of OpenHuman's `Config`, which derives `JsonSchema`.-tinymemory-core = { path = "vendor/tinymemory/crates/tinymemory-core" }+# `tinymemory-core` is optional and reached only by `rss-bench`, which is NOT+# in `scripts/ci/product-features.txt` — so it is absent from the shipped+# build. It is `optional` rather than dev-only because the two+# `library_profile` bins need it and a bin target cannot use a+# dev-dependency; every test is served by the [dev-dependencies] entry below.+tinymemory-core = { path = "vendor/tinymemory/crates/tinymemory-core", optional = true }# `tinymemory-sources` is the source registry, its types and its readers, in a# crate of its own. Taken directly rather than through `tinymemory-core`# (OpenHuman#5560): `tinymemory_core::sources` is a thin layer over it —@@ -780,6 +810,25 @@ coins-bip39 = { version = "0.8" }# downstream test harness cannot see those across a crate boundary, so the# extracted crate exposes them behind `test-support` instead.tinymemory-core = { path = "vendor/tinymemory/crates/tinymemory-core", features = ["test-support"] }+# `tinycortex` itself, for the ~11 test files that name it directly —+# `memory::read_rpc`, the sync-pipeline and tree e2e suites, the archivist and+# session suites, the composio user-scope tests. They reach engine-internal+# canonicalisation and sync-state items (`memory::ingest::canonicalize::chat`,+# `memory::sync::state::STATE_NAMESPACE`, `memory::tree::runtime`) that no+# contract family exposes. The normal entry above is `optional` and off outside+# `rss-bench`, so this is what keeps the crate available to `cargo test` — and+# cargo does not link dev-dependency features into the shipped binary, which is+# the whole point of the split.+tinycortex = { version = "0.1", features = ["obsidian", "persona", "sync"] }+# `tinymemory-tinycortex` moved here from `[dependencies]` (#5560). It is the+# adapter between TinyCortex's contract types and TinyMemory's, and every+# surviving host use of it is a test fixture standing up an in-process engine —+# `memory::test_support`, `memory::ops::test_support` and the archivist /+# session suites. Cargo does not link dev-dependency features into the shipped+# binary, so this keeps the adapter (and the `tinycortex` it names by version+# requirement) out of the product while the tests that need a real engine keep+# working.+tinymemory-tinycortex = { path = "vendor/tinymemory/crates/tinymemory-tinycortex" }# Dual-declared on purpose (same shape as the `sentry`/`axum` entries): the# optional dependency above is bin-only behind `bin-tools`, but# `agent_orchestration::tools::tools_e2e_tests` (a #[cfg(test)] LIB module),@@ -861,7 +910,33 @@ proptest = "1"# (`modules`: Contrib=ON, Product=ON) and with `scripts/ci/product-features.txt`,# which already lists it. This does NOT move the kernel floor: that profile is# `--no-default-features --features flows` and never reads this list.-default = ["media", "skills", "flows", "mcp", "channels", "medulla", "http-server", "scheduler-gate", "file-logging", "modules"]+default = ["media", "skills", "flows", "mcp", "channels", "medulla", "http-server", "scheduler-gate", "file-logging", "modules", "memory-engine-seams"]+# Compiles `memory::host_impls` and turns the optional `tinymemory-core` on with+# it (openhuman#5560). Default-ON, product-OFF, allow-listed in+# `INTENTIONALLY_NOT_FORWARDED` — forwarding it to the shell would undo the shed.+#+# **Why a feature and not `#[cfg(test)]`.** The seams install into an in-process+# engine, and the crate's own unit tests reach them through `cfg(test)` happily.+# A `tests/*.rs` integration target cannot: it links this lib as an ordinary+# dependency, where `cfg(test)` is false and the module is invisible *however+# the engine is declared*. Two dozen of those targets call+# `install_memory_host_seams`, and the archivist / session-turn / memory-sync+# cases in `raw_coverage_all` genuinely drive a real engine — they fail with+# "no EmbeddingHost installed" when it is absent, which is the same failure the+# first attempt at #5560 shipped to users. So the module needs a *feature*, and+# a feature that turns the engine dependency on.+#+# **Why `default` and not the test lane.** Three separate places compose the+# test feature string (`scripts/test-rust-with-mock.sh`,+# `test-reusable.yml`, `scripts/ci/rust-coverage-changed.sh`) and one+# `raw_coverage_all` invocation passes `--features` not at all. None of them+# passes `--no-default-features`, so `default` reaches every one; a+# test-lane-only feature would have to be added to each and would fail+# confusingly wherever it was missed. It costs the contributor inner loop+# nothing it was not already paying: before this change `tinycortex` and+# `tinymemory-core` were unconditional normal dependencies, so a bare+# `cargo check` linked them regardless.+memory-engine-seams = ["dep:tinymemory-core"]# HTTP + Socket.IO server transport (#5048): the `/rpc` JSON-RPC endpoint and# its auth middleware/CORS layer (`core::jsonrpc`, `core::auth`), the `/v1`# OpenAI-compatible router (`inference::http`), the ad-hoc static-dir file@@ -1091,7 +1166,16 @@ runtime-node = []# the build, it just quietly does nothing. Hence the forward below, and# `contacts_feature_reaches_the_engine_reader` in `memory/people/mod.rs`, which# fails if this is ever flattened back into local `dep:` entries.-contacts = ["tinymemory-core/contacts"]+# Nothing host-side is gated on `contacts` any more — its whole job was+# forwarding into the engine so tinycortex's macOS CNContactStore reader+# compiled. That reader now lives in the `tinymemory` module, whose own+# manifest enables `tinycortex/contacts`, and `people.refresh_address_book`+# reaches it through `MemoryPeople::seed_from_address_book` over the bus.+#+# The gate name is kept because `scripts/ci/product-features.txt` and the+# shell's forwarded list are asserted equal by the Feature Forwarding Gate,+# and removing it from one without the other fails that lane.+contacts = []# Media-generation + image domains: the `media_generate_*` agent tools# (image/video via GMI through the backend) and the `openhuman::image` tool# contracts scaffold. Default-ON. Slim builds opt out via@@ -1321,26 +1405,25 @@ file-logging = ["dep:tracing-appender", "dep:tracing-log"]scheduler-gate = ["dep:starship-battery"]bin-tools = ["dep:clap", "dep:env_logger"]-# `rss-bench = []` is correct today and must NOT stay empty through #5560.+# That day arrived (#5560), and this is the other half of the flip.## `src/bin/library_profile/scenarios/{cold_phases,memory_ingest}.rs` name-# `tinymemory_core::` on purpose — they measure the in-process engine, and-# routing them through `memory::binding` would measure the *null* driver instead-# — and **a `[[bin]]` cannot use a dev-dependency**. So on the day-# `tinymemory-core` stops being a normal dependency, this has to become-# `rss-bench = ["dep:tinymemory-core"]` with that entry marked `optional = true`,-# or `--features rss-bench` breaks in a configuration no CI lane compiles.-#-# Doing it AHEAD of that day is a measured no-op, not an early win. Tried-# 2026-08-31: the product lib still compiles with the entry optional and this-# list still empty, because the non-optional `[dev-dependencies]` entry activates-# the optional normal one — `cargo tree -e normal -i tinymemory-core` is-# byte-identical before and after, so nothing is shed. What the marker would buy-# is the appearance of a shed plus a production build whose only reason for-# having the crate is a dev-dependency side effect. Keep the honest non-optional-# entry until the two files that still name the engine are clean, then flip both-# halves together.-rss-bench = []+# `tinymemory_core::` and `tinycortex::` on purpose — they measure the+# in-process engine, and routing them through `memory::binding` would measure+# the *null* driver instead — and **a `[[bin]]` cannot use a dev-dependency**.+# So both crates stay in `[dependencies]` marked `optional = true` and are+# reached only from here; without this list `--features rss-bench` would break+# in a configuration no CI lane compiles.+#+# The warning this comment used to carry still stands for anyone reading it as+# precedent: marking an entry `optional` while this list stayed empty was a+# measured no-op, because the non-optional `[dev-dependencies]` entry activates+# the optional normal one and `cargo tree -e normal -i tinymemory-core` came out+# byte-identical. What made it real was draining the production callers first —+# the appearance of a shed and an actual shed are only the same thing once+# nothing in the product names the crate. Verify with `cargo tree -e normal -i`+# under the product feature set, not by reading the manifest.+rss-bench = ["dep:tinycortex", "dep:tinymemory-core"]# Adds dhat heap profiling on top of `rss-bench` for the `library-profile`# binary. Default-OFF, dev-only: installs dhat's global allocator, which# perturbs RSS/timing numbers, so it is a separate opt-in feature rather thandiff --git a/scripts/kernel-floor.limits b/scripts/kernel-floor.limitsindex 8047e9403a..bd558a051f 100644--- a/scripts/kernel-floor.limits+++ b/scripts/kernel-floor.limits@@ -13,6 +13,40 @@# Simulate with: scripts/dep-sim.py --cut <crates>## History+# 288/270/2 2026-08-31 openhuman#5560: the memory engine crates leave the+# product build. `tinycortex`, `tinycortex-api`, the+# `tinymemory` facade, `tinymemory-tinycortex` and+# `tinymemory-core` are all out of the NORMAL dependency+# graph — verified with `cargo tree -e normal -i <crate>`+# under the product feature set, which prints "nothing to+# print" for each. `tinycortex` and `tinymemory-core`+# survive as `optional = true` reached only by `rss-bench`+# (the two `library_profile` bins measure the in-process+# engine and a [[bin]] cannot use a dev-dependency); the+# tests that need a real engine are served by+# [dev-dependencies], which cargo does not link into the+# shipped binary. (-6 packages, -6 NAMES, native+# unchanged at 2.)+#+# READ THE PACKAGE NUMBER CAREFULLY — it goes 286 -> 288+# against this file while going 294 -> 288 against+# reality, and only the second is what this change did.+# The 286/270 entry below was already unmet when this+# branch started: `scripts/kernel-floor.sh flows` on+# upstream/main measured 294/276/2, so BOTH gates were+# failing before a line of #5560 landed, and the packages+# limit had been stale by 8 for a day. This entry records+# the measured floor rather than carrying that drift+# forward silently. The names half needed no raise at all:+# the shed lands it on exactly the 270 already written+# here, which is why `dep-sim --expect-names 270` in+# ci-lite.yml is left alone (its prose claimed 273 and was+# wrong in the other direction — corrected there, argument+# untouched).+#+# The remaining 2-package gap to 286 is pre-existing and+# NOT diagnosed here. Whoever closes it should start by+# diffing the package list against the 2026-08-30 entry.# 286/270/2 2026-08-30 moving flows::store.rs / flows::draft_store.rs and# the copilot's authoring prompts upstream split the# `tinyflows` crate's catalog/storage/copilot surface into@@ -525,4 +559,4 @@# (libsqlite3-sys, ring) — see docs/plans MIGRATION-PLAN G6.# 307/284 2026-08-12 Re-baseline after the upstream lockfile resolution;# `flows` remains at two native packages.-flows:286:270:2+flows:288:270:2diff --git a/scripts/lib/feature-forwarding.mjs b/scripts/lib/feature-forwarding.mjsindex 7f13db2b2e..4d942fb153 100644--- a/scripts/lib/feature-forwarding.mjs+++ b/scripts/lib/feature-forwarding.mjs@@ -52,6 +52,7 @@ export const INTENTIONALLY_NOT_FORWARDED = {// 'some-gate': 'Reason it must not ship in the desktop build.',tui: 'Terminal UI subcommand (openhuman tui/chat); the desktop app ships its own Tauri UI and never runs the ratatui terminal front-end. NOTE: `tui` is also default-OFF, so it is in NEITHER the contributor nor the product set and no ordinary lane compiles it — the feature-gate-smoke lane checks it explicitly. Any future entry here in the same position needs the same treatment.',medulla: 'Medulla orchestration-backend client; the desktop app is OpenHuman\'s own product and never dials a Medulla backend. Consumed by the Medulla TUI, which embeds this crate directly.',+ 'memory-engine-seams': 'Compiles `memory::host_impls` — the seven host seams for an IN-PROCESS `tinymemory-core` — and turns that optional engine dependency on. Forwarding it would undo openhuman#5560 exactly: the shipped app reaches memory through the loaded tinymemory TinyBus module over `tinymemory-api`, and a second in-process engine over the same `memory.db` is the duplicate this shed removed. It is in `default` (not the product set) because `tests/*.rs` integration targets link this lib as a NORMAL dependency, where `#[cfg(test)]` is false and the module would be invisible however the engine is declared — several of them do drive a real engine and fail with "no EmbeddingHost installed" without it.',};/**diff --git a/src/core/memory_cli.rs b/src/core/memory_cli.rsindex de2852bfb4..5c6b038993 100644--- a/src/core/memory_cli.rs+++ b/src/core/memory_cli.rs@@ -545,14 +545,16 @@ async fn create_memory_binding(}}- // 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(),- ));+ // The contract event sink, plus the `[modules]` policy a module-backed+ // driver needs published before it can load. Both idempotent.+ //+ // The seven engine seams that used to be installed here went with+ // `tinymemory-core` (#5560) — this process embeds no engine, and every+ // `memory` subcommand routes through `binding::for_workspace` below. The+ // two that did not, `ingest` and `query`, resolved an in-process client+ // and no longer exist. The sink is a `tinymemory-api` seam, not an engine+ // one, and stays for the reason spelled out in `runtime::context`.+ crate::openhuman::memory::host::install_memory_event_sink();#[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 c780b22fb0..1b2e312d2a 100644--- a/src/core/runtime/context.rs+++ b/src/core/runtime/context.rs@@ -596,24 +596,34 @@ pub async fn init_stores(domains,);if plan.memory {- // 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.+ // The engine seams are gone from here (#5560). They installed embedding+ // / chat / config / NLP / scheduler / shutdown / error-reporting+ // callbacks into *this process's* copy of `tinymemory-core`, and that+ // copy no longer exists: the crate has left `[dependencies]`, so+ // `memory::host_impls` compiles only under `memory-engine-seams`+ // (default-ON, product-OFF) and the module answers these+ // over the bus through `modules::memory_host` instead.//- // #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+ // The first attempt at this removal shipped an outage, and the reason+ // is worth keeping. It was not that the seams were needed in the+ // abstract — it was that `session::builder::factory` still reached// `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.+ // `require_embedding_host()` on the chat hot path, so every chat turn+ // died with "no EmbeddingHost installed". That caller is gone, along+ // with `ops::helpers::active_memory_client`, the `global::{init,+ // client_if_ready}` sites and the `tree_runtime` glob; the only+ // remaining namers of the engine crate are test-only, served by+ // the `[dev-dependencies]` entry. A dev-dependency is not linked into+ // the shipped binary, so there is nothing left here to call back.//- // 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()));+ // The event sink is NOT one of those seams and must stay. It installs+ // into `tinymemory-api` — the contract crate, still a normal+ // dependency — and `memory::sync::composio::bus` publishes+ // `ComposioIntegrationsChanged` through it from production host code.+ // `tinymemory_api::events::publish` *silently drops* when unwired, by+ // design, so losing this install would be an invisible regression+ // rather than a loud one.+ crate::openhuman::memory::host::install_memory_event_sink();// 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 0bb07bd8e8..876462f39e 100644--- a/src/openhuman/agent/debug/mod.rs+++ b/src/openhuman/agent/debug/mod.rs@@ -227,16 +227,19 @@ async fn load_dump_config(}// The `agent` CLI dispatches straight to this dumper and never runs the- // runtime bootstrap, so nothing else wires the `tinymemory-core` host- // seams. Building a session agent constructs a memory store, and the- // embedding seam fails loudly when unwired ("no EmbeddingHost installed")- // rather than degrading — so without this, every `agent dump-prompt` /- // `dump-all` invocation aborts before rendering a single prompt.- // Idempotent, so calling it per invocation is safe. Same rationale as- // `memory_cli` / `subconscious_cli`.- crate::openhuman::memory::host_impls::install_memory_host_seams(std::sync::Arc::new(- config.clone(),- ));+ // runtime bootstrap, so nothing else wires the host's memory seams.+ //+ // The `tinymemory-core` seams this used to install are gone with the crate+ // (#5560). The reason they were needed — building a session agent+ // constructed an in-process memory store whose embedding seam failed loudly+ // when unwired — no longer holds: `session::builder::factory` stopped+ // booting one, so `dump-prompt` reaches no engine to call back into.+ //+ // The contract event sink still installs, idempotently, for the same reason+ // as in `runtime::context`: it is a `tinymemory-api` seam with a live+ // production publisher, and it drops silently rather than loudly when+ // unwired. Same rationale as `memory_cli` / `subconscious_cli`.+ crate::openhuman::memory::host::install_memory_event_sink();Ok(config)}diff --git a/src/openhuman/inference/embeddings/mod.rs b/src/openhuman/inference/embeddings/mod.rsindex 4c69e1fb3d..ea2217abe5 100644--- a/src/openhuman/inference/embeddings/mod.rs+++ b/src/openhuman/inference/embeddings/mod.rs@@ -49,8 +49,19 @@ 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).-// Its sole caller is `memory::host_impls`, which is unconditional again.-pub(crate) use factory::{model_supports_dimensions, MODELS_SUPPORTING_DIMENSIONS};+// Read only by `modules::ops`, so gated with it — otherwise every feature set+// without `modules` (the `flows` lane among them) carries an unused-import+// warning. Pre-dates #5560; fixed here because the line next to it moved.+#[cfg(feature = "modules")]+pub(crate) use factory::MODELS_SUPPORTING_DIMENSIONS;+// Its sole caller through this re-export is `memory::host_impls`, which is+// gated on `memory-engine-seams` since the engine crates left the product+// build (#5560) — so the re-export is too, or the product lane fails on+// `-D warnings`. The+// function itself is not test-only: `factory` and `embeddings::rpc` both reach+// it directly through `super::factory::`, which is why only the re-export moves.+#[cfg(any(test, feature = "memory-engine-seams"))]+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.pub use noop::NoopEmbedding;@@ -58,6 +69,12 @@ pub use provider_trait::{format_embedding_signature, EmbeddingProvider, TinyAgentsEmbeddingProvider,};pub use rpc::provider_from_config;+// Reached through this re-export by `modules::memory_host` (serving the seam+// over the bus) and by `memory::host_impls` (serving it in-process, and+// gated on `memory-engine-seams` since #5560). `embeddings::rpc` itself names+// the function+// through `super::rpc`, not through here, so this gate does not narrow it.+#[cfg(any(test, feature = "modules", feature = "memory-engine-seams"))]pub(crate) use rpc::resolve_api_key;pub use schemas::{all_controller_schemas as all_embeddings_controller_schemas,diff --git a/src/openhuman/memory/direct_engine_refs_tests.rs b/src/openhuman/memory/direct_engine_refs_tests.rsindex 5bfbc2fa61..05128d305f 100644--- a/src/openhuman/memory/direct_engine_refs_tests.rs+++ b/src/openhuman/memory/direct_engine_refs_tests.rs@@ -15,10 +15,23 @@//!//! A direct `tinymemory_core::…` call gets neither. It is a second, unpoliced//! door into the same subsystem, and two doors into one capability is a-//! capability whose behaviour can diverge. `tinymemory-core` also stays linked-//! into the shipped binary — 1.44 MB of `.text`, the 7th largest crate — for as-//! long as any of these remain, which is the visible symptom rather than the-//! disease (#5560).+//! capability whose behaviour can diverge. That is the disease, and it is the+//! only reason this lint still exists.+//!+//! **The symptom is gone: `tinymemory-core` is no longer linked into the+//! shipped binary** (#5560). It used to cost 1.44 MB of `.text` as the 7th+//! largest crate, and that sentence stood here for as long as any entry+//! remained. It no longer follows. The crate left `[dependencies]` on+//! 2026-08-31 while this list still held nine entries, because **every+//! surviving entry is test-only code**, served by the `[dev-dependencies]`+//! entry that cargo does not link into the product. `cargo tree -e normal -i+//! tinymemory-core` under the product feature set prints "nothing to print".+//!+//! Read the consequence carefully, because it inverts what this file used to+//! assume: **a non-empty list no longer means a linked engine.** Draining the+//! rest is still worth doing — a second door is a correctness problem whether+//! or not it ships — but it buys no bytes, and nobody should size it as though+//! it did.//!//! # This lint is a ratchet, not an invariant//!@@ -363,7 +376,7 @@ const ALLOWED: &[(&str, Verdict, &str)] = &[("src/openhuman/memory/host_impls.rs",Verdict::HostSide,- "installs the seven host seams (embedding, chat, config, nlp, scheduler gate, shutdown, error reporter) and now nothing else. The seams have no in-process caller left at all now that the tree_runtime glob is deleted: they are reached from the far side of the bus, where modules/memory_host.rs serves the same seven for the loaded module, and unwiring them would fail that module's summariser run with 'no ChatHost installed'. The in-process chunk-store recovery door (engine::backend::chunks::recover_corrupt_db, called from the StoreCorruptQuarantined arm) was an eighth reason until #5560 deleted it: every in-process reader it protected had already migrated — sources::status onto MemoryChunks::source_ingest_status, recall onto the binding's driver — leaving only #[cfg(test)] openers, so it was the last production call that opened the host's chunk store rather than a door onto anything. Composio had a seam here too until tinymemory v1.13.4 deleted ComposioHost with the rest of the in-process pipeline",+ "installs the seven host seams (embedding, chat, config, nlp, scheduler gate, shutdown, error reporter) into an in-process engine, and the whole module sits behind the default-ON/product-OFF `memory-engine-seams` feature since #5560 — it is listed here only because this lint scans source text and does not track cfg. A feature rather than #[cfg(test)] because a tests/ integration target links this crate as an ordinary dependency, where cfg(test) is false and the module would be invisible however the engine is declared, and two dozen of them install these seams. Its production callers are gone: runtime::context, memory_cli and agent::debug install memory::host::install_memory_event_sink() instead, which is a tinymemory-api seam (still a normal dependency) with a live host-side publisher in memory::sync::composio::bus. That split is load-bearing — tinymemory_api::events::publish drops silently when unwired, so folding the sink in here would have removed a live event path with no error anywhere. What still needs these installs is install_for_tests, whose ~90 callers stand up a real in-process engine from the [dev-dependencies] entry. The seams themselves are also served for the LOADED module by modules/memory_host.rs, over the module's own inbound interfaces — a separate mechanism, since a cdylib has its own statics and never saw what was set here",),// ── Retrieval: filters the seam's tree family has no room for ───────────// ── Agent tools: chunk reads, source listing, people, source scope ──────@@ -562,12 +575,23 @@ fn nothing_is_left_migratable() {}/// The blocked set is the upstream ask, so it must be non-empty for as long as-/// the engine is still linked — and empty when it is not.+/// any file still names the engine crate — and empty when none does.+///+/// **This test was written to be self-proving and was not.** Its premise was+/// that "the crate is dropped" and "`ALLOWED` empties" are the same event, so+/// that the day one happened the other would force the module docs above to be+/// rewritten. #5560 falsified that on 2026-08-31: `tinymemory-core` left+/// `[dependencies]` with **nine entries still listed**, and this assertion did+/// not move, because [`scan`] reads source text and every surviving entry is+/// test-only code that the `[dev-dependencies]` entry still compiles.+///+/// The rewrite happened anyway — by hand, not because a test demanded it. Do+/// not restore the old wording, and do not add an assertion tying this list to+/// the manifest: the two are genuinely independent now, and a lint that claimed+/// otherwise would fail for a build that is correct.///-/// This is the test that makes "`tinymemory-core` left the build" self-proving:-/// on the day the crate is dropped, [`scan`] returns nothing, `ALLOWED` empties,-/// and this assertion is what forces the module docs above to be rewritten-/// rather than left describing a world that no longer exists.+/// What it still buys is the honest half: a list that empties while files+/// remain, or files that remain while the list empties, is a broken scanner.#[test]fn the_blocked_set_matches_the_engine_still_being_linked() {let blocked = ALLOWED@@ -580,8 +604,10 @@ fn the_blocked_set_matches_the_engine_still_being_linked() {.count();assert!(blocked > 0 || host_side > 0,- "nothing references tinymemory-core any more — drop the path dependency from Cargo.toml, \- remove its cargo-machete `ignored` entry, ratchet scripts/kernel-floor.limits, and rewrite \- this module's docs (#5560)"+ "nothing references tinymemory-core any more — drop the remaining \+ [dev-dependencies] entry from Cargo.toml and rewrite this module's docs. \+ The [dependencies] entry, the cargo-machete `ignored` list and \+ scripts/kernel-floor.limits were all settled in #5560, when the crate left \+ the product build with this list still non-empty");}diff --git a/src/openhuman/memory/host_impls.rs b/src/openhuman/memory/host_impls.rsindex dc650906cb..2ce1d6c002 100644--- a/src/openhuman/memory/host_impls.rs+++ b/src/openhuman/memory/host_impls.rs@@ -7,12 +7,51 @@//! are about *capability*: building providers, loading config, running spaCy,//! throttling background work, reporting errors.//!+//! # This whole module is behind `memory-engine-seams` (#5560)+//!+//! `tinymemory-core` has left the product build. It is a `[dev-dependencies]`+//! entry plus an `optional = true` normal one that only `memory-engine-seams`+//! and `rss-bench` turn on, so the engine these seams install into does not+//! exist in anything shipped — and neither does this module.+//!+//! The gate is a **feature** rather than `#[cfg(test)]`, and the reason is+//! worth knowing before "simplifying" it: a `tests/*.rs` integration target+//! links this crate as an ordinary dependency, where `cfg(test)` is false, so a+//! `#[cfg(test)]` module is invisible to it however the engine is declared. Two+//! dozen of those targets call [`install_memory_host_seams`], and several of+//! them drive a real in-process engine — the archivist, session-turn and+//! memory-sync cases in `raw_coverage_all` fail with "no EmbeddingHost+//! installed" without it, which is the same failure the first attempt at #5560+//! shipped to users. `memory-engine-seams` is default-ON, product-OFF and+//! allow-listed in `INTENTIONALLY_NOT_FORWARDED`.+//!+//! **The feature makes the engine available, not used.** In a default build+//! nothing in production reaches it: the boot sites install only the contract+//! event sink, so a linked-but-unwired engine is never called and the seams'+//! fail-loud behaviour is never triggered.+//!+//! Production reaches the engine through the loaded TinyMemory module over the+//! bus, and+//! `modules::memory_host` serves the same seven capabilities there through the+//! module's own inbound interfaces, which are a different mechanism entirely: a+//! `cdylib` has its own statics, so nothing installed here was ever visible to+//! it, and nothing it installs is visible here.+//!+//! **The contract event sink is not one of these seams and is not gated.** It+//! installs into `tinymemory_api`, which is still a normal dependency, and+//! `memory::sync::composio::bus` publishes `ComposioIntegrationsChanged`+//! through it from production host code. Each boot site calls+//! [`super::host::install_memory_event_sink`] directly for that reason —+//! `tinymemory_api::events::publish` drops silently when unwired, so folding it+//! in here would have removed a live event path without a single error.+//!//! # They are process-globals, installed once//!//! Every one is reached through a `set_*` installer that-//! [`install_memory_host_seams`] calls during startup wiring, before any memory-//! work begins. That mirrors the shape the subsystem had before the extraction,-//! when these were free functions it called directly.+//! [`install_memory_host_seams`] calls, before any memory work begins. That+//! mirrors the shape the subsystem had before the extraction, when these were+//! free functions it called directly; [`install_for_tests`] is the one caller+//! that matters now.//!//! # Why several of them capture an `Arc<Config>`//!@@ -25,7 +64,7 @@//! should be live. Seams that must be live (`ConfigLoader`) take a `&Config`//! argument and re-read instead.//!-//! # What is left alive here, and what stopped being a reason (#5560)+//! # How this came to be test-only, and the wrong argument for it (#5560)//!//! `memory::binding` refuses `DriverClass::Embedded` outright — "embedded//! memory drivers are no longer supported; use the 'tinymemory' module driver"@@ -36,7 +75,9 @@//! to check**: it governs what answers a `MemoryProvider` call and says nothing//! about the free-function engine surface a call site can reach around the//! binding entirely — the "second unpoliced door" `memory::direct_engine_refs`-//! is a ratchet over.+//! is a ratchet over. The argument that eventually held is the one below:+//! caller by caller, until the free-function surface had no production reader+//! and the crate could leave the manifest.//!//! **Every production path this section used to name is now gone.** They went//! one contract round at a time, and the list is worth keeping because it is@@ -90,11 +131,14 @@//! — `modules::memory_host`'s `into_domain_event` publishes it and returns//! `None`, exactly as `memory::host`'s in-process sink does.//!-//! **The question to re-ask is not "is the driver embedded" but "does any-//! production caller still reach an engine free function".** `grep -rn-//! 'tinymemory_core::' src --include='*.rs'` outside comments is the inventory-//! for *this* file's installs; when it is empty they are dead and go with the-//! manifest entry, in the same change.+//! **The question to re-ask was not "is the driver embedded" but "does any+//! production caller still reach an engine free function".** That inventory is+//! now empty, and it was emptied rather than argued away: `session::builder::+//! factory` stopped booting `global::init(workspace).memory_handle()`,+//! `ops::helpers::active_memory_client` was deleted, and `memory_cli`'s+//! `ingest`/`query` engine-client resolver went with it. What is left naming+//! `tinymemory_core::` is `#[cfg(test)]`, which the `[dev-dependencies]` entry+//! serves and the shipped binary does not link.//!//! **That grep is not the inventory for #5560 as a whole, and the difference//! matters.** #5560 sheds two crates, and `memory::direct_engine_refs` ratchetsdiff --git a/src/openhuman/memory/host_impls_boot_seam_tests_tests.rs b/src/openhuman/memory/host_impls_boot_seam_tests_tests.rsindex f6c0eeca99..eae4780671 100644--- a/src/openhuman/memory/host_impls_boot_seam_tests_tests.rs+++ b/src/openhuman/memory/host_impls_boot_seam_tests_tests.rs@@ -2,35 +2,47 @@ 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+/// This began as the regression for an 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". At the time it did embed one — `session::builder::factory` reached+/// `store::factories::create_session_memory_with_local_ai`, which calls+/// `require_embedding_host()` — and every chat turn 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.+/// **That caller is gone, and so is the production install.** `tinymemory-core`+/// is out of the product build now — a `[dev-dependencies]` entry plus an+/// `optional` normal one that only `memory-engine-seams` and `rss-bench` turn+/// on — and [`super`] is gated on the same feature. What the assertion guards+/// has therefore changed, and it is worth being exact about which claim is+/// still being tested: not that *boot* wires the engine, but that+/// [`install_for_tests`] does — the ~90 test call sites that stand up an+/// in-process engine all depend on it, and nothing in a build or a type check+/// says whether the `set_*` globals actually took.///-/// It asserts the engine's own accessor rather than a local flag, so it-/// keeps testing the thing the engine actually reads.+/// The original reason for asserting the engine's own accessor rather than a+/// local flag is unchanged, and is why this survived the migration rather than+/// being deleted with the boot sites: it keeps testing the thing the engine+/// actually reads.+///+/// The production half of the old claim now lives in+/// `runtime::context::init_stores`, which still installs the *contract* event+/// sink — a `tinymemory-api` seam with a live host-side publisher in+/// `memory::sync::composio::bus`, and one that drops silently rather than+/// loudly when unwired.#[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"+ "install_for_tests installed no EmbeddingHost; every test that stands up an \+ in-process memory client calls require_embedding_host() and will fail");assert!(tinymemory_core::embedding_host::require_embedding_host().is_ok(),- "require_embedding_host must succeed once the boot seams are in"+ "require_embedding_host must succeed once the test seams are in");}diff --git a/src/openhuman/memory/mod.rs b/src/openhuman/memory/mod.rsindex d43ccf28fd..c1a68508a7 100644--- a/src/openhuman/memory/mod.rs+++ b/src/openhuman/memory/mod.rs@@ -40,12 +40,19 @@ pub mod guard;pub mod host;/// Host implementations of the seam traits the ENGINE declares.///-/// `#[cfg(test)]` because the production host embeds no engine any more: the+/// Behind `memory-engine-seams` (default-ON, product-OFF) because the+/// production host embeds no engine any more: the/// module installs its own seams and this host answers it over the bus through/// [`crate::openhuman::modules::memory_host`] instead. What still needs these/// 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.+///+/// The contract-side event sink is deliberately **not** in here: it installs+/// into `tinymemory_api`, not the engine, and `memory::sync::composio::bus`+/// publishes through it from production host code. It is installed directly by+/// each boot site — see [`host::install_memory_event_sink`].+#[cfg(any(test, feature = "memory-engine-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