Skip to content

backend/fix/payout-order-webhook-status#1246

Open
yashikakaushik wants to merge 1 commit into
mainfrom
backend/fix/payout-order-webhook-status
Open

backend/fix/payout-order-webhook-status#1246
yashikakaushik wants to merge 1 commit into
mainfrom
backend/fix/payout-order-webhook-status

Conversation

@yashikakaushik
Copy link
Copy Markdown
Contributor

@yashikakaushik yashikakaushik commented Apr 28, 2026

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

Description

Additional Changes

  • This PR modifies the database schema (database migration added)
  • This PR modifies dhall configs/environment variables

Motivation and Context

How did you test it?

Checklist

  • I formatted the code and addressed linter errors ./dev/format-all-files.sh
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

Summary by CodeRabbit

  • New Features
    • Added support for a new payout order status.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Walkthrough

A new NEW enum variant is added to the PayoutOrderStatus type in the Juspay payout module, expanding the set of representable payout order statuses. All existing derived instances and functionality remain unchanged.

Changes

Cohort / File(s) Summary
Payout Status Enum Extension
lib/mobility-core/src/Kernel/External/Payout/Juspay/Types/Payout.hs
Added NEW constructor to PayoutOrderStatus enum, expanding available status variants for payout orders.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A status so shiny and new,
Now NEW joins the queue,
Like a fresh carrot in the patch,
One enum line to match,
Simple, swift, no fuss to do!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title references 'payout-order-webhook-status' but the actual change only adds a NEW enum variant to PayoutOrderStatus type definition, with no webhook or status handling changes visible. Revise the title to accurately reflect the change, such as 'Add NEW variant to PayoutOrderStatus enum' or provide detailed context showing webhook-related modifications.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backend/fix/payout-order-webhook-status

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
lib/mobility-core/src/Kernel/External/Payout/Juspay/Types/Payout.hs (1)

46-46: Add regression coverage for the new PayoutOrderStatus.NEW path.

Line 46 introduces a new public enum variant that propagates into response types (e.g., lib/mobility-core/src/Kernel/External/Payout/Interface/Types.hs Lines 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

📥 Commits

Reviewing files that changed from the base of the PR and between 72af9c3 and c7269d0.

📒 Files selected for processing (1)
  • lib/mobility-core/src/Kernel/External/Payout/Juspay/Types/Payout.hs

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.

1 participant