From bb5b4f4ca61ca1d3c52bfc2e4b023b5dd31e83bc Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Sat, 3 Oct 2026 16:03:04 +0530 Subject: [PATCH] test(telegram): run the ingress admission case for the full stall threshold Fold of gate finding (2c Medium regression): raising _INGRESS_DISPATCH_STALL_HEARTBEATS to 4 left the `ingress` row of test_only_pre_handoff_failure_reopens_admission looping 3 heartbeats, which can never reach the threshold, so its "no healthy-but-deaf report" assertion was disarmed. Loop the threshold itself so the leg tracks future bumps. Verified: with update_admission's dispatch counting removed, the heartbeat leg now fails (it passed with range(3)). --- tests/plugins/test_telegram_update_admission.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/plugins/test_telegram_update_admission.py b/tests/plugins/test_telegram_update_admission.py index af2ebb1459..da8e5a254d 100644 --- a/tests/plugins/test_telegram_update_admission.py +++ b/tests/plugins/test_telegram_update_admission.py @@ -20,6 +20,7 @@ from telegram.request import BaseRequest from gateway.config import PlatformConfig from gateway.platforms.event import MessageType +from plugins.platforms.telegram import adapter as tg_adapter from plugins.platforms.telegram.adapter import TelegramAdapter @@ -508,7 +509,7 @@ async def test_only_pre_handoff_failure_reopens_admission(monkeypatch, tmp_path, await app.process_update(update(app.bot)) assert not adapter._seen_update_ids and not adapter._inflight_update_ids assert adapter._updates_dispatched_total == 2 - for _ in range(3): + for _ in range(tg_adapter._INGRESS_DISPATCH_STALL_HEARTBEATS): adapter._check_ingress_dispatch_stall() assert not any("healthy but deaf" in record.message for record in caplog.records) return