1212 _make_standard_recipe ,
1313 _no_sleep_quota_checker ,
1414 _noop_quota_refresher ,
15+ _patch_dispatch_quota_no_sleep ,
1516 _simple_prompt_builder ,
1617)
1718
@@ -26,6 +27,7 @@ async def test_dispatch_food_truck_tool_passes_resume_session_id_to_executor(
2627 from autoskillit .server .tools .tools_fleet_dispatch import dispatch_food_truck
2728
2829 monkeypatch .setenv ("AUTOSKILLIT_SESSION_TYPE" , "fleet" )
30+ _patch_dispatch_quota_no_sleep (monkeypatch )
2931 tool_ctx_kitchen_open .fleet_lock = FleetSemaphore (max_concurrent = 1 )
3032 repo = InMemoryRecipeRepository ()
3133 recipe_info = _make_recipe_info ("test-recipe" )
@@ -59,6 +61,7 @@ async def test_dispatch_food_truck_tool_passes_resume_message_to_executor(
5961 from autoskillit .server .tools .tools_fleet_dispatch import dispatch_food_truck
6062
6163 monkeypatch .setenv ("AUTOSKILLIT_SESSION_TYPE" , "fleet" )
64+ _patch_dispatch_quota_no_sleep (monkeypatch )
6265 tool_ctx_kitchen_open .fleet_lock = FleetSemaphore (max_concurrent = 1 )
6366 repo = InMemoryRecipeRepository ()
6467 recipe_info = _make_recipe_info ("test-recipe" )
@@ -93,6 +96,7 @@ async def test_dispatch_food_truck_tool_passes_caller_instructions_into_prompt(
9396 from autoskillit .server .tools .tools_fleet_dispatch import dispatch_food_truck
9497
9598 monkeypatch .setenv ("AUTOSKILLIT_SESSION_TYPE" , "fleet" )
99+ _patch_dispatch_quota_no_sleep (monkeypatch )
96100 tool_ctx_kitchen_open .fleet_lock = FleetSemaphore (max_concurrent = 1 )
97101 repo = InMemoryRecipeRepository ()
98102 recipe_info = _make_recipe_info ("test-recipe" )
@@ -121,6 +125,7 @@ async def test_dispatch_food_truck_no_caller_instructions_section_when_not_speci
121125 from autoskillit .server .tools .tools_fleet_dispatch import dispatch_food_truck
122126
123127 monkeypatch .setenv ("AUTOSKILLIT_SESSION_TYPE" , "fleet" )
128+ _patch_dispatch_quota_no_sleep (monkeypatch )
124129 tool_ctx_kitchen_open .fleet_lock = FleetSemaphore (max_concurrent = 1 )
125130 repo = InMemoryRecipeRepository ()
126131 recipe_info = _make_recipe_info ("test-recipe" )
@@ -146,8 +151,9 @@ class TestDispatchFoodTruckIdleTimeout:
146151 def _set_fleet_session (self , monkeypatch ):
147152 monkeypatch .setenv ("AUTOSKILLIT_SESSION_TYPE" , "fleet" )
148153
149- def _setup_dispatch (self , tool_ctx ):
154+ def _setup_dispatch (self , tool_ctx , monkeypatch ):
150155 """Wire tool_ctx for a standard dispatch with InMemoryHeadlessExecutor."""
156+ _patch_dispatch_quota_no_sleep (monkeypatch )
151157 tool_ctx .fleet_lock = FleetSemaphore (max_concurrent = 1 )
152158 repo = InMemoryRecipeRepository ()
153159 recipe_info = _make_recipe_info ("test-recipe" )
@@ -163,7 +169,7 @@ async def test_dispatch_food_truck_passes_idle_output_timeout_to_executor(
163169 """dispatch_food_truck MCP tool forwards idle_output_timeout to executor."""
164170 from autoskillit .server .tools .tools_fleet_dispatch import dispatch_food_truck
165171
166- self ._setup_dispatch (tool_ctx_kitchen_open )
172+ self ._setup_dispatch (tool_ctx_kitchen_open , monkeypatch )
167173
168174 await dispatch_food_truck (
169175 recipe = "test-recipe" ,
@@ -182,7 +188,7 @@ async def test_dispatch_food_truck_idle_timeout_none_when_not_specified(
182188 """When idle_output_timeout is not specified, executor receives None."""
183189 from autoskillit .server .tools .tools_fleet_dispatch import dispatch_food_truck
184190
185- self ._setup_dispatch (tool_ctx_kitchen_open )
191+ self ._setup_dispatch (tool_ctx_kitchen_open , monkeypatch )
186192
187193 await dispatch_food_truck (
188194 recipe = "test-recipe" ,
@@ -200,7 +206,7 @@ async def test_dispatch_food_truck_idle_timeout_overrides_config_default(
200206 """Explicit idle_output_timeout=0 overrides the config default of 1000."""
201207 from autoskillit .server .tools .tools_fleet_dispatch import dispatch_food_truck
202208
203- self ._setup_dispatch (tool_ctx_kitchen_open )
209+ self ._setup_dispatch (tool_ctx_kitchen_open , monkeypatch )
204210 # Config idle_output_timeout is 1000 (default from RunSkillConfig)
205211 assert tool_ctx_kitchen_open .config .run_skill .idle_output_timeout == 1000
206212
@@ -222,7 +228,7 @@ async def test_execute_dispatch_passes_idle_output_timeout_to_executor(
222228 """execute_dispatch forwards idle_output_timeout to executor.dispatch_food_truck."""
223229 from autoskillit .fleet ._api import execute_dispatch
224230
225- self ._setup_dispatch (tool_ctx )
231+ self ._setup_dispatch (tool_ctx , monkeypatch )
226232
227233 await execute_dispatch (
228234 tool_ctx = tool_ctx ,
@@ -252,6 +258,7 @@ async def test_dispatch_food_truck_returns_fleet_error_on_mcp_timeout(
252258 from autoskillit .server .tools .tools_fleet_dispatch import dispatch_food_truck
253259
254260 monkeypatch .setenv ("AUTOSKILLIT_SESSION_TYPE" , "fleet" )
261+ _patch_dispatch_quota_no_sleep (monkeypatch )
255262 tool_ctx_kitchen_open .fleet_lock = FleetSemaphore (max_concurrent = 1 )
256263 repo = InMemoryRecipeRepository ()
257264 recipe_info = _make_recipe_info ("test-recipe" )
0 commit comments