Skip to content

feat: rsf recon types added - #1468

Open
bytedex wants to merge 1 commit into
mainfrom
rsf
Open

feat: rsf recon types added#1468
bytedex wants to merge 1 commit into
mainfrom
rsf

Conversation

@bytedex

@bytedex bytedex commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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 receiver reconciliation actions.
    • Receiver reconciliation events are now correctly recognized and mapped within the system.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The Beckn Action type now supports receiver reconciliation actions. mapToCbAction maps both new actions to ON_RECEIVER_RECON.

Changes

Receiver reconciliation actions

Layer / File(s) Summary
Action type and callback mapping
lib/mobility-core/src/Kernel/Types/Beckn/Context.hs
The public Action type adds RECEIVER_RECON and ON_RECEIVER_RECON. mapToCbAction maps both constructors to ON_RECEIVER_RECON.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A rabbit hops through action space,
Two recon signs now find their place.
RECEIVER_RECON joins the run,
ON_RECEIVER_RECON greets the sun.
Both map cleanly, neat and bright—
Reconciliation takes flight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the addition of RSF reconciliation types, which matches the main change in the pull request.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rsf

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@lib/mobility-core/src/Kernel/Types/Beckn/Context.hs`:
- Around line 125-126: Update mapToCbAction so ON_RECEIVER_RECON maps to Nothing
while preserving its request mapping to RECEIVER_RECON. Add regression tests
covering this callback mapping and getSubscriberType, verifying the callback is
classified as BPP rather than BAP.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4d5f138a-74a1-4135-829a-0b8f9323a565

📥 Commits

Reviewing files that changed from the base of the PR and between 286389d and baacde4.

📒 Files selected for processing (1)
  • lib/mobility-core/src/Kernel/Types/Beckn/Context.hs

Comment on lines +125 to +126
RECEIVER_RECON -> Just ON_RECEIVER_RECON
ON_RECEIVER_RECON -> Just ON_RECEIVER_RECON

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Map ON_RECEIVER_RECON to Nothing.

getSubscriberType at Line 130 treats Just as Subscriber.BAP and Nothing as Subscriber.BPP. The new ON_RECEIVER_RECON -> Just ON_RECEIVER_RECON branch therefore classifies the callback as BAP.

withBecknCallbackMig in lib/mobility-core/src/Kernel/Utils/Callback.hs, Lines 59-78, uses the mapped value as cbContext.action. RSF identifies the receiver as the Seller App/BPP and uses on_receiver_recon as its callback. (ondc-static-website-media.s3.ap-south-1.amazonaws.com)

Keep the request mapping, but make the callback mapping terminal:

Proposed fix
   RECEIVER_RECON -> Just ON_RECEIVER_RECON
-  ON_RECEIVER_RECON -> Just ON_RECEIVER_RECON
+  ON_RECEIVER_RECON -> Nothing

Add regression coverage for both mapToCbAction and getSubscriberType.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
RECEIVER_RECON -> Just ON_RECEIVER_RECON
ON_RECEIVER_RECON -> Just ON_RECEIVER_RECON
RECEIVER_RECON -> Just ON_RECEIVER_RECON
ON_RECEIVER_RECON -> Nothing
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/mobility-core/src/Kernel/Types/Beckn/Context.hs` around lines 125 - 126,
Update mapToCbAction so ON_RECEIVER_RECON maps to Nothing while preserving its
request mapping to RECEIVER_RECON. Add regression tests covering this callback
mapping and getSubscriberType, verifying the callback is classified as BPP
rather than BAP.

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