A cooldown counts from the failure
One candidate's report adds a cooldown: a task waits a while after it's preempted before it can run again, and you work out from the preempt timestamp when the cooldown ends (1 report). The practice problem gives each task a cooldown and applies it after every failure, from fail or from a timeout.
The rule: a task that fails at time t is ready again at t + cooldown.
Count from the failure, not from the reservation. Counted from the reserve at 0, a would be ready at 5, while it has only cooled for 2.
For a timeout, the failure time is the deadline, not the moment the queue notices. With lazy expiry the queue might notice at 12 a lease that ended at 10. The task failed at 10, so with cooldown 4 it's ready at 14.
The cooling tasks need their own heap, keyed by ready_at, because they become ready in that order. When a task's cooldown ends, it moves to the ready heap, keyed by its enqueue number again. Two heaps, two orders: when a task can go, and which task goes first.
The function release in the editor moves cooled tasks from the cooling heap to the ready heap. Write it, so every task whose ready_at has come moves over, keyed by its enqueue number.