From 2aaa09370565fc322f7e18ff6dbffaa7d5e8ab81 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Fri, 18 Sep 2026 00:46:36 -0700 Subject: [PATCH] test(gateway): give the bare watcher runner the adapter state the gate re-check reads The pre-dormant gate re-check reads config, adapters and _profile_adapters (an unreadable set fails awake), so the __new__-built runner fixture now carries the same relay-only state GatewayRunner.__init__ would. --- tests/gateway/test_scale_to_zero_watcher.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/gateway/test_scale_to_zero_watcher.py b/tests/gateway/test_scale_to_zero_watcher.py index 5fa55054e9..43704b59cb 100644 --- a/tests/gateway/test_scale_to_zero_watcher.py +++ b/tests/gateway/test_scale_to_zero_watcher.py @@ -75,6 +75,11 @@ def _runner_with( r._draining = draining r._scale_to_zero_cooldown_until = 0.0 r._scale_to_zero_no_suspend_logged = False + r._scale_to_zero_direct_platform_logged = False + # The pre-dormant gate re-check reads these (relay-only unless a test says otherwise). + r.config = None + r.adapters = {} + r._profile_adapters = {} r._last_inbound_at = time.time() r._running_agents = {} r._background_tasks = set()