fix: memory entry validation crashes on a non-dict row from memory.json (#1691)

This commit is contained in:
Afonso Coutinho
2026-06-03 05:38:02 +01:00
committed by GitHub
parent f0b172020e
commit 35b9509da3
2 changed files with 21 additions and 0 deletions

View File

@@ -137,6 +137,8 @@ class MemoryManager:
"""Ensure all entries have required fields."""
validated = []
for entry in entries:
if not isinstance(entry, dict):
continue
if "id" not in entry:
entry["id"] = str(uuid.uuid4())
if "timestamp" not in entry: