From e47253175affdd10617cb3e953e28a057c16b507 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 17 Nov 2026 19:34:26 +0000 Subject: [PATCH] test(episode): give _until a budget that covers a cold start The first episode in a process imports every sandbox provider's SDK before its first turn opens, which takes several seconds. Run on its own, test_a_turn_not_taken_by_its_deadline_fails_the_run_and_is_never_handed_out spent its whole 5 s wait on that import and timed out before the 1 s turn deadline began. The wait returns as soon as its condition holds, so a 30 s budget costs a passing test nothing. --- tst/unit/task/episode/run_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tst/unit/task/episode/run_test.py b/tst/unit/task/episode/run_test.py index a51290470..21238c068 100644 --- a/tst/unit/task/episode/run_test.py +++ b/tst/unit/task/episode/run_test.py @@ -192,7 +192,9 @@ async def _ended(episode): async def _until(holds): - async with asyncio.timeout(5): + # The budget covers a cold start: the first episode in a process imports every sandbox provider's SDK (seconds) + # before its first turn opens. The loop returns as soon as ``holds`` does, so a passing test never waits it out. + async with asyncio.timeout(30): while not holds(): await asyncio.sleep(0.01)