feat(#905): build automated dunning management with configurable retry strategies - #1066
Open
Prozaks wants to merge 1 commit into
Open
feat(#905): build automated dunning management with configurable retry strategies#1066Prozaks wants to merge 1 commit into
Prozaks wants to merge 1 commit into
Conversation
|
@Prozaks Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…urable retry strategies - DunningService: strategy resolution (A/B variant > failure-reason override > plan default > built-in), four backoff policies: fixed, linear, exponential, and exponential-with-jitter - Jitter decorrelates retry storms following a single upstream outage - recoveryRate now measured over closed outcomes only (in-flight dunning no longer depresses the rate) - Add getStrategy(), listRecoveredDunning(), fix recordSuccessfulCharge return - Fix all compile errors: this.templates, this.recoveredEntries, this.getStrategy() references resolved; DunningConfiguration stage reading corrected - Add retryable flag for hard decline differentiation - 394 lines of tests covering all strategy paths and backoff policies - Add docs/DUNNING_RETRY_STRATEGIES.md with configuration guide Closes Smartdevs17#905
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements automated dunning management with configurable retry strategies.
Closes #905
Changes
backend/services/billing/dunningService.tsrecoveryRatenow measured over closed outcomes only — in-flight dunning no longer depresses the metricgetStrategy(),listRecoveredDunning(); fixedrecordSuccessfulChargereturn typeretryableflag prevents futile retriesthis.templates,this.recoveredEntries,this.getStrategy()references; correct stage reading fromDunningConfigurationbackend/services/billing/interfaces.tsIDunningServiceinterface with new method signaturesgetStrategy(),listRecoveredDunning(), optionalfailureReasononstartDunningbackend/services/billing/index.tsBackoffPolicytypeTests
backend/services/billing/__tests__/dunningService.test.ts: 394 lines covering all strategy paths and backoff policiesDocumentation
docs/DUNNING_RETRY_STRATEGIES.md: configuration guide with examplesAcceptance Criteria
Technical Scope
Covers:
backend/services/billing/,contracts/subscription/src/