You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggest closing: this is fixed on current main and I could not reproduce it.
Fix.#298 (bbddf7b, "match purge topics literally in LIKE (escape % and _)") escapes %, _ and \ in sanitize_like_pattern (memoria-storage/src/store.rs), so a topic is matched as literal text. find_ids_by_topic also rejects topics shorter than 3 characters.
Reproduction on main (3a58488). I stored three memories (alpha note, beta note, gamma note) against a MatrixOne v4.2.8 container and called memory_purge through the MCP tool entry point, as in this report:
topic
result
memories left
%
Validation error: topic must be at least 3 characters
3
%%%
Purged 0 memory(s)
3
_
Validation error: topic must be at least 3 characters
3
___
Purged 0 memory(s)
3
a%e
Purged 0 memory(s)
3
The checks above were a throwaway test and are not committed.
Existing regression test.test_purge_by_topic_treats_like_wildcards_literally_verify_db in memoria-api/tests/api_db_verify.rs covers the REST path. cfg_key must not delete cfgXkey, and 50% must not delete 500 units. It passes on main.
This was checked against main, not against any deployed instance. If the original environment still shows the problem, it is running a build from before #298.
Activity
fix: resolve branch name hyphen bug, add input validation, optimize C…
loveRhythm1990 commentedon Nov 17, 2026
Suggest closing: this is fixed on current
mainand I could not reproduce it.Fix. #298 (
bbddf7b, "match purge topics literally in LIKE (escape % and _)") escapes%,_and\insanitize_like_pattern(memoria-storage/src/store.rs), so a topic is matched as literal text.find_ids_by_topicalso rejects topics shorter than 3 characters.Reproduction on
main(3a58488). I stored three memories (alpha note,beta note,gamma note) against a MatrixOne v4.2.8 container and calledmemory_purgethrough the MCP tool entry point, as in this report:%Validation error: topic must be at least 3 characters%%%Purged 0 memory(s)_Validation error: topic must be at least 3 characters___Purged 0 memory(s)a%ePurged 0 memory(s)The checks above were a throwaway test and are not committed.
Existing regression test.
test_purge_by_topic_treats_like_wildcards_literally_verify_dbinmemoria-api/tests/api_db_verify.rscovers the REST path.cfg_keymust not deletecfgXkey, and50%must not delete500 units. It passes onmain.This was checked against
main, not against any deployed instance. If the original environment still shows the problem, it is running a build from before #298.