fix: address M2.5 verifier findings before merge
AIMD ceiling now respects per-source max_concurrency and the pacer is assembled explicitly in the client; MIN_CALLS parses as strict int; acceptance doc corrects source-5 attempt count to 549; design and migration notes aligned with implemented 429/stall/suppression semantics and AIMD constants documented.
This commit is contained in:
@@ -231,7 +231,8 @@ def _load_breaker(
|
||||
# 派生规则: 探针租约须撑过一次最慢调用,且不短于冷却期(第三项保证守卫恒成立)
|
||||
probe_ttl_s = max(2 * slowest, cooldown_s, probe_floor)
|
||||
# M2.5 失败率通道参数(可选键,库缺省——韧性参数缺省先例同 backpressure)
|
||||
min_calls = int(_opt_float(env, f"{scope}__BREAKER__MIN_CALLS", 10))
|
||||
raw_min = env.get(f"{scope}__BREAKER__MIN_CALLS")
|
||||
min_calls = int(_cast(raw_min, "int", f"{scope}__BREAKER__MIN_CALLS")) if raw_min else 10
|
||||
fail_rate = _opt_float(env, f"{scope}__BREAKER__FAIL_RATE", 0.6)
|
||||
window_s = _opt_float(env, f"{scope}__BREAKER__WINDOW_S", 60.0)
|
||||
max_cooldown_s = _opt_float(env, f"{scope}__BREAKER__MAX_COOLDOWN_S", max(300.0, cooldown_s))
|
||||
|
||||
Reference in New Issue
Block a user