Label: complexity: high
Points: 200
Description
src/retryEngine.ts's RetryEngine retries per-call; for a payer making many payments in a session, an overall retry "budget" prevents one degraded period from exhausting excessive total retry time across all calls combined.
Technical Context
New src/retryBudget.ts. Tracks cumulative retry time/count across calls sharing a RetryEngine instance; once budget exhausted, subsequent calls fail fast without retrying until the budget window resets.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
src/retryEngine.ts'sRetryEngineretries per-call; for a payer making many payments in a session, an overall retry "budget" prevents one degraded period from exhausting excessive total retry time across all calls combined.Technical Context
New
src/retryBudget.ts. Tracks cumulative retry time/count across calls sharing aRetryEngineinstance; once budget exhausted, subsequent calls fail fast without retrying until the budget window resets.Acceptance Criteria
RetryBudget.consume(retryDurationMs)/.hasRemaining(): boolean/ resets on a rolling windowRetryEngine(existing) accepts an optional sharedRetryBudgetand checks it before each retry attempt