Skip to content

feat(backend): add monitor retry backoff helper (#276) - #352

Draft
s6pa1rta3n-lab wants to merge 1 commit into
Quittance-Labs:mainfrom
s6pa1rta3n-lab:fix-issue-276
Draft

feat(backend): add monitor retry backoff helper (#276)#352
s6pa1rta3n-lab wants to merge 1 commit into
Quittance-Labs:mainfrom
s6pa1rta3n-lab:fix-issue-276

Conversation

@s6pa1rta3n-lab

Copy link
Copy Markdown

Summary

Implements monitorBackoffMs(failureCount) in backend/src/utils/monitor-retry-backoff.ts for capped exponential backoff on payment stream reconnect attempts and wires it into PaymentMonitorService.

Changes

  • backend/src/utils/monitor-retry-backoff.ts: Implemented monitorBackoffMs(), isValidFailureCount(), and default configuration constants.
  • backend/tests/fixtures/monitor-retry-backoff.fixture.ts: Added fixture cases for standard progression, custom options, invalid input fallbacks, and validation cases.
  • backend/tests/monitor-retry-backoff.test.ts: Added unit test suite covering constants, progression fixtures, custom options, invalid inputs, edge cases, monotonicity, and upper bound caps.
  • backend/src/services/payment-monitor.service.ts: Imported monitorBackoffMs() and wired it into handleError with consecutive failure count tracking.

Verification

  • npm test: All 208 backend unit & integration tests pass cleanly.
  • npm run typecheck: TypeScript verification passes with 0 errors.
  • PR touches exactly 4 paths per issue specification.

Closes #276

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(backend): add monitor retry backoff helper

1 participant