Skip to content

fix: enforce payment cap for lower-bound rules - #216

Open
anshitraj wants to merge 1 commit into
bcnmy:developfrom
anshitraj:fix/payment-policy-lower-bound-cap
Open

anshitraj wants to merge 1 commit into
bcnmy:developfrom
anshitraj:fix/payment-policy-lower-bound-cap

Conversation

@anshitraj

@anshitraj anshitraj commented Sep 10, 2026 •

Copy link
Copy Markdown

Summary

  • only treat an existing amount rule as a payment cap when it is an equality or upper-bound rule
  • append a less-than-or-equal payment cap when the existing rule is only a lower bound
  • cover both greater-than and greater-than-or-equal policies with offline regression tests
  • add a patch changeset

Closes #215.

Testing

  • npx bun run test -- src/sdk/clients/decorators/mee/getSessionQuote.unit.test.ts
  • npx bun x biome check src/sdk/clients/decorators/mee/getSessionQuote.ts src/sdk/clients/decorators/mee/getSessionQuote.unit.test.ts
  • npx bun run build

Checklist

  • I have performed a self-review of my own code.
  • I have added tests that prove the fix is effective.
  • Documentation changes are not required for this internal policy correction.
  • The changed source and test files generate no new warnings or errors.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Payment policy helper can skip maxPaymentAmount cap for lower-bound amount rules

1 participant