test(memory): add regression tests for missing cursor key

Cover read_unprocessed_history skipping cursorless entries and
_next_cursor safe fallback when last entry has no cursor.
This commit is contained in:
chengyongru
2026-04-16 12:32:38 +08:00
committed by Xubin Ren
parent 524c097f76
commit d64e963258
2 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -239,7 +239,7 @@ class MemoryStore:
pass
# Fallback: read last line's cursor from the JSONL file.
last = self._read_last_entry()
if last and last.get("cursor") is not None:
if last and last.get("cursor"):
return last["cursor"] + 1
return 1