Repository navigation
chore(memory): bump tinymemory to v1.23.4; derive-free flow digests and keyed memory - #7043
Conversation
- Brain ingest enqueues the build job only when tinymemory hands one back (`Ingested::job` is now an Option: none for an engine that rebuilds beliefs on its own). - Synced sources queue no belief build for such an engine either. - The hosted engine settings take the new `consolidation` default. - A test pins that scrubbing keeps the U+000C page breaks a document is chunked by. - The memory spec notes that a long document is several billed writes.
…-free - vendor/tinymemory 8d9a24f7 -> 581a2bc8 (v1.23.4: tinyhumansai#203-tinyhumansai#211). Cargo.lock and crates/openhuman-app/Cargo.lock change only the three tinymemory versions and their sha2 0.10.9 -> 0.11.0 edge. - Flow run digests and flow keyed memory are stored with derive: false: searchable, but nothing is derived from them as memory about the user. - merge_meta carries the host's derive onto the stored item; it copies an explicit field list, so the flag was otherwise dropped.
Tiny Sweeper reviewTiny Sweeper reviewed this change across 6 lane(s) and found 2 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Reviewing pending checks Review snapshot
Completeness: Complete What changedThe review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below. FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. Findings
Resolved this pass
Pending checks: Rust E2E (mock backend), Build Playwright E2E Artifact, E2E (Playwright / web lane), Desktop E2E (full suite, 3 OS) Before merge
How this fits togetherflowchart LR
n0["...writes_run_digest_entry_for_completed_run<br/>changed"]:::changed
n1["flow_namespace"]:::impacted
n2["digest_ignores_cancelled_run"]:::impacted
n3["digest_ignores_failed_run"]:::impacted
n4["...treats_completed_with_warnings_as_success"]:::impacted
n5["upsert_flow"]:::impacted
n0 -->|calls| n1
n0 -->|tests| n1
n0 -->|calls| n5
n0 -->|tests| n5
n2 -->|calls| n1
n2 -->|tests| n1
n2 -->|calls| n5
n2 -->|tests| n5
n3 -->|calls| n1
n3 -->|tests| n1
n3 -->|calls| n5
n3 -->|tests| n5
n4 -->|calls| n1
n4 -->|tests| n1
n4 -->|calls| n5
n4 -->|tests| n5
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
e2e
Evidence and run details
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughMemory changes update ChangesMemory updates
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to No additional issue is identified in this change. It is mergeable after normal checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
A rabbit checks the memory store, Comment |
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0122 · 259,792 in / 14,581 out · 19,416 cached (7%) · gpt-5.6-luna, glm-5.3-flash
critique: $0.0065 · 116,513 in / 6,585 out · 8,320 cached (7%) · gpt-5.6-luna, glm-5.3-flash
security: $0.0056 · 108,793 in / 3,462 out · 11,096 cached (10%) · gpt-5.6-luna
tests: $0.0000 · 14,057 in / 1,941 out · 0 cached (0%) · glm-5.3-flash
description: $0.0000 · 7,668 in / 154 out · 0 cached (0%) · glm-5.3-flash
e2e: $0.0000 · 7,551 in / 818 out · 0 cached (0%) · glm-5.3-flash
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0031 · 73,785 in / 7,724 out · 1,787 cached (2%) · gpt-5.6-luna, glm-5.3-flash
critique: $0.0008 · 11,082 in / 1,608 out · 0 cached (0%) · gpt-5.6-luna, glm-5.3-flash
security: $0.0021 · 32,349 in / 2,405 out · 1,787 cached (6%) · gpt-5.6-luna
tests: $0.0001 · 7,349 in / 326 out · 0 cached (0%) · glm-5.3-flash
description: $0.0001 · 8,603 in / 111 out · 0 cached (0%) · glm-5.3-flash
e2e: $0.0000 · 8,351 in / 1,099 out · 0 cached (0%) · glm-5.3-flash
Summary
vendor/tinymemoryfrom 8d9a24f7 to v1.23.4 (581a2bc853), which brings in tinymemory [Feature] E2E: Test backend failure during onboarding completion #203–[Feature] E2E: Memory persistence across app restart #211:MemoryMeta.deriveto opt an item out of derivation ([Feature] E2E: Memory lifecycle spec (store, query, recall, delete) #208);Send([Feature] E2E: Memory persistence across app restart #211; without it openhuman does not compile against v1.23.3).derive: false, so nothing is derived from them as memory about the user.merge_metadropping a host'sderiveflag.Problem
⚠ v1.23.4 was published as a patch release, but it breaks tinymemory's public API, so openhuman needs the code changes below:
tinymemory_tools::Ingested::jobis nowOption<BackgroundJob>([Feature] E2E: Test backend failure during onboarding completion #203): an engine that builds on its own hands back no job;tinymemory_api::MemoryMetagained a public field,derive([Feature] E2E: Memory lifecycle spec (store, query, recall, delete) #208);EngineSettingsgainedconsolidation([Feature] E2E: Test backend failure during onboarding completion #203), which breaks struct literals.(Not ours to re-tag; noted for anyone pinning by semver.)
Synced sources queued their own
BuildBeliefsjobs (memory/sources/sync.rs), bypassingBrain::ingest, so they would keep queueing builds for an engine that already builds on its own.Flow run digests and a flow's keyed state are machine-written. CortexDB would otherwise extract facts and beliefs about the user from them.
Solution
vendor/tinymemory→ 581a2bc853 (v1.23.4). Both lockfiles (Cargo.lock,crates/openhuman-app/Cargo.lock) change only these lines:sha2edge, 0.10.9 → 0.11.0, a version already in the lockfiles.Every changed line was checked, and
cargo metadata --lockedpasses for both manifests. They were edited by hand, becausecargo update -p tinymemory-*also re-resolved unrelatedwindows-sys/getrandomedges.memory/brain.rs:ingested.jobis anOption; enqueue it only when present.memory/sources/sync.rs: noBuildBeliefsjobs when the bound engine's descriptor isConsolidation::Automatic.memory/engine.rs: the hostedEngineSettingsliteral takes..EngineSettings::default()(the newconsolidationfield;Nonekeeps the engine's own).flows/bus/run_digest.rsandflows/memory_tools.rs(remember_keyed):meta.derive = Some(false).memory/ops.rsmerge_meta: it copies an explicit list of host fields, so a host'sderivewas silently dropped.deriveis now on the list. Without it, the keyed-memory change above would have done nothing.docs/specs/memory-v2.md: a long document is several writes. Hosted billing is per write, so a 25 MB file is about 100 billed writes. Engines that build on their own get no build job.Module pins: N/A. tinymemory is no longer a loadable module. 5c22db1 and ce2ab69 removed its registry record and host integration. It appears in none of these, and no workflow hard-codes a tinymemory archive or sha256:
scripts/ci/module-provider-pins.json;scripts/ci/module-pin-exemptions.json;scripts/ci/check-module-pins.mjs;crates/openhuman-core/src/modules/registry/records_*.rs.The gate that applies,
scripts/ci/check-submodule-monotonic.mjs, passes: 18 submodules, none moved backwards.Submission Checklist
a_sync_queues_a_belief_build_only_for_an_engine_that_waits_for_one: an on-demand engine queues one build, an Automatic engine none. Revert-check: dropping the gate fails it.scrubbing_keeps_the_page_breaks_a_document_is_chunked_by: the scrubber keeps the U+000C page breaks tinymemory chunks on.meta.derive == Some(false)round-trips. These also pin themerge_metafix.diff-cover).## Related: N/A, none.Impact
Related
AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
feat/tinymemory-automatic-consolidationf5f5cbfa07Validation Run
pnpm --filter openhuman-app format:check: N/A (no frontend change);cargo fmt --all -- --checkand the app manifest's fmt check both pass.pnpm typecheck: N/A, no TypeScript change.cargo test -p openhuman --lib memory::(165 passed) andflows::(564 passed).cargo check --workspaceand on the app manifest: pass.cargo clippy --keep-going -p openhuman --tests -- -D warningsand on the app manifest: pass.cargo metadata --lockedfor both manifests: pass.pnpm rust:layout,check-module-pins.mjsandcheck-submodule-monotonic.mjs: pass.Validation Blocked
Behavior Changes
derivereaches the stored item.Parity Contract
Duplicate / Superseded PR Handling
Summary by CodeRabbit