[Core] Rework scheduler skipped_waiting queue (#58947)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
Co-authored-by: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com>
This commit is contained in:
Nick Hill
2026-09-28 20:03:16 +00:00
committed by GitHub
co-authored by Robert Shaw
parent 2619b6b72b
commit 42dbe4578c
13 changed files with 220 additions and 149 deletions
@@ -554,9 +554,9 @@ class TestStreamingScheduler(unittest.TestCase):
eco_cycle2 = eco_dict_cycle2[session.client_index].outputs[0]
assert eco_cycle2.finish_reason == FinishReason.STOP
assert session.status == RequestStatus.WAITING_FOR_STREAMING_REQ
# Sessions paused for streaming input are blocked-waiting, so they
# live in the skipped_waiting queue rather than the main waiting queue.
assert session in scheduler.skipped_waiting
# Sessions paused for streaming input keep their KV blocks, so they
# live in the kv_holding_waiting queue.
assert session in scheduler.kv_holding_waiting
assert session._all_token_ids == [1, 2, 3, 10, STOP_TOKEN]
# CRITICAL ASSERTION: Cached prompt_token_ids STILL must not have changed