From b96a9b7408bdb4dd21c41273d3255f4a98a64d2c Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 21 Aug 2026 04:52:18 -0700 Subject: [PATCH] test(cron): delivery-targets test scopes platform assertions past bot-chat entries cron_delivery_targets() now also lists machine-local bot-chat: entries; the sibling test's exact set-equality assertion predates them. Scope the platform assertions to gateway entries and pin that bot-chat entries are always home_target_set. --- tests/cron/test_scheduler.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/cron/test_scheduler.py b/tests/cron/test_scheduler.py index 64033d0b09..02278a1e4c 100644 --- a/tests/cron/test_scheduler.py +++ b/tests/cron/test_scheduler.py @@ -2194,11 +2194,20 @@ class TestCronDeliveryTargets: targets = {t["id"]: t for t in cron_delivery_targets()} - assert set(targets) == {"matrix", "telegram"} + # bot-chat: entries (machine-local Bot Chat injection) ride + # the same listing but are not gateway platforms — scope the + # platform assertions to the gateway entries. + platform_targets = {k: v for k, v in targets.items() if not k.startswith("bot-chat")} + + assert set(platform_targets) == {"matrix", "telegram"} # Configured but no home channel → surfaced, flagged for the UI. - assert targets["matrix"]["home_target_set"] is False - assert targets["matrix"]["home_env_var"] == "MATRIX_HOME_ROOM" - assert targets["telegram"]["home_target_set"] is False + assert platform_targets["matrix"]["home_target_set"] is False + assert platform_targets["matrix"]["home_env_var"] == "MATRIX_HOME_ROOM" + assert platform_targets["telegram"]["home_target_set"] is False + # Bot Chat targets need no home channel: whatever profiles exist on + # this machine must all be listed as ready. + bot_chat = [v for k, v in targets.items() if k.startswith("bot-chat")] + assert all(t["home_target_set"] for t in bot_chat) class TestHomeTargetEnvVarRegistry: