fix(session): archive actual idle compact drops

This commit is contained in:
chengyongru
2026-06-01 16:07:08 +08:00
committed by Xubin Ren
parent baffd6ef92
commit 0e37024114
4 changed files with 44 additions and 8 deletions
+2 -3
View File
@@ -76,10 +76,9 @@ def _make_fake_compact(
metadata={},
last_consolidated=0,
)
probe.retain_recent_legal_suffix(max_suffix)
dropped, already_consolidated = probe.retain_recent_legal_suffix(max_suffix)
kept = probe.messages
cut = len(tail) - len(kept)
archive_msgs = tail[:cut]
archive_msgs = dropped[already_consolidated:]
if not archive_msgs and not kept:
session.updated_at = datetime.now()