The test gave the second request's round trip 1s as a stand-in for "didn't
wait for A's minute", and a loaded machine went over it (1.13s) with the
routing right. It now reads the second request's route from the trace:
done, one try, to pb, Queued 0 (the trace's Queued holds the wait for
room in the minute too). The time bound stays as a backstop at half the
minute, and the minute is now 20s instead of 5s, so the bar is 10s:
nothing waits for it when the routing is right.
Based on ump45nose's patch, which read usage.Load's record. The review
found that record's Queued and Tries are 0 for a non-streaming request
even after a 20s wait (Queued is filled only when TTFT > 0), so only its
provider check carried weight; the trace's try carries the wait
(Queued:19984 in the hand-broken run). The patch's 2.5s bar was also
under this machine's 2.97s round trip with B held 1.2s.
What ran (worktree at origin/main 81313b912, sandbox HOME, go1.26.8
darwin/arm64, load ~270-300):
- Flake reproduced: main's test with B's minuteVendor late 1200ms:
"the second waited 2.969s", FAIL. The new test passes with it (3.57s)
and -count=3 without it.
- Broken by hand: ready() ignoring MaxRPM makes the group wait for A:
red on the vendor counts ("A saw 2, B 0"), and with that check turned
to a Logf, red on the trace check (one try to pa, Queued 19984).
- gofmt -l . clean; go vet -tags nogui ./... for darwin, linux, windows.
- set -o pipefail; go test -count=1 -timeout 45m ./...: 65 packages ok,
internal/gateway ok (1430s). internal/gui red on TestMainWindowCorners
(#1936) and, on a rerun of internal/gui alone, also
TestSetAnswersWhileDevinAndProvidersHang (#1375): filed load reds in a
package this commit doesn't touch.
Co-authored-by: ump45nose <52391318+ump45nose@users.noreply.github.com>