Port upstream sgl-project/sglang #23323. Our state_type in [swa, nsa] transfer path only handled len(prefill_state_indices) < len(dst), and even then clipped prefill_state_indices (a no-op when prefill is shorter), and never handled the prefill > dst case. Now clip prefill when it is longer and clip the dst state indices when it is shorter, so the extra-pool transfer never reads past prefill_state_indices or writes past dst_state_indices. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>