From 724ada32d2dcdb719dbdf5bf367bc8dbf7203138 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sat, 26 Sep 2026 11:07:36 -0700 Subject: [PATCH] test(gateway): queued-ledger source stub carries parent_chat_id _pinned_channel_inputs reads source.parent_chat_id on the queued-followup path. The real SessionSource always has the field; the SimpleNamespace stub in test_queued_final_ledger did not, so two chained-followup tests raised AttributeError on CI. Give the stub the field instead of re-adding a getattr guard for a case production cannot hit. --- tests/gateway/test_queued_final_ledger.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/gateway/test_queued_final_ledger.py b/tests/gateway/test_queued_final_ledger.py index 764c733a49..9764ce25ab 100644 --- a/tests/gateway/test_queued_final_ledger.py +++ b/tests/gateway/test_queued_final_ledger.py @@ -60,8 +60,10 @@ def _rows(): def _source(*, chat_id=CHAT, thread_id=None, chat_type="dm"): + # parent_chat_id is a real SessionSource field; the queued-followup path reads it to pin the + # channel inputs, so the stub carries it like every real source does. return SimpleNamespace(platform=Platform.TELEGRAM, chat_id=chat_id, thread_id=thread_id, - chat_type=chat_type) + chat_type=chat_type, parent_chat_id=None) def _telegram_adapter(send_result=None):