You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
smooth-api-py hardcodes Full Jitter (random.uniform(0, capped)).
Users cannot configure deterministic backoff for testing or choose their preferred jitter distribution algorithm.
Proposed Solution
Add jitter?: 'full' | 'equal' | 'decorrelated' | 'none' to BackoffConfig in both TypeScript and Python.
Implement standard AWS-style jitter algorithms:
none: Deterministic exponential ($base \times 2^{attempt}$) capped at $maxDelay$.
Hi @AryanSharma48, apologies — I forked the repo and implemented this directly instead of commenting first to ask. I've opened a PR with the TypeScript implementation: #53
Summary of what I did:
Added jitter field to BackoffConfig in types.ts
Implemented all 4 strategies (none, full, equal, decorrelated) in calculateBackoff
Added prevDelay tracking in the retry loop so decorrelated jitter works correctly
Added unit tests covering all 4 strategies, verifying delays stay within [0, maxDelay]
I focused on TypeScript only for now — happy to implement the Python side (smooth-api-py) as well if you'd like, just let me know! And let me know if you'd prefer I follow a different process next time.
@shreyansh0207 No worries! Just a good thing to get assigned first as it removes possibility of 2 people working on the same issue!
The implementation was good, ive left some comments regarding some nitpicks. Have a look at them and you can proceed with the python implementation as well!
Activity
shreyansh0207 commentedon Sep 10, 2026
Hi @AryanSharma48, apologies — I forked the repo and implemented this directly instead of commenting first to ask. I've opened a PR with the TypeScript implementation: #53
Summary of what I did:
jitterfield toBackoffConfigin types.tsI focused on TypeScript only for now — happy to implement the Python side (smooth-api-py) as well if you'd like, just let me know! And let me know if you'd prefer I follow a different process next time.
AryanSharma48 commentedon Sep 10, 2026
@shreyansh0207 No worries! Just a good thing to get assigned first as it removes possibility of 2 people working on the same issue!
The implementation was good, ive left some comments regarding some nitpicks. Have a look at them and you can proceed with the python implementation as well!
[-]feat(core): Add configurable jitter strategy (`full`, `equal`, `decorrelated`, `none`) to backoff calculations[/-][+][feat] Add configurable jitter strategy (`full`, `equal`, `decorrelated`, `none`) to backoff calculations[/+]