Problem
GetClosestConfigAsync orders configurations by absolute distance from CarrierMaxDesi, and the fallback pricing path also uses an absolute desi difference. For an order that is below every configured range, this can apply an extra-desi surcharge even though the order is smaller than the chosen range.
Decision needed
Define the business rule for values below all configured ranges and for gaps between configured ranges.
Possible policies include:
- Use the nearest eligible range price with no surcharge when order desi is below the range.
- Use the nearest lower maximum only and fail when no lower range exists.
- Explicitly model gap pricing as a separate rule.
Acceptance criteria
- The expected rule is documented with examples.
- Unit tests cover below-minimum, above-maximum and gap cases.
- Repository query and pricing calculation implement the same documented rule.
- README business-rule section is updated.
No production behavior should be changed until the rule is explicit.
Problem
GetClosestConfigAsyncorders configurations by absolute distance fromCarrierMaxDesi, and the fallback pricing path also uses an absolute desi difference. For an order that is below every configured range, this can apply an extra-desi surcharge even though the order is smaller than the chosen range.Decision needed
Define the business rule for values below all configured ranges and for gaps between configured ranges.
Possible policies include:
Acceptance criteria
No production behavior should be changed until the rule is explicit.