From 25caae02c020f6dd7ecdc3eaf353ece85aeef09b Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Thu, 3 Sep 2026 04:53:51 +0530 Subject: [PATCH] refactor(gateway): derive the compacting noisy-status match from the templates Replaces the hand-transcribed regex fragment with re.escape of COMPACTION_STATUS and COMPACTION_HEARTBEAT_STATUS, matching the COMPACTION_DONE_STATUS precedent two lines down, so wording drift cannot desync the chat-platform gate. --- gateway/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gateway/run.py b/gateway/run.py index 267cd6d3d7..36f7cf75ee 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -132,7 +132,8 @@ _TELEGRAM_NOISY_STATUS_RE = re.compile( r"|auto-lowered\s+(?:this\s+)?session'?s?\s+threshold" r"|configured\s+auxiliary\s+compression\s+provider\s+.+\s+unavailable" r"|skipping\s+concurrent\s+compression" - r"|compacting\s+context\s+[—-]\s+(?:still\s+)?summarizing\s+earlier\s+conversation" + rf"|{re.escape(COMPACTION_STATUS)}" + rf"|{re.escape(COMPACTION_HEARTBEAT_STATUS)}" r"|resumed\s+after\s+\d+s\s+idle\s+[—-]\s+compacting" r"|preflight\s+compression" r"|pre[- ]api\s+compression"