Skip to content

[flows-tinyflows] flows bug: remember_keyed deletes the old value before the new write succeeds #49

Closed

Description

@senamakel

Moved from tinyhumansai#8027, which is closed in favour of this issue. Part of tinyhumansai#8055.

remember_keyed (flows/memory_tools.rs:169-193) calls forget_matching on the key tag, then memory::ops::learn. If learn fails (engine/embedding error, timeout) the previous value is already gone. A digest flow storing sent_ids then recalls nothing next run and re-sends everything — the duplicate-send tinyhumansai#5173 was meant to prevent. Same path serves the memory[remember] node (flows/tinyflows/memory_adapter.rs:389).

Fix: learn first, then delete older ids under the key tag. Regression test with a failing learn.

The file stays in flows/ (decided in tinyhumansai#8000); #97 later dedups it onto upstream Confinement/MemoryOps — land this fix first so the dedup carries the corrected order.

Done when: each defect above has a regression test that fails on the unfixed code and passes after the fix. Gates: cargo check (root + crates/openhuman-app), pnpm rust:layout, node scripts/ci/check-feature-forwarding.mjs, pnpm debug rust flows, and the touched crates' tests. RPC namespace strings, model-facing tool names and DomainEvent variant names stay unchanged unless the issue says otherwise.

Agent brief

Parent: tinyhumansai#8055

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: p1Next. Wrong behaviour a user will hit, or a security weakness behind a condition.rust-coreCore Rust runtime in src/: CLI, core_server, shared infrastructure.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions