pub fn verify_slot_drafts_with(
slot_idx: usize,
dispatch_cap: usize,
num_drafts: usize,
drafts_at: impl Fn(usize) -> usize,
) -> usizeExpand description
2026-09-25: Verify draft capacity of pool slot slot_idx: the largest count
drafts_at(n) gives for a width n in slot_idx + 1..=max(dispatch_cap, slot_idx + 1), clamped to 1..=num_drafts; 0 when num_drafts is 0.
Retirement compacts active sequences onto slots 0..n
(retire_finished_sequences), so a sequence on slot slot_idx usually runs
with at least slot_idx + 1 active, hence the lower bound. When it does not,
the scheduler clamps the step’s draft count to the smallest capacity among
the active slots (spec_capacity::clamp_drafts_to_slot_capacity).
With the default ladder (4:3,8:3,16:1,32:1), --num-drafts 3 and a
dispatch cap of 32, slots 0..8 get 3 drafts and slots from 8 on get 1. So
adaptive_rung’s two-draft lift at widths 9..=16 is clamped back to one
draft at every such width: nine or more active sequences hold as many
distinct slots, one of them at index 8 or above. mtp_pool_full_width
gives every slot num_drafts, which keeps the lift.