fix(session): reset out-of-range last_consolidated to recover hidden history (#4066)

This commit is contained in:
04cb
2026-06-03 15:01:29 +08:00
committed by Xubin Ren
parent d1a94dae8a
commit 0307ee6b73
3 changed files with 26 additions and 1 deletions
+2 -1
View File
@@ -205,7 +205,8 @@ class TestRepairCorruptFile:
session = mgr._load("test:badts")
assert session is not None
assert session.last_consolidated == 5
# offset 5 exceeds the single loaded message; reset to avoid hiding history (#4066)
assert session.last_consolidated == 0
assert isinstance(session.created_at, datetime)
def test_read_session_file_repairs_corrupt_jsonl(self, tmp_path: Path):