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 <noreply@anthropic.com>
This commit is contained in:
GodopuandClaude Fable 5.1 committed 2026-10-10 17:14:14 +00:00
1 parent 630f04bfdc
commit 05bffc6475
1 file changed
+2
+2
View File
@@ -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")