-
Notifications
You must be signed in to change notification settings - Fork 29
Changes for EliminationV2 consumption #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for EliminationV2 consumption by integrating gateway reference ID functionality into the scoring system. The changes enable the system to use gateway reference IDs for elimination scoring decisions and provide fallback mechanisms between Redis and service configuration sources.
- Add gateway reference ID support to scoring data structures and functions
- Implement Redis-based configuration lookup with service config fallback for elimination thresholds
- Update scoring functions to pass gateway scoring data throughout the elimination flow
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/feedback/types.rs | Adds gatewayReferenceId field to GatewayScoringKeyType struct |
| src/feedback/gateway_scoring_service.rs | Passes gateway_scoring_data parameter to scoring functions |
| src/feedback/gateway_elimination_scoring/flow.rs | Updates elimination scoring functions to accept and use gateway_scoring_data |
| src/decider/gatewaydecider/utils.rs | Adds common gateway reference ID logic and updates scoring data initialization |
| src/decider/gatewaydecider/types.rs | Adds gatewayReferenceId field to scoring data structures |
| src/decider/gatewaydecider/gw_scoring.rs | Implements Redis fallback mechanism and updates scoring functions |
| src/decider/gatewaydecider/constants.rs | Adds aggregateKeyPrefix constant |
Comments suppressed due to low confidence (2)
src/decider/gatewaydecider/gw_scoring.rs:1
- Missing space after comma in function call parameters. Should have space after
txn_detail,in both lines.
// use eulerhs::prelude::*;
src/decider/gatewaydecider/gw_scoring.rs:1
- Missing space after comma in function call parameters. Should have space after
txn_detail,in both lines.
// use eulerhs::prelude::*;
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| let app_state = get_tenant_app_state().await; | ||
| app_state | ||
| .redis_conn | ||
| .get_key::<MetricEntry>(key, "metric_entry") |
Copilot
AI
Sep 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function call uses key but should use dkey which contains the actual dimension key value. The key parameter is the aggregate key, not the specific metric key.
| .get_key::<MetricEntry>(key, "metric_entry") | |
| .get_key::<MetricEntry>(dkey, "metric_entry") |
| let pmt = &txn_card_info.paymentMethodType; | ||
| let source_obj = if txn_card_info.paymentMethod == UPI { | ||
| txn_detail.sourceObject.clone() | ||
| } else { | ||
| Some(txn_card_info.paymentMethod.clone()) | ||
| }; | ||
| let pm = if txn_card_info.paymentMethodType == UPI { | ||
| source_obj.clone() | ||
| } else { | ||
| Some(txn_card_info.paymentMethod.clone()) | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| let pmt = &txn_card_info.paymentMethodType; | |
| let source_obj = if txn_card_info.paymentMethod == UPI { | |
| txn_detail.sourceObject.clone() | |
| } else { | |
| Some(txn_card_info.paymentMethod.clone()) | |
| }; | |
| let pm = if txn_card_info.paymentMethodType == UPI { | |
| source_obj.clone() | |
| } else { | |
| Some(txn_card_info.paymentMethod.clone()) | |
| }; | |
| let pmt = &txn_card_info.paymentMethodType; | |
| let pm = if txn_card_info.paymentMethodType == UPI { | |
| txn_detail.sourceObject.clone() | |
| } else { | |
| Some(txn_card_info.paymentMethod.clone()) | |
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
b1e4140
Changes for EliminationV2 consumption