-
Notifications
You must be signed in to change notification settings - Fork 98
Implement a typed exponential backoff policy for SDK request retries #458
Copy link
Copy link
Open
Labels
GrantFox OSSGrantFox Open Source Sponsorship program tagGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesIssue may qualify for a reward upon successful completion per campaign rulesThird CampaignOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsadvancedAdvanced difficulty tasks requiring significant domain knowledge and implementation effortAdvanced difficulty tasks requiring significant domain knowledge and implementation effortbackendBackend services, application logic, persistence integration, and server-side functionalityBackend services, application logic, persistence integration, and server-side functionalityconsistencyPattern and convention standardization across the codebase for uniformityPattern and convention standardization across the codebase for uniformityperformancePerformance optimization or latency/throughput improvement workPerformance optimization or latency/throughput improvement work
Description
Activity
Metadata
Metadata
Assignees
Labels
GrantFox OSSGrantFox Open Source Sponsorship program tagGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesIssue may qualify for a reward upon successful completion per campaign rulesThird CampaignOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsadvancedAdvanced difficulty tasks requiring significant domain knowledge and implementation effortAdvanced difficulty tasks requiring significant domain knowledge and implementation effortbackendBackend services, application logic, persistence integration, and server-side functionalityBackend services, application logic, persistence integration, and server-side functionalityconsistencyPattern and convention standardization across the codebase for uniformityPattern and convention standardization across the codebase for uniformityperformancePerformance optimization or latency/throughput improvement workPerformance optimization or latency/throughput improvement work
Difficulty: Advanced
Type: Feature
Recommended labels (if available in this repo): performance, backend, consistency, advanced
Background
GuildPass SDK may need to retry temporary network failures such as 429 responses, transient 5xx responses, or short-lived connectivity issues. Retry behaviour should not be reimplemented independently by every API method.
This issue introduces a standalone retry policy primitive without connecting it to the SDK transport layer.
Problem
There is currently no reusable SDK abstraction for deciding whether a failed request should be retried or for calculating retry delays consistently.
Naive retries can retry permanent failures, exceed safe delay limits, or produce synchronized retry storms across clients.
Expected Outcome
Implement a deterministic retry policy module that classifies retryable outcomes and calculates bounded exponential backoff delays with optional jitter.
Suggested Implementation
Define configuration conceptually similar to:
The module should:
Acceptance Criteria
pnpm typecheckpasses.pnpm buildpasses.pnpm testpasses.Likely Affected Files/Directories
Independence Requirement
This issue must remain a pure retry-policy calculation task and must not depend on the transport or clock issues.