You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Delete tinycortex and tinymemory-core from OpenHuman entirely — the [dev-dependencies] entries, the memory-engine-seams feature, memory/host_impls.rs, and the rss-bench bins.
The product build is already engine-free.#5560 finished that on 2026-08-31, verified rather than assumed:
$ PF=$(bash scripts/ci/product-features.sh)
$ cargo tree -e normal --no-default-features --features "$PF" -i tinycortex
warning: nothing to print.
$ cargo tree -e normal --no-default-features --features "$PF" -i tinymemory-core
warning: nothing to print.
So this is not a binary-size or dependency shed. What still compiles 133k lines of engine is the test suite.
This is a test-surface shed.
Shape: two PRs and a submodule bump. One upstream (tinyhumansai/tinymemory#147), then one here. No tinymemory release and no modules/registry.rs re-pin — see "Why no release is needed".
Problem / Context
Three doors still let the engine in, all of them test or bench
No file in src/openhuman/ names tinycortex:: in production code. grep -rln "tinycortex::" src/openhuman/
returns 48 files, but 36 mention it only in doc comments and all 12 code-referencing files are *_tests.rs
or test_support.
Most of these tests are duplicates
tests/raw_coverage/memory_raw_coverage_e2e.rs imports tinycortex::memory::ingest::canonicalize::{chat,document,email}, tinymemory_core::store::chunks::store::upsert_chunks, tree::summarise::fallback_summary and sources::status::source_status. Every one of those modules already ships its own *_tests.rs sibling
upstream.
A test that names the engine is one of two things, and the difference is not visible from the file it sits in:
Does the assertion depend on what the driver returns, or on what OpenHuman does to what the driver
returns?
First → delete. It is an engine test in the wrong repo, and upstream owns it.
Second → repoint onto the fake driver. It is an OpenHuman test that only needed a driver to answer.
Both live in the same file. read_rpc_tests_part_01_tests.rs names zero engine types and holds both:
The trace makes it decidable: list_chunks_rpc → list_chunks_page → chunk_query_from_filter → provider().as_chunks(). OpenHuman owns limit/offset defaulting, the filter→query translation, the
"filter matches nothing, skip the query" short-circuit and the response shaping. The driver owns the filtering.
Repointing an engine-semantics test is worse than deleting it — it then asserts the fake driver's
filtering, which is code written to make the test pass. When in doubt, delete: the burden of proof is on
keeping a test, not on removing one.
Why no release is needed
The release-plus-re-pin gate exists for the module cdylib's wire surface. Nothing here touches it. What the
host needs from upstream is one source crate: tinymemory-conformance is publish = false and is taken by
path exactly like tinymemory-api, so a chore(vendor) submodule bump is the whole mechanism. It costs zero new packages — its dependencies are tinymemory-api, async-trait, serde_json and anyhow, all
already in the product graph.
Expect a compile-time win, not a dependency win
Of tinycortex's ~170 transitive packages, all but five are already in the product graph for other reasons.
Deleting the engine removes exactly tinycortex, tinycortex-api, tinymemory-core, tinymemory-sync, tinymemory-tinycortex and nothing beneath them — the same ≈ −1 package result the TinyMemory port, the tinymcp extraction and the channels gate all landed at.
What it buys: 133k LOC off the test critical path (the module manifest measures those two crates at 14.7 s of the host build) and 25.7k LOC of memory test code that stops being OpenHuman's to maintain.
RecordingProvider — all 27 families, records calls, answers empty
memory/guard/in_memory.rs
374
InMemoryProvider — mandatory three, with real storage
Both name zero engine types across 1,922 lines, and their crate:: references are almost entirely crate::openhuman::memory::api::* — a documented pub use of tinymemory-api, so a mechanical rewrite. Exactly 3 references name a type that is genuinely this repo's
(DriverClass). Upstream's tinymemory-conformance::InMemoryProvider is the same idea implemented a third
time; PR 1 consolidates them. (in_memory.rs is deliberately not #[cfg(test)]; RecordingProvider is,
which today confines it to lib tests — moving it upstream lifts that.)
Plus only the engine assertions that provably have no upstream twin. Default posture is delete, not move: a test moves upstream only when the diff shows the
module it covers has no equivalent there. tree::summarise's fallback_summary is the one confirmed case.
Then a chore(vendor) submodule bump here.
PR 2 — this repo, three commits
Commit 1 — repoint, engine still linked. Rewrite memory/test_support/mod.rs to construct the conformance
driver instead of TinycortexProvider; the 59 install_tinycortex_for_test call sites across 18 files need no
edit. What does need editing: the four engine-backed test_support modules under memory/ops/, memory/tree/retrieval/, memory/tree/tree_runtime/ and memory/tool_memory/, which reach tinymemory_core::store and tree_runtime::engine directly to seed rows; and the install_memory_host_seams() calls in the 29 tests/*.rs targets, which have nothing to install once there is
no in-process engine.
The engine is still a dev-dependency at this commit, and that is the point: both drivers are constructible
in the same build, so the suite can be run against each and compared. That comparison is the only real defence
against the fake driver quietly diverging, and it is impossible after commit 3. There is precedent for its
shape upstream — module_e2e.rs::the_module_matches_the_in_process_engine_for_the_same_input does the same
across the bus boundary.
Commit 2 — delete. Every test whose assertion depends on what the driver returns. tests/coding_sessions_feature.rs and tests/raw_coverage/memory_tree_embed_round25_raw_coverage_e2e.rs name
no OpenHuman type at all and go whole; the rest are per-test decisions inside the mixed files, by the rule
above.
Commit 3 — cut the manifest. Atomic, because the dev-dependency drop cannot compile while a consumer
survives. Drop the three [dev-dependencies]; delete memory-engine-seams, memory/host_impls.rs and its INTENTIONALLY_NOT_FORWARDED entry; delete rss-bench, rss-bench-dhat, src/bin/rss_bench.rs and src/bin/library_profile/; delete memory/direct_engine_refs_tests.rs, whose ratchet has nothing left to
count.
Also in this commit: delete the 1,922 lines of fakes that moved upstream in PR 1 — memory/guard/test_support_part_01.rs, _part_02.rs and memory/guard/in_memory.rs — and take tinymemory-conformance as a dev-dependency in their place. It costs zero new packages: its dependencies are tinymemory-api, async-trait, serde_json and anyhow, all already in the product graph. The guard tests
that drive those fakes stay here and import them from the crate.
A fourth commit, separately: remove the [patch.crates-io] entries. tinycortex and tinycortex-api are
unpublished and the crates.io tinycortex is a stale 0.1.1 without the engine features, so any surviving crate
naming either by version requirement fails resolution — no matching package named tinycortex-api found —
before anything compiles. Confirm resolution after commit 3, then drop the patches.
Not in scope
The host layer stays.src/openhuman/memory/ is 67k LOC and its README states the split. guard/, binding.rs + driver/, schemas/ + read_rpc/ + ops/, tools/ + query/ + agent/ and source_scope.rs all stay, and keep the tests that assert their behaviour — on the fake driver.
tinymemory-api, tinymemory-bus, tinymemory-sources stay. In the product graph; the contract, not
the engine.
The MemorySourceSync bus leg. The module's sync methods are asserted routed by every_declared_method_is_actually_routed and never driven. That is a real gap, but it is coverage that
has never existed anywhere rather than coverage being migrated, so it is its own issue and not on this path.
src/bin/library_profile/ is the only in-process engine RSS/cold-phase profile that exists. Commit 3 deletes
it. If it is worth keeping, it moves to tinymemory in PR 1, where a bin may depend on the engine freely —
otherwise it goes. One decision, not a blocker.
Acceptance criteria
Engine gone from every graph — cargo tree -e normal,dev --features "$(bash scripts/ci/product-features.sh)" -i <crate> prints "nothing to print" for tinycortex, tinycortex-api, tinymemory-core, tinymemory-sync and tinymemory-tinycortex.
Contract crates survive — the same command prints a tree for tinymemory-api, tinymemory-bus and tinymemory-sources.
No test asserts engine behaviour any more — every surviving memory test asserts what OpenHuman does to what the driver returns, not what the driver returns.
Driver equivalence proven — commit 1 shows the memory suite passing against the conformance driver and the in-process engine in the same build, with any divergence explained rather than papered over.
Manifest cut — no tinycortex / tinymemory-core / tinymemory-tinycortex in [dependencies] or [dev-dependencies]; memory-engine-seams, rss-bench and rss-bench-dhat deleted along with memory/host_impls.rs, src/bin/rss_bench.rs, src/bin/library_profile/ and memory/direct_engine_refs_tests.rs; check-feature-forwarding.mjs passes with the allowlist entry removed.
RPC surface unchanged — every memory*, memory_tree*, memory_sync*, memory_sources*, memory_goals* and people* method behaves identically and /schema is byte-identical.
Coverage moved, not lost — the assertions deleted here either exist upstream already or landed there in PR 1.
Disabled build green — GGML_NATIVE=OFF cargo test --lib --no-default-features --features flows memory:: passes; the CI smoke lane runs cargo check only and never compiles test code, so a disabled-build test break is invisible to it.
Summary
Delete
tinycortexandtinymemory-corefrom OpenHuman entirely — the[dev-dependencies]entries, thememory-engine-seamsfeature,memory/host_impls.rs, and therss-benchbins.The product build is already engine-free. #5560 finished that on 2026-08-31, verified rather than assumed:
So this is not a binary-size or dependency shed. What still compiles 133k lines of engine is the test suite.
This is a test-surface shed.
Shape: two PRs and a submodule bump. One upstream (tinyhumansai/tinymemory#147), then one here. No
tinymemoryrelease and nomodules/registry.rsre-pin — see "Why no release is needed".Problem / Context
Three doors still let the engine in, all of them test or bench
[dev-dependencies]tinycortex,tinymemory-core(test-support),tinymemory-tinycortex#[cfg(test)]+tests/*.rsmemory-engine-seamsdep:tinymemory-coretests/*.rscallinginstall_memory_host_seamsrss-benchlibrary_profilebinsNo file in
src/openhuman/namestinycortex::in production code.grep -rln "tinycortex::" src/openhuman/returns 48 files, but 36 mention it only in doc comments and all 12 code-referencing files are
*_tests.rsor
test_support.Most of these tests are duplicates
tests/raw_coverage/memory_raw_coverage_e2e.rsimportstinycortex::memory::ingest::canonicalize::{chat,document,email},tinymemory_core::store::chunks::store::upsert_chunks,tree::summarise::fallback_summaryandsources::status::source_status. Every one of those modules already ships its own*_tests.rssiblingupstream.
#[test]fnsvendor/tinycortex/srccrates/tinymemory-core/srccrates/tinymemory-{sources,sync,api,tinycortex,module,}The one rule that decides every test's fate
A test that names the engine is one of two things, and the difference is not visible from the file it sits in:
Both live in the same file.
read_rpc_tests_part_01_tests.rsnames zero engine types and holds both:list_chunks_filters_by_source_idstore/chunks/store_tests.rsowns itlist_chunks_filters_by_entity_id_and_time_windowlist_chunks_normalizes_invalid_tags_negative_tokens_and_empty_contentlist_sources_formats_email_threads_with_trimmed_user_hintThe trace makes it decidable:
list_chunks_rpc→list_chunks_page→chunk_query_from_filter→provider().as_chunks(). OpenHuman owns limit/offset defaulting, the filter→query translation, the"filter matches nothing, skip the query" short-circuit and the response shaping. The driver owns the filtering.
Repointing an engine-semantics test is worse than deleting it — it then asserts the fake driver's
filtering, which is code written to make the test pass. When in doubt, delete: the burden of proof is on
keeping a test, not on removing one.
Why no release is needed
The release-plus-re-pin gate exists for the module cdylib's wire surface. Nothing here touches it. What the
host needs from upstream is one source crate:
tinymemory-conformanceispublish = falseand is taken bypath exactly like
tinymemory-api, so achore(vendor)submodule bump is the whole mechanism. It costszero new packages — its dependencies are
tinymemory-api,async-trait,serde_jsonandanyhow, allalready in the product graph.
Expect a compile-time win, not a dependency win
Of tinycortex's ~170 transitive packages, all but five are already in the product graph for other reasons.
Deleting the engine removes exactly
tinycortex,tinycortex-api,tinymemory-core,tinymemory-sync,tinymemory-tinycortexand nothing beneath them — the same ≈ −1 package result the TinyMemory port, thetinymcpextraction and thechannelsgate all landed at.What it buys: 133k LOC off the test critical path (the module manifest measures those two crates at
14.7 s of the host build) and 25.7k LOC of memory test code that stops being OpenHuman's to maintain.
Scope
PR 1 — upstream (tinyhumansai/tinymemory#147)
A fake driver in
crates/tinymemory-conformance— which this repository has already written, twice, andwhich moves there rather than being authored:
memory/guard/test_support_part_01.rs+_part_02.rsRecordingProvider— all 27 families, records calls, answers emptymemory/guard/in_memory.rsInMemoryProvider— mandatory three, with real storageBoth name zero engine types across 1,922 lines, and their
crate::references are almost entirelycrate::openhuman::memory::api::*— a documentedpub useoftinymemory-api, so a mechanical rewrite. Exactly 3 references name a type that is genuinely this repo's(
DriverClass). Upstream'stinymemory-conformance::InMemoryProvideris the same idea implemented a thirdtime; PR 1 consolidates them. (
in_memory.rsis deliberately not#[cfg(test)];RecordingProvideris,which today confines it to lib tests — moving it upstream lifts that.)
Plus only the engine assertions that provably have no upstream twin. Default posture is delete, not move: a test moves upstream only when the diff shows the
module it covers has no equivalent there.
tree::summarise'sfallback_summaryis the one confirmed case.Then a
chore(vendor)submodule bump here.PR 2 — this repo, three commits
Commit 1 — repoint, engine still linked. Rewrite
memory/test_support/mod.rsto construct the conformancedriver instead of
TinycortexProvider; the 59install_tinycortex_for_testcall sites across 18 files need noedit. What does need editing: the four engine-backed
test_supportmodules undermemory/ops/,memory/tree/retrieval/,memory/tree/tree_runtime/andmemory/tool_memory/, which reachtinymemory_core::storeandtree_runtime::enginedirectly to seed rows; and theinstall_memory_host_seams()calls in the 29tests/*.rstargets, which have nothing to install once there isno in-process engine.
The engine is still a dev-dependency at this commit, and that is the point: both drivers are constructible
in the same build, so the suite can be run against each and compared. That comparison is the only real defence
against the fake driver quietly diverging, and it is impossible after commit 3. There is precedent for its
shape upstream —
module_e2e.rs::the_module_matches_the_in_process_engine_for_the_same_inputdoes the sameacross the bus boundary.
Commit 2 — delete. Every test whose assertion depends on what the driver returns.
tests/coding_sessions_feature.rsandtests/raw_coverage/memory_tree_embed_round25_raw_coverage_e2e.rsnameno OpenHuman type at all and go whole; the rest are per-test decisions inside the mixed files, by the rule
above.
Commit 3 — cut the manifest. Atomic, because the dev-dependency drop cannot compile while a consumer
survives. Drop the three
[dev-dependencies]; deletememory-engine-seams,memory/host_impls.rsand itsINTENTIONALLY_NOT_FORWARDEDentry; deleterss-bench,rss-bench-dhat,src/bin/rss_bench.rsandsrc/bin/library_profile/; deletememory/direct_engine_refs_tests.rs, whose ratchet has nothing left tocount.
Also in this commit: delete the 1,922 lines of fakes that moved upstream in PR 1 —
memory/guard/test_support_part_01.rs,_part_02.rsandmemory/guard/in_memory.rs— and taketinymemory-conformanceas a dev-dependency in their place. It costs zero new packages: its dependencies aretinymemory-api,async-trait,serde_jsonandanyhow, all already in the product graph. The guard teststhat drive those fakes stay here and import them from the crate.
A fourth commit, separately: remove the
[patch.crates-io]entries.tinycortexandtinycortex-apiareunpublished and the crates.io
tinycortexis a stale 0.1.1 without the engine features, so any surviving cratenaming either by version requirement fails resolution —
no matching package named tinycortex-api found—before anything compiles. Confirm resolution after commit 3, then drop the patches.
Not in scope
src/openhuman/memory/is 67k LOC and its README states the split.guard/,binding.rs+driver/,schemas/+read_rpc/+ops/,tools/+query/+agent/andsource_scope.rsall stay, and keep the tests that assert their behaviour — on the fake driver.tinymemory-api,tinymemory-bus,tinymemory-sourcesstay. In the product graph; the contract, notthe engine.
MemorySourceSyncbus leg. The module's sync methods are asserted routed byevery_declared_method_is_actually_routedand never driven. That is a real gap, but it is coverage thathas never existed anywhere rather than coverage being migrated, so it is its own issue and not on this path.
library_profilesrc/bin/library_profile/is the only in-process engine RSS/cold-phase profile that exists. Commit 3 deletesit. If it is worth keeping, it moves to tinymemory in PR 1, where a bin may depend on the engine freely —
otherwise it goes. One decision, not a blocker.
Acceptance criteria
cargo tree -e normal,dev --features "$(bash scripts/ci/product-features.sh)" -i <crate>prints "nothing to print" fortinycortex,tinycortex-api,tinymemory-core,tinymemory-syncandtinymemory-tinycortex.tinymemory-api,tinymemory-busandtinymemory-sources.tinycortex/tinymemory-core/tinymemory-tinycortexin[dependencies]or[dev-dependencies];memory-engine-seams,rss-benchandrss-bench-dhatdeleted along withmemory/host_impls.rs,src/bin/rss_bench.rs,src/bin/library_profile/andmemory/direct_engine_refs_tests.rs;check-feature-forwarding.mjspasses with the allowlist entry removed.memory*,memory_tree*,memory_sync*,memory_sources*,memory_goals*andpeople*method behaves identically and/schemais byte-identical.GGML_NATIVE=OFF cargo test --lib --no-default-features --features flows memory::passes; the CI smoke lane runscargo checkonly and never compiles test code, so a disabled-build test break is invisible to it.Related
split, and the capability-gated-dispatch constraint on
assert_provider.grep -rln "tinycortex::" src/openhuman/) reads 48today against a baseline of 111, but 36 are comment-only and all 12 code refs are tests, so it closes as a
side effect rather than driving anything.
vendor/tinycortexsubmodule in favour of tinymemory's nested copy, which iswhat makes the
[patch.crates-io]entries point at the engine the prebuilt module was built from.src/openhuman/memory/README.md— the host/engine split this work must not violate.