Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion gateway/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
r"|configured\s+compression\s+model\s+.+\s+failed"
r"|no\s+auxiliary\s+llm\s+provider\s+configured"
r"|auto-lowered\s+compression\s+threshold"
r"|compacting\s+context\s+[—-]\s+summarizing\s+earlier\s+conversation"
r"|preflight\s+compression"
r"|rate\s+limited\.\s+waiting\s+\d"
r"|retrying\s+in\s+\d"
Expand Down
8 changes: 7 additions & 1 deletion tests/gateway/test_telegram_noise_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def test_telegram_status_suppresses_auxiliary_and_retry_noise():
noisy_messages = [
"⚠ Auxiliary title generation failed: HTTP 400: Operation contains cybersecurity risk",
"⚠ Compression summary failed: upstream error. Inserted a fallback context marker.",
"🗜️ Compacting context — summarizing earlier conversation so I can continue...",
"ℹ Configured compression model 'small-model' failed (timeout). Recovered using main model — check auxiliary.compression.model in config.yaml.",
"⏳ Retrying in 4.2s (attempt 1/3)...",
"⏱️ Rate limited. Waiting 30.0s (attempt 2/3)...",
Expand All @@ -23,6 +22,13 @@ def test_telegram_status_suppresses_auxiliary_and_retry_noise():
assert _prepare_gateway_status_message(Platform.TELEGRAM, "warn", message) is None


def test_telegram_status_keeps_context_compaction_notice():
"""Telegram users should see when a long turn pauses for context compaction."""
message = "🗜️ Compacting context — summarizing earlier conversation so I can continue..."

assert _prepare_gateway_status_message(Platform.TELEGRAM, "lifecycle", message) == message


def test_non_telegram_status_is_unchanged():
"""The Telegram quieting policy must not hide CLI/Discord diagnostics."""
message = "⏳ Retrying in 4.2s (attempt 1/3)..."
Expand Down