verify_slot_drafts_with

Function verify_slot_drafts_with 

Source
pub fn verify_slot_drafts_with(
    slot_idx: usize,
    dispatch_cap: usize,
    num_drafts: usize,
    drafts_at: impl Fn(usize) -> usize,
) -> usize
Expand description

Per-slot verify DRAFT capacity — the tiered half of the verify-pool diet (2026-08-16). Pure core; drafts_at(n) is the ladder policy (speculative::mtp_ladder_drafts).

A sequence occupying pool slot slot_idx can only be co-active with at least slot_idx + 1 sequences UNDER the contiguity invariant (“active sequences occupy contiguous slots [0..n)”), so the deepest draft count the ladder can ever hand it is the max over widths n > slot_idx. The invariant is TRANSIENTLY breakable (LIFO free-list claim after churn), which is why this number is also ENFORCED at dispatch: the scheduler clamps the step’s draft count to the minimum capacity across the active slots (step_mtp), so a high-slotted straggler shrinks K for its step instead of overflowing its slot’s pools.

Default ladder (4:3,8:3,16:1,32:1, --num-drafts 3): slots 0..8 keep capacity 3 (K=4), slots 8.. get capacity 1 (K=2). NOTE the runtime adaptive_rung lift (n in 9..=16 to 2 drafts on tool-shaped accept stats) EXCEEDS the static ladder this sizing derives from; under the tiered default it is clamped back to K=2 whenever any active sequence sits in a capacity-1 slot — i.e. at every n >= 9 under contiguity. ATLAS_MTP_POOL_FULL_WIDTH restores uniform full-K pools and re-enables the lift.