Skip to content

Conversation

@JayShortway
Copy link
Member

@JayShortway JayShortway commented Jan 9, 2026

Description

In case a backend bug would respond incomplete product data upon POST /receipt, we would default to consume. This PR switches that to default to not consume, which is less destructive. (To be clear, such a backend bug has never happened, but better safe than sorry.)

Resolves #3001

@JayShortway JayShortway self-assigned this Jan 9, 2026
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.84%. Comparing base (d85feec) to head (1057d98).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3003   +/-   ##
=======================================
  Coverage   78.84%   78.84%           
=======================================
  Files         338      338           
  Lines       13209    13209           
  Branches     1791     1791           
=======================================
  Hits        10415    10415           
  Misses       2047     2047           
  Partials      747      747           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JayShortway JayShortway marked this pull request as ready for review January 9, 2026 10:37
@JayShortway JayShortway requested a review from a team as a code owner January 9, 2026 10:37
?.firstOrNull()
?.shouldConsume
?: true
?: false
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing that I think could be important... In this scenario, where it gets to this default, we shouldn't add the token to the cache of successfully posted tokens so we retry to post it on next app foreground. This way, if it was meant to be a consumable, we wouldn't have the issue of it not being able to be repurchased much longer. Wdyt?

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

I think my comment is not a blocker. This is already better, so approving as it is. We can handle my comment separately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Risk of non-consumables being consumed unintentionally

3 participants