fair-queue
Deficit round-robin (DRR), the workhorse weighted-fair-queueing algorithm. Each round, every client's deficit counter accumulates its weight; the scheduler serves any client whose deficit is at least 1 (and decrements it). Over N rotations, client c with weight w_c gets w_c / sum(w) share of the picks. That's the invariant the tests assert.
The pure scheduler lives in wal-sh.tools.fair-queue.core (host-neutral
.cljc). The browser adapter is wal-sh.tools.fair-queue.browser. See
also: RFC 8290 (FQ-CoDel), Shreedhar & Varghese 1996 (the original DRR
paper).
Build: gmake tools-cljs; debug in isolation: gmake dev-tool TOOL=fair-queue.