backend/fix/payout-order-webhook-status#1246
Conversation
WalkthroughA new Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
lib/mobility-core/src/Kernel/External/Payout/Juspay/Types/Payout.hs (1)
46-46: Add regression coverage for the newPayoutOrderStatus.NEWpath.Line 46 introduces a new public enum variant that propagates into response types (e.g.,
lib/mobility-core/src/Kernel/External/Payout/Interface/Types.hsLines 65-81). Please add tests for JSON decode/encode and webhook/status response handling with"NEW"so this fix stays locked in.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/mobility-core/src/Kernel/External/Payout/Juspay/Types/Payout.hs` at line 46, Add regression tests covering the new enum variant PayoutOrderStatus.NEW: add JSON encode/decode tests that assert the PayoutOrderStatus JSON round-trips including the "NEW" value, and add tests exercising the webhook/status response parsing and rendering paths that propagate PayoutOrderStatus (the response types in the Interface.Types module) to ensure "NEW" is handled the same as other statuses; update or add unit tests in the Juspay/Types/Payout test suite to include these cases so the new variant remains covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@lib/mobility-core/src/Kernel/External/Payout/Juspay/Types/Payout.hs`:
- Line 46: Add regression tests covering the new enum variant
PayoutOrderStatus.NEW: add JSON encode/decode tests that assert the
PayoutOrderStatus JSON round-trips including the "NEW" value, and add tests
exercising the webhook/status response parsing and rendering paths that
propagate PayoutOrderStatus (the response types in the Interface.Types module)
to ensure "NEW" is handled the same as other statuses; update or add unit tests
in the Juspay/Types/Payout test suite to include these cases so the new variant
remains covered.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9a250f12-e63c-4966-a43a-748bd2e5365f
📒 Files selected for processing (1)
lib/mobility-core/src/Kernel/External/Payout/Juspay/Types/Payout.hs
Type of Change
Description
Additional Changes
Motivation and Context
How did you test it?
Checklist
./dev/format-all-files.shSummary by CodeRabbit