Skip to content

refactor(flows): adopt confined memory operations and preserve keyed writes - #437

Merged
senamakel merged 12 commits into
epic/8000-memory-to-tinymemoryfrom
epic-8055-prereq-97-flow-memory
Oct 19, 2026
Merged

senamakel merged 12 commits into
epic/8000-memory-to-tinymemoryfrom
epic-8055-prereq-97-flow-memory

Conversation

@senamakel

Copy link
Copy Markdown
Owner

Flow-memory adapters now use TinyMemory's tag-filter construction and confined filter deletion through the central memory operations adapter. Namespace confinement stays centralized; flow identity, tags, trust and tier decisions remain with the flow host. Filter deletion also invalidates the host prefetch cache through that adapter.

Keyed replacement snapshots the old item IDs, writes the replacement, then removes only obsolete snapshot IDs. A failed write preserves the previous value; failed cleanup preserves both old and new values; a concurrent write after the snapshot survives. The regression tests reproduce the two data-loss cases against the old code and verify all three outcomes.

Pin TinyMemory to merged fork PR36, commit 0ed2c698d85bd4cf9a34311664cb70200798b5e1. Its 34 hosted checks passed, and the remote merge tree matches the independently tested candidate. This PR preserves the current memory-epic base in ordinary merge history.

Validation:

  • Canonical mock-backed memory library suite: 348 passed, 0 failed, 0 ignored.
  • Canonical mock-backed flows library suite: 588 passed, 0 failed, 0 ignored, with RUST_TEST_THREADS=1, a 16 MiB stack and process NOFILE=16384.
  • Focused failed-replacement, failed-cleanup and post-snapshot concurrent-write tests: passed.
  • Root workspace and desktop-manifest cargo check: passed.
  • Production-library strict Clippy, Rust formatting, pnpm rust:layout and feature forwarding: passed.

All-target strict Clippy reports 40 inherited diagnostics in 10 unrelated files; each affected file is byte-identical to pre-task base 618b772c. No diagnostic is in the changed files. The initial flows run at macOS's soft file limit of 256 failed on SQLite opens/EMFILE (356 passed, 232 failed). The same source and full suite passed after raising only the process limit; both raw results are retained.

Refs #97
Part of tinyhumansai#8000
Required by tinyhumansai#8055

senamakel and others added 12 commits October 19, 2026 18:52
Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ts.rs,crates/openhuman-core/src

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…crates/openhuman-core/src/flows

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…forget_filter

The forget_matching match arms now return their results directly instead of using explicit return statements. The forget_filter function gained a doc comment describing its behavior and error conditions.

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored tinymemory submodule to a newer commit.

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored tinymemory submodule to the latest upstream commit.

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit d29a58b into epic/8000-memory-to-tinymemory Oct 19, 2026
3 of 4 checks passed
senamakel added a commit that referenced this pull request Oct 20, 2026
refactor(flows): adopt confined memory operations and preserve keyed writes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant