From 05bffc6475a7c63d40c413234fbc52cad557ce90 Mon Sep 17 00:00:00 2001 From: Godopu Date: Sat, 10 Oct 2026 17:14:14 +0000 Subject: [PATCH] test(issue-50): C8 registers its two jobs in different seconds The FIFO is (created_at, job_id) at second resolution; B and C registered within the same second once in the full suite, C sorted first by id and cleared while B's signal was still fresh, so the stale line never printed. C7 already keeps the 1.2 s gap; C8 now does too and asserts the order. Co-Authored-By: Claude Fable 5.1 --- tests/test_issue50_dispatch_herdr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_issue50_dispatch_herdr.py b/tests/test_issue50_dispatch_herdr.py index a6dc623..479592c 100644 --- a/tests/test_issue50_dispatch_herdr.py +++ b/tests/test_issue50_dispatch_herdr.py @@ -437,8 +437,10 @@ def test_c8_a_dead_waiter_is_skipped_once_its_signal_is_stale(box): box.wait_field(b, "dispatch_wait_at") os.kill(proc_b.pid, signal.SIGKILL) # the wrapper is gone; its waiter sees that and stops proc_b.wait(timeout=30) + time.sleep(1.2) # C's created_at is a later second: B stays ahead in the FIFO proc_c = box.submit(prompt="work C", MAM_DISPATCH_WAIT_S="60") c = box.wait_new_job(known | {b}) + assert box.record(b)["created_at"] < box.record(c)["created_at"] _after(2, box.publish, a, "completed", "prior done") _after(14, box.publish, c, "started") # after B's 5 s ack window has long passed _after(16, box.publish, c, "completed", "c done")