From 2ff73c99543d9f3397e04ec0aa3f0d0f5e5ba8b0 Mon Sep 17 00:00:00 2001 From: Frank Song Date: Tue, 26 May 2026 20:13:01 +0800 Subject: [PATCH] Document truncation watermark metadata intent --- api/routes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/routes.py b/api/routes.py index 029de183..c7d45d6b 100644 --- a/api/routes.py +++ b/api/routes.py @@ -2231,6 +2231,11 @@ def _metadata_only_message_summary(sid: str, profile: str | None = None) -> dict except (TypeError, ValueError): sidecar_last_message_at = 0.0 if getattr(sidecar_session, "truncation_watermark", None) is not None: + # Intentional: once the user has truncated this sidecar, metadata + # polling must keep the sidecar as authoritative. A full message + # load can still apply the watermark-aware merge, but the cheap + # metadata path should not treat later state.db rows as external + # growth and resurrect turns the user deliberately cut away. return { "message_count": sidecar_count, "last_message_at": sidecar_last_message_at,