| fix(retry): give each error category its own retry budget so QueueError doesn't reduce 403 maxAttempts
Before this fix, the retry policy used Effect's global meta.attempt counter for
all error types. When a 406 QueueError consumed attempt 1, subsequent 403
UserRateLimit only got 2 retries (attempts 2 and 3) instead of the intended 3,
and its delays were offset (delays[1]=20s instead of delays[0]=10s).
The fix adds per-category attempt tracking: getRetryCategory() categorizes
errors into groups (queue, 403_user_rate_limit, model_service_rate_limit, etc.)
and the policy resets categoryAttempt on category change, giving each error
type with maxAttempts its own independent retry budget.
Signed-off-by: zhangyuchen <zhangyuchen45@huawei.com>
| 1 天前 |