refactor: unify media queue lane admission accounting - #6678
Conversation
|
Implementation and local validation are complete: 130 tests pass across the three requested media queue/route suites, including the mixed-lane regression verified before and after the refactor. Claude ran locally at medium effort; its test-stub documentation/restoration note was addressed, while future-only lane concerns and the deliberately removed saturated-queue shortcut do not change this issue's chosen scope. This PR is intentionally left open because required CI Gate remains red after one unchanged-head rerun. Attempt 1 failed the existing mediaJobQueue failure-hold reset test. Attempt 2 failed services/voice/tts-qwen3.test.js on Windows with QWEN3_RUNTIME_UNAVAILABLE and canceled sibling jobs. No CI bypass or merge was attempted. Branch and issue claim markers are preserved; the worktree is being removed for handoff. |
Review round 1 —
|
Summary
Use the existing lane limits and classifier to account for GPU, cloud, and remote admission with one numeric slot map. Preserve snapshot timing, held-job skips, FIFO dispatch, live cloud limits, run-now oversubscription, and the worker cadence while reducing drainLoop complexity from 17 to 7 under the issue's counting convention.
Test plan
Closes #6677