A tick's due() snapshot still lists a task whose run is parked on an
approval — next_run only advances on completion. The overlap guard lived
inside the spawned coroutine, so when an approval landed just before a
tick, the parked run could finish and clear the guard before the
duplicate spawn took its first step, and the task ran twice.
This is the intermittent 'assert 2 == 1' in
test_blocked_run_does_not_stall_other_tasks on main's CI. The new
regression test forces that interleaving deterministically.
Imported from andrewyng/aisuite@1b4bbf303e
(contents of its platform/ directory, hoisted to the repo root).
Development history prior to this commit lives in that repository.
Co-authored-by: Devika <devikaverma11@gmail.com>