Skip to content

fix: Stop the hourly usage sync failing on refused pushes it cannot fix - #96

Closed
magweter wants to merge 5 commits into
devfrom
fix/lemonsqueezy-refused-pushes
Closed

magweter wants to merge 5 commits into
devfrom
fix/lemonsqueezy-refused-pushes

Conversation

@magweter

Copy link
Copy Markdown
Owner

The reconciliation command exited 1 every hour, and the scheduler reported that to Sentry, because Lemon Squeezy refused the quantity update for three subscriptions. None of them were real errors:

  • One had expired at Lemon Squeezy months ago, but the expiry webhook never arrived, so the local row still looked live.
  • Two pay through PayPal. Lemon Squeezy cannot change PayPal subscriptions through the API and answers a quantity update with a bare 500.

When a push is refused, the command now fetches the subscription from Lemon Squeezy and syncs the local row. A subscription that is no longer valid is skipped. A PayPal subscription is skipped with a warning that shows the billed and the used quantity, logged when they differ. Anything else is still an error and still fails the run.

magweter and others added 5 commits October 19, 2026 21:02
The reconciliation command exited 1 every hour, and the scheduler reported
that to Sentry, because Lemon Squeezy refused the quantity update for three
subscriptions. None of them were real errors:

- One had expired at Lemon Squeezy months ago, but the expiry webhook never
  arrived, so the local row still looked live.
- Two pay through PayPal. Lemon Squeezy cannot change PayPal subscriptions
  through the API and answers a quantity update with a bare 500.

When a push is refused, the command now fetches the subscription from Lemon
Squeezy and syncs the local row. A subscription that is no longer valid is
skipped. A PayPal subscription is skipped with a warning that shows the
billed and the used quantity, logged when they differ. Anything else is
still an error and still fails the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3d66f6ea-4511-4276-a334-b41e6629ca19

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@magweter
magweter changed the base branch from main to dev November 11, 2026 20:32
@magweter magweter closed this Nov 11, 2026
@magweter
magweter deleted the fix/lemonsqueezy-refused-pushes branch November 11, 2026 20:41
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.

2 participants