feat: default two structured re-asks and sharper AIMD cut
Round 5 left three residual failure classes; ladder exhaustion (3.2% of structured calls with a single re-ask) and 429 leakage (5.8%, AIMD oscillating above the sustainable point) are addressable: re-ask default goes 1 to 2 (conservative vs instructor's 3) and the AIMD cut factor drops to 0.5.
This commit is contained in:
@@ -482,8 +482,8 @@ class TestAdaptivePacing:
|
||||
pacer=pacer,
|
||||
)
|
||||
await mw(_REQ)
|
||||
# 429 削减一次(8→5.6),随后成功加性增长(5.6 + 1/5.6)
|
||||
assert pacer.limit("a") == pytest.approx(8.0 * 0.7 + 1.0 / (8.0 * 0.7))
|
||||
# 429 削减一次(8→4),随后成功加性增长(4 + 1/4)
|
||||
assert pacer.limit("a") == pytest.approx(8.0 * 0.5 + 1.0 / (8.0 * 0.5))
|
||||
|
||||
async def test_inflight_returns_to_zero_after_call(self):
|
||||
from polygateway.sources import AdaptivePacer
|
||||
|
||||
Reference in New Issue
Block a user