feat: add AIMD adaptive concurrency pacing per source

P6 round 2 showed routing convergence turns account-level 429s into
the binding constraint (62% throttle rate at full concurrency). Each
source now carries a local AIMD limit: multiplicative cut on 429,
additive growth on success. Over-limit picks queue via the existing
quota-wait poll instead of burning retry budget or tripping the
circuit-open verdict.
This commit is contained in:
2026-07-21 10:38:48 -04:00
parent 910857fd13
commit 58061c7536
6 changed files with 157 additions and 2 deletions
+9 -1
View File
@@ -8,7 +8,15 @@ SCOPE_REASONS = frozenset(
{"circuit_open", "retry_exhausted", "stalled", "quota_exhausted", "no_sources"}
)
SOURCE_REASONS = frozenset(
{"network_error", "timeout", "rate_limited", "source_dead", "circuit_open", "cooldown"}
{
"network_error",
"timeout",
"rate_limited",
"source_dead",
"circuit_open",
"cooldown",
"adaptive_paced", # M2.5 §3.35: AIMD 超限排队(quota-wait 通道)
}
)