Description
The SDK event subscription does not back off on failure. sdk/src/client.ts subscribeToEvents polls on a fixed interval (pollIntervalMs ?? 5000) and on error only calls onError before immediately retrying at the same cadence, with no exponential backoff or jitter. Repeated failures can hammer the RPC.
This is distinct from #677 (SDK workspaces/CI onboarding and typed wrappers), which addresses build integration, not subscription resilience.
Requirements and context
- Implement exponential backoff with jitter on polling failures
- Cap backoff at a configurable maximum
- Reset backoff after a successful poll
- Surface backoff state via the subscription options
- Add tests covering backoff progression and reset
Suggested execution
Fork the repo and create a branch
git checkout -b feature/sdk-event-backoff
Implement changes
- Add backoff/jitter to the event poll loop
- Add configuration for max backoff
- Add comprehensive tests
Example commit message
feat: add retry and backoff to SDK event subscription
Guidelines
- Assignment required before starting
- PR must include a closing reference to this issue
- Timeframe: 72 hours
Description
The SDK event subscription does not back off on failure.
sdk/src/client.tssubscribeToEventspolls on a fixed interval (pollIntervalMs ?? 5000) and on error only callsonErrorbefore immediately retrying at the same cadence, with no exponential backoff or jitter. Repeated failures can hammer the RPC.This is distinct from #677 (SDK workspaces/CI onboarding and typed wrappers), which addresses build integration, not subscription resilience.
Requirements and context
Suggested execution
Fork the repo and create a branch
Implement changes
Example commit message
Guidelines