Ranked checks
The owner's ranked list (Next up) decides which waiting work a worker takes first, not only which issue the crew starts.
- Checks.
pickNext(checks/service.ts) takes, in order: a check that
has waited STARVATION_MS (half the lane budget), then an approved pull's
check, then the rest. Inside each tier the check whose issue stands highest
on the list goes first, the unranked last, newest first as the tie-break.
- Rework and re-checks (
crew/requested.ts,crew/stale_reds.ts) are
taken in the same rank order, the unranked after, each group as it came.
- Home lane. The checks lane lists waiting checks in the order they will
start, by the same three tiers, so the tile saying "next in line" names the check that starts next. Approval is read in one batch per lane read; the database orders by rank before the 40-row bound, so a ranked check is never cut off behind newer unranked ones.
- Across repositories. Ranks are per repository. Equal places in two
repositories fall to the same tie-break (newest check first); nothing interleaves them by any other rule.
Tests: test/checks-ranked.test.ts.