#5346, hardy20260000: a Qoder route of 217 accounts (routing=order)
asked one request up to 656 times, 20 GB of re-uploaded bodies a day.
When magpie has another candidate, the Qoder plugin answers Qoder's
queue code 10605 at once with a 503 + Retry-After (#4049). busy() took
that for a moment's trouble, so once every member had given way the
group's patience asked all of them again, one whole round after
another, re-sending the body on every account each round. Now busy()
leaves the plugin's queue answer alone: each member is asked once, and
the last one, asked untold, has the plugin wait the queue out as Qoder's
own client does (polling its queue status, not re-sending the body),
then gets its same-one retries.
Changed from ggbdpq's patch: it matched `\bqueue|排队` in any
provider's 5xx. A relay's "Request queue is full" or "当前排队人数较多"
is the overload a pause mends, and would have lost its patience. The
match is the plugin's own words now ("queued the request", "this
plan's queue:"), and the tests use the plugin's real errorResponse
body for both its forms (isQueued, and the service out as in
testdata/qoder_queued_10605.json) instead of an invented message.
Not changed: the walk itself. With patience=off (the reporter's
setting now) a request still asks each account once until one answers,
~20x on this route; that is the routing group finding a free account,
and a per-request attempt budget is a separate decision.
Run (mote, -tags nogui, sandboxed by the package's TestMain):
- TestQueuedGroupAsksEachMemberOnce/{queued,busy}: 5 asks, 503 told.
- TestOverloadedGroupStillReplans/{overloaded,queue full,排队}: ok.
- Broken by hand: without `!queued(body)` both queued cases FAIL
"a queued group asked 39 times, want 5 at most"; with the patch's
broad regex, "queue full" and 排队 FAIL "asked 5 times, want more
than 5". Restored, green.
- -run Queued|Overloaded|Plugin|Qoder|Patience|Replan|Single|Busy|
Fallback|Nested|Affinity|Codex busy|Shared|Retry: ok.
- gofmt -l clean; go vet -tags nogui, GOOS=linux -tags nogui and
GOOS=windows vet of internal/gateway: clean.
Not tried: a real Qoder queue on a many-account route; the full suite.
Co-authored-by: ggbdpq <ggbdpq@gmail.com>