You are working on the hyperswitch repository (Rust payment processing system).…
- User
You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
- Repository: juspay/hyperswitch
- Working directory: ./repos/hyperswitch_pool_7 (already cloned)
- Base commit: 344dcd6e43022c3e5479629b57bff255b903d5b5
- Task ID: juspay__hyperswitch-8070
- Version: v1.114.0
TASK DESCRIPTION: Bug: [FEATURE] Add support for multiple retry algorithms in revenue recovery workflow #7
Add support for Process tracker revenue recovery workflow to support multiple retry algorithms.
- The retry algorithm is a runtime config
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
- This PR adds support for updating the retry Algorithm from Monitoring to Smart , once the threshold is reached
- It also adds support in the process tracker workflow for revenue recovery , to consume schedule time for retry based on different retry algorithms
Additional Changes
- This PR modifies the API contract
- This PR modifies the database schema
- This PR modifies application configuration/environment variables
Motivation and Context
How did you test it?
- Create a MA and a Billing connector
- The retry_Algorithm type in business profile will be switched to Monitoring
- Once the time in the revenue_recovery_config is surpassed , the
retry_Algorithm typefield in business profile will be updated to Cascading [image: Screenshot 2025-05-15 at 7 45 53 PM] open
Checklist
- I formatted the code
cargo +nightly fmt --all - I addressed lints thrown by
cargo clippy - I reviewed the submitted code
- I added unit tests for my changes where possible
CRITICAL INSTRUCTIONS - WORK FAST AND EFFICIENTLY:
-
Create DENSE, ACTION-FOCUSED todos IMMEDIATELY
- Make todos specific and actionable
- Focus on HIGH-IMPACT actions only
- 5-8 todos maximum - be surgical, not exhaustive
-
Execute aggressively:
- Use bash commands to search efficiently
- Read multiple related files in quick succession
- Make ALL related changes in one edit
- Skip unnecessary exploration
-
File operations:
- All repo files: './repos/hyperswitch_pool_7/'
- Use targeted edits over whole file rewrites
-
NO TESTING UNLESS CRITICAL:
- Focus on making the actual code changes
- Only test if explicitly required
-
Maximize information density:
- Each turn should accomplish significant work
- Batch file reads when examining related code
- Use search commands to locate code quickly
EFFICIENCY IS CRITICAL. Make substantial progress every turn.
Assistant
I'll help you implement support for multiple retry algorithms in the revenue recovery workflow. Let me start by understanding the current implementation and identifying the key files that need to be modified.
First, I'll explore the repository structure to locate the relevant files for revenue recovery and retry algorithms.
Assistant
Let me use the Explore agent properly to understand the repository structure and find the relevant files.
Assistant
Now let me look more specifically at the retry algorithm implementations and business profiles to understand how to add support for multiple retry algorithms.
Assistant
Let me look at the core revenue recovery implementation and retry logic:
Assistant
Let me also examine the workflow implementation to understand how retries are currently handled:
Assistant
Let me check the retry-related utilities and configuration files to understand the retry scheduling system:
Assistant
Now let me look at the process tracker types to understand retry configurations:
Assistant
Now let me check the business profile to see how retry configurations are stored and managed:
Assistant
(no content)
Assistant
Let me check for retry_algorithm in the business profile:
Assistant
Let me read the business profile files to understand the retry_algorithm field:
Assistant
(no content)
Assistant
Now let me check the enums to understand the revenue recovery algorithm types:
Assistant
(no content)
Assistant
(no content)
Assistant
Now I need to understand the revenue recovery config. Let me look at how it's currently used in the codebase and how it relates to the issue.
Assistant
Let me check the issue description more carefully and create a plan. Based on the task description and what I've seen so far, I need to implement support for multiple retry algorithms in revenue recovery workflow. The key insight is that there's already support for three types of retry algorithms:
- Monitoring (default)
- Smart
- Cascading
And the system should be able to switch between these based on certain conditions.
Let me first understand how the current process works and what changes are needed:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →