Skip to content

Add Paddle to QEntitlementSource - #478

Merged
SpertsyanKM merged 2 commits into
mainfrom
kamo/dev-1876-sdks-map-entitlement-source-paddle-to-unknown-add-paddle-to
Sep 23, 2026
Merged

SpertsyanKM merged 2 commits into
mainfrom
kamo/dev-1876-sdks-map-entitlement-source-paddle-to-unknown-add-paddle-to

Conversation

@SpertsyanKM

@SpertsyanKM SpertsyanKM commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

api-gateway returns source = "paddle" for entitlements activated via Paddle. The wrapper had no such value in EntitlementSource, so it mapped it to UNKNOWN. This PR adds PADDLE and its mapping from the sandwich bridge value "Paddle".

Merge order

Includes the QonversionSandwich bump to 7.14.0 (qonversion/sandwich-sdk#364, built on iOS 6.18.0 / Android 9.8.0), so the bridge now delivers "Paddle". Consumer CI jobs may need a rerun while the CocoaPods CDN / Maven Central indexes catch up.

Linear: DEV-1876

🤖 Generated with Claude Code

https://claude.ai/code/session_01YaUMJ69EtSs3HuFCs2zHL7

Summary by CodeRabbit

  • New Features
    • Added support for Paddle as an entitlement source.

api-gateway returns source = "paddle" for entitlements activated via Paddle
purchases; the SDK enum had no such value, so it degraded to Unknown.

Linear: DEV-1876

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaUMJ69EtSs3HuFCs2zHL7
@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: qonversion/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c1e406b6-088d-4a53-a00d-63039e17e769

📥 Commits

Reviewing files that changed from the base of the PR and between a22dd5e and a3a3ae0.

📒 Files selected for processing (2)
  • lib/src/dto/entitlement.g.dart
  • lib/src/dto/entitlement_source.dart
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • qonversion/go-micro (manual)

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The entitlement source enum adds paddle, mapped to the JSON value "Paddle". The generated JSON mapping includes the same value.

Changes

Paddle entitlement source

Layer / File(s) Summary
Add the Paddle source value
lib/src/dto/entitlement_source.dart, lib/src/dto/entitlement.g.dart
QEntitlementSource adds paddle with the JSON value "Paddle". The generated mapping serializes it as 'Paddle'.

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

Merge Risk: ⚪ Minimal · up to a3a3a

The wrapper mapping is consistent. As described, Paddle recognition still depends on the sandwich SDK release; no actionable merge risk is evident in these changes.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore (reviewers only)

❌ Failed checks (2 errors)

Check name Status Explanation Resolution
Behavior And Regression Safety ❌ Error The Paddle mapping is correct in the changed code, but the claimed regression is untested. The execution path is native JSON source: "Paddle" → QEntitlement.fromJson → $enumDecode in `lib/src/dt… Add one focused deserialization test. Pass a representative entitlement JSON object with source: "Paddle" to QEntitlement.fromJson and assert that source == QEntitlementSource.paddle.
Rollout And Recovery Evidence ❌ Error The change affects production package behavior: QEntitlement.fromJson will map "Paddle" to QEntitlementSource.paddle instead of unknown. The PR description defines an activation order for the … Add a verification step and test that decode source: "Paddle" as QEntitlementSource.paddle and preserve unknown-value fallback. Document the exact Sandwich version and release order. Define stop signals, such as failed native-support ch…
✅ Passed checks (6 passed)
Check name Status Explanation
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.
Security And Tenant Isolation ✅ Passed The pull request changes only the public entitlement-source enum and its generated JSON mapping. It adds the validated literal "Paddle" and decodes it to QEntitlementSource.paddle. The diff contai…
Contract And Data Compatibility ✅ Passed The change is an additive, documented enum value. QEntitlementSource.paddle maps to the bridge value "Paddle", while QEntitlement.fromJson still maps unknown source values to `QEntitlementSource…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the affected area, QEntitlementSource, and the addition of Paddle support. It does not state the behavioral outcome that Paddle entitlements map to QEntitlementSource.paddle i…
Full details: Behavior And Regression Safety

Explanation

The Paddle mapping is correct in the changed code, but the claimed regression is untested. The execution path is native JSON source: "Paddle" → QEntitlement.fromJson → $enumDecode in lib/src/dto/entitlement.g.dart → QEntitlementSource.paddle. The pull request changes no test file. The only test contains an empty placeholder and has no QEntitlement or QEntitlementSource assertion.

Full details: Rollout And Recovery Evidence

Explanation

The change affects production package behavior: QEntitlement.fromJson will map "Paddle" to QEntitlementSource.paddle instead of unknown. The PR description defines an activation order for the later Sandwich update, but it provides no concrete Paddle verification, stop signal, or rollback/forward-recovery procedure. The repository publishes this package, and it also has an automatic release-publication path for qualifying merged release PRs. The changed files contain no test for the new mapping.

Resolution

Add a verification step and test that decode source: "Paddle" as QEntitlementSource.paddle and preserve unknown-value fallback. Document the exact Sandwich version and release order. Define stop signals, such as failed native-support checks or an unexpected unknown rate. Define recovery, such as stopping publication and reverting the package release, or forwarding with the corrected Sandwich and wrapper releases.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

Pre-merge checks failed. Please resolve the failing checks before merging.

Brings EntitlementSource.Paddle from the native SDKs (iOS 6.18.0 / Android 9.8.0) through the bridge.

Linear: DEV-1876

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaUMJ69EtSs3HuFCs2zHL7
@SpertsyanKM
SpertsyanKM merged commit 641abf0 into main Sep 23, 2026
10 of 11 checks passed
@SpertsyanKM
SpertsyanKM deleted the kamo/dev-1876-sdks-map-entitlement-source-paddle-to-unknown-add-paddle-to branch September 23, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant