Validate hosted memory live: conformance, recall-quality bar, hosted E2E and restart persistence
Summary
Validate hosted memory (CortexDB behind the TinyHumans backend) live, on production test accounts. #6718 has shipped the code; this issue covers the live evidence its remaining acceptance criteria ask for.
Problem / Context
Split out of #6718. Memory v2 (#6949, #6993) made hosted CortexDB the engine, and #7013 / #7014 fixed the failure modes. The checks below have only ever run against a local stand-in or the mock backend:
- tinyhumansai/tinymemory#175 added live conformance tests and a recall-parity harness (
tinymemory_conformance::parity,recall_parityexample). Its own numbers came from a local CortexDB with a bag-of-words embedder and are not meaningful. - The memory E2E suites #6718 originally named were deleted in memory v2. Their replacements,
tests/memory_v2_e2e.rsandtests/memory_cortexdb_live.rs, run against the mock backend or a pinned local engine. - Cross-account isolation is already proven by #7002: tinyhumansai/cortexdb-saas#12, and an
isolationCI job that runs cross-tenant probes against the real engine on every deploy. It is out of scope here.
Scope
- In: live runs against production test accounts, recorded results, and an agreed recall-parity bar.
- Out: isolation (#7002), the per-turn cost and stability measurements (sibling issue), bulk ingest (tinyhumansai/tinysweeper#147).
- Needs two production test accounts with credits; the second account's token is
TINYMEMORY_TEST_TINYHUMANS_TOKEN_B. - There is no embedded engine to compare against any more. "Parity" now means hosted recall clears a written quality bar on the parity set, not that it matches TinyCortex.
Acceptance criteria
- [ ] Live conformance: TinyMemory's conformance suite runs green against production through the
tinyhumanswire. It covers store / fetch / recall / forget / list and the document, conversation, learning, event and answer families, plus theReadyhealth probe. The run is linked here. - [ ] Recall-quality bar: a written bar (for example hit@5 and MRR on the 30-note parity set, and p95 recall latency) is agreed on this issue before the run. The
recall_paritynumbers from production are then recorded against it. - [ ] Hosted E2E:
tests/memory_cortexdb_live.rs, or a hosted variant oftests/memory_v2_e2e.rs, passes against a production test account, and the command is documented. - [ ] Restart persistence: on a release build signed in to a hosted account, a learning, a synced source and a conversation turn survive an app restart and are recalled afterwards.
- [ ] Sources without restart: a memory source added after sign-in syncs without an app restart. Memory v2 removed the loadable module that caused #6718's QA defect 1; this confirms it on a real build.
Related
- Part of #6718
- #7002 (isolation, done) · #7013 · #7014 · tinyhumansai/tinymemory#175
- Spec:
docs/specs/memory-v2.md
Proposed recall-quality bar, for agreement before the live run
tinymemory's v2 rewrite removed the recall_parity harness this issue names, along with the hosted live tests. The yardstick is now TinyMemory's agent memory eval (memory_eval): 12 scenarios played through the real lifecycle (restart, contradictions, tool-heavy turns, team handoff, compaction, tenant isolation, needle in noise, learning from corrections, …), probed before and after a belief build. tinyhumansai/tinymemory#202 lets it, and live_cortexdb.rs (conformance and the store round trip), run on hosted memory.
The baseline is the 2026-10-04 run against a local CortexDB with real models (cortex-openrouter, docs/evals/agent-memory.md). Proposed bar for hosted:
| Metric | Baseline | Bar |
|---|---|---|
| Pack holds the answer | 95% | ≥ 90% |
| Model answers correctly from the pack | 92% | ≥ 88% |
| Paraphrased questions: pack hit | 92% | ≥ 85% |
| Contradictions answered with the current value | 6/6 | ≥ 5/6 |
| Cross-tenant leaks | 0/3 | 0, hard |
pre_turn p95 |
1168 ms | ≤ 2 s (hosted adds the network and the backend) |
Conformance and round trip on the tinyhumans wire |
n/a | pass |
The bar sits a little below the baseline because hosted memory runs production's own models (flex-tier enrichment), not gpt-4.1-mini. Leaks are the one hard line.
The run will use a production test account and write under per-run roots that it forgets at the end. It is billed to that account. Objections or different numbers before then, please; otherwise I'll run against these.
First live results on production, 2026-10-06 (one test account, tinyhumans wire, harness from tinyhumansai/tinymemory#202)
1. Conformance on the hosted wire: ✅ pass
live_cortexdb.rs::the_live_server_upholds_the_contract passed against https://api.tinyhumans.ai, covering store / fetch / recall / forget / list / explore / get and the namespace and refusal checks. It took 3152 s (52.5 min); the same suite takes seconds against a local CortexDB (see 3).
The store round-trip test was deliberately not run: it compiles a context from the whole account, so on a real account it would read (and on failure print) unrelated memories.
2. Recall quality (one scenario, brain_lookup): ✅ at baseline
| Metric | Hosted | Local baseline (cortex-openrouter) |
Bar |
|---|---|---|---|
| Pack holds the answer | 100% (8/8) | 100% | ≥ 90% ✅ |
| Paraphrased questions: pack hit | 100% (4/4) | n/a | ≥ 85% ✅ |
| Extractive answer | 75% (6/8) | 75% | n/a |
| MRR | 0.53 | 0.53 | n/a |
| Cross-tenant leaks | 0 | 0 | 0 ✅ |
| Pack size | 247 tokens (mean) | n/a | n/a |
Both misses were ranking misses (the answer was in the pack at rank 2 and 4), not retrieval misses. "Model answers correctly" was not measured: --llm needs a separate answer-model key.
3. Latency: ❌ fails the bar
| Step | Hosted p50 / p95 | Baseline | Bar |
|---|---|---|---|
pre_turn recall |
2.5 s / 26.5 s | 466 ms / 1168 ms | p95 ≤ 2 s ❌ |
| Document ingest until visible | 95 s | n/a | n/a |
Filed as tinyhumansai/cortexdb-saas#14, with what production showed at the time: memory/llm-router's memory-flash rung 1 (Surplus glm-5.3-flash) failing with error sending request, and cortexdb-0 enrichment jobs of ~40 s. The cause is not confirmed: embeddings don't go through that router.
Not measured on hosted
- Belief synthesis: hosted memory scheduled the builds (
scheduled: 7) instead of running them inside the run, so the synthesis phase shows no change. - Cost: hosted memory exposes no usage accounting to the eval.
Decision: full 12-scenario eval deferred
At the measured pace it would take about 2.5–3 h and roughly 12× the probe's credits. Quality is already at baseline on the most retrieval-heavy scenario, and latency already fails the bar, so a full run now would mostly measure the slowdown. It will run once tinyhumansai/cortexdb-saas#14 is resolved.
All eval data was written under per-run roots and forgotten at the end of the scenario; the test key has been revoked.
Criteria status: live conformance ✅ · recall-quality bar: quality ✅, latency ❌ (blocked on cortexdb-saas#14), full run pending · hosted E2E, restart persistence, sources without restart: not started.
Restart persistence and sources without restart: ✅ verified on production, 2026-10-06
Ran the real openhuman-core from main (v0.64.11, which includes #7013 and #7014), release build, headless, in a throwaway HOME, bound to hosted memory (engine=tinyhumans, status=ok) on production with a memory-scoped test key passed through OPENHUMAN_BACKEND_API_KEY. That is the same core the desktop app embeds, minus the UI.
| Check | Result |
|---|---|
| A folder source added and synced on a running core is visible without a restart | ✅ its file was listed 35 s after sync |
| A learned fact survives a core restart (stop, then start on the same data) | ✅ listed within 5 s of restart |
| The source is still registered after the restart | ✅ |
The fact is recalled by ranked memory_fetch after the restart |
✅ in 4 s |
The test wrote under unique markers, then forgot both items and removed the source. The core's logs were checked at debug level and never contain the API key; it lives only in the file keychain, which was deleted with the throwaway HOME.
This also confirms that QA defect 1 in #6718 ("memory sources invisible until restart") no longer reproduces on memory v2.
#7022 status
| Criterion | |
|---|---|
| Live conformance on the hosted wire | ✅ |
| Recall-quality bar: quality | ✅ 100% pack hit, 0 leaks |
| Recall-quality bar: latency | ❌ blocked on tinyhumansai/cortexdb-saas#14 (engine-side coordinator_recall) |
| Hosted E2E | ✅ for these flows (learn, sources, recall, restart) via the real core; the full memory_v2_e2e suite is still mock-only |
| Restart persistence | ✅ |
| Sources without restart | ✅ |
What remains is the latency fix, then the full 12-scenario eval against the bar.