v3.38.14 — memory_store tags cache-loss fix (#3051)
- memory_store would accept tags array but memory_retrieve and memory_list would return tags as empty array due to partial write-through cache, now fixed by using cache invalidation instead
From ruflo
Follow-up patch to v3.38.13 — fixes the last of the recently-reported issues.
Fix
#3051 — memory_store accepted a tags array and returned success: true, but the very next memory_retrieve (or memory_list) came back with tags: [].
Root cause was in bridgeStoreEntry: after the DB insert (which serialized tags correctly to the tags column), the write-through cache set stored only a partial entry — { id, key, namespace, content, embedding } — with no tags. The next bridgeGetEntry hit that cache and returned tags: cached.tags || [] = [].
Fix: replace the partial write-through with cache invalidation. Next read re-fetches the authoritative row (which correctly parses the tags JSON column) and repopulates the cache with the full shape. Side benefit: same defect had also caused access_count, createdAt, and updatedAt to be stale from the cache — invalidation fixes those too.
Proven regression test in __tests__/memory-store-tags-cache-3051.test.ts: pre-fix returns tags: [], post-fix returns the real tags.
Install
npx ruflo@latest(or@alpha/@v3alpha— all three tags aligned)
Merged PR
Closes #3051 — #3079
🤖 Generated with RuFlo