Support headless offering checkpoints (#3951)
<!-- Thank you for contributing to Purchases! Before pressing the "Create Pull Request" button, please provide the following: --> Some checkpoint workflows only select an offering and leave presentation to the app. This inspects the matched workflow and returns `CheckpointResult.ReceivedOffering` when the workflow consists of a single valid offering step. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes checkpoint resolution and purchase/paywall entry paths (new branch, renamed resolution types) with broad test coverage; behavior for invalid configs is preserved but resolution order and dependency loading differ. > > **Overview** > Checkpoints can now resolve to **app-owned offerings** instead of always launching RevenueCat UI. When the winning workflow is a single `offering` step with a valid `offering_identifier`, resolution returns **`CheckpointResolution.MatchedOffering`** and the UI layer surfaces **`CheckpointResult.ReceivedOffering`**—no Activity or one-at-a-time presentation slot. > > **UI workflows** are unchanged in behavior but renamed to **`MatchedWorkflow`** (from `Workflow`). Resolution loads the workflow body first via **`WorkflowManager.getWorkflowBody`**, branches on step type, and only fetches workflow→offering mapping, offerings, and asset prewarm for full UI paths. Invalid shapes (mixed steps, bad identifiers, etc.) still fail the matched rule with **`CONFIGURATION_UNAVAILABLE`** without falling through to later rules. > > The checkpoint tester, API tester, and tests are updated for the new result type and offering use case. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6cc7ec7f9e6e5fa364115d876294f10dbe201459. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
C
Cesar de la Vega committed
243a16247ce8bcb0f76ddd338c042b47db1eea10
Parent: 19568ae
Committed by GitHub <noreply@github.com>
on 8/14/2026, 12:48:59 PM