Skip to content

Expired-deadline test: a deadline strictly in the past - #83

Merged
Autoplectic merged 1 commit into
mainfrom
windows-expired-deadline-test
Nov 28, 2026
Merged

Autoplectic merged 1 commit into
mainfrom
windows-expired-deadline-test

Conversation

@Autoplectic

Copy link
Copy Markdown
Member

Summary

  • test_coupled_memory_and_targeted_searches_stop_at_an_expired_deadline (from Keep generative_model within its time budget #79) fails on main on Windows with Python 3.11 and 3.12: targeted_line_split_seeds returns seeds although its deadline has passed.
  • The test passed deadline=time.monotonic(), and the searches stop once time.monotonic() > deadline. Before Python 3.13, time.monotonic() on Windows ticks every 15.6 ms (GetTickCount64; 3.13 moved it to QueryPerformanceCounter), so the first check usually reads the same value and the first start runs. The test now passes a deadline one second in the past to all three searches. The library is unchanged: there, deadlines come from a time budget and are never the current instant.

Tests

  • Reproduced with a frozen clock: with the deadline equal to the clock, targeted_line_split_seeds returns 3 seeds; with it one second in the past, none.
  • The test passes, and passes with time.monotonic rounded down to 15.6 ms ticks.
  • PR CI tests Windows only on Python 3.14, so the failing jobs run only on main.

Before Python 3.13, time.monotonic() on Windows ticks every 15.6 ms, so a
deadline of time.monotonic() usually still equals the clock at the first
check, and targeted_line_split_seeds ran its first start: the test failed
on main on Windows with Python 3.11 and 3.12.
@Autoplectic
Autoplectic merged commit 0ef950f into main Nov 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant