test(local-rl): de-flake stamp-before-train concurrent-thumbs test on Windows

Pre-existing v0.71.13 test flaked on windows-latest CI: record_thumb stamps
time.time() and count_new_thumbs_since uses strict `>`, so on Windows' ~15.6ms
clock resolution the two mid-train thumbs could land in the same tick as
run_started (ts == run_started, dropped). Sleep one clock tick at the start of
slow_train so the thumbs are strictly later. Prod semantics unchanged; tests-only.
This commit is contained in:
Alpamys 2026-06-07 16:41:31 +05:00
parent 85f42029fb
commit cb1fa2e69f
1 changed files with 7 additions and 1 deletions

View File

@ -1144,7 +1144,13 @@ class TestReviewFixes:
)
def slow_train(*, base_model, pairs_path, output_dir, train_method):
# Simulate a thumb landing mid-train.
# Simulate a thumb landing mid-train. Sleep one clock tick first so
# the thumbs' time.time() ts is strictly greater than run_started on
# coarse-resolution clocks (Windows time.time() ~15.6ms) — otherwise
# a same-tick ts == run_started is dropped by the strict `>` count.
import time as _t
_t.sleep(0.05)
record_thumb(
db_path="db.sqlite", prompt="qZ", response="x", thumb="up"
)