Skip to content

Commit dfb696e

Browse files
authored
Merge pull request #319 from alex-feel/alex-feel-dev
Replace broken backoff with linear additive strategy and cross-thread coordination
2 parents 6bc4c4c + 5d2b134 commit dfb696e

File tree

3 files changed

+572
-83
lines changed

3 files changed

+572
-83
lines changed

CLAUDE.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -433,14 +433,16 @@ This pattern is applied consistently to both npm install and npm uninstall opera
433433

434434
### Download Retry Configuration
435435

436-
The setup scripts include robust retry logic for handling GitHub API rate limiting during file downloads:
436+
The setup scripts include robust retry logic for handling GitHub API rate limiting:
437437

438-
- **Retry attempts:** 10 (with exponential backoff)
439-
- **Initial delay:** 2 seconds, doubling each retry
440-
- **Maximum delay cap:** 60 seconds per retry
441-
- **Jitter:** Random 0-25% added to prevent synchronized retries
438+
- **Retry attempts:** 10 (with linear additive backoff)
439+
- **Base delay:** 1 second for the first retry
440+
- **Additive increment:** +2 seconds per subsequent attempt (sequence: 1s, 3s, 5s, 7s, ...)
441+
- **Maximum delay cap:** 60 seconds per retry (before jitter)
442+
- **Jitter:** Random 0-25% added to all retries to prevent synchronized requests
442443
- **Stagger delay:** 0.5 second delay between launching concurrent download threads
443-
- **Total worst-case wait:** ~6 minutes per file (covers extended rate limit windows)
444+
- **Cross-thread coordination:** `RateLimitCoordinator` shares rate-limit state across threads
445+
- **Header respect:** `Retry-After` and `x-ratelimit-reset` headers used as minimum floor
444446

445447
### Hooks Configuration Structure
446448

0 commit comments

Comments
 (0)