diff --git a/services/api/tests/memory_stack.py b/services/api/tests/memory_stack.py index 1c71777..4da24fc 100644 --- a/services/api/tests/memory_stack.py +++ b/services/api/tests/memory_stack.py @@ -244,6 +244,13 @@ def stored_text(self) -> str: return "\n".join(found) +def holds_word(text_dump: str, word: str) -> bool: + """Whether `word` appears in `text_dump` as a whole word, ignoring case. A dump of every + stored value also holds random key hashes and ids, whose letters can spell a short word + ("bus" in "...GdGbusxe..."); a stored sentence or token still has a boundary around it.""" + return re.search(rf"(?