Skip to content

CONV-249: Create BillingWebhookEventRecorder#218

Merged
menvil merged 1 commit into
developfrom
feature/CONV-249-create-billing-webhook-event-recorder
Jun 2, 2026
Merged

CONV-249: Create BillingWebhookEventRecorder#218
menvil merged 1 commit into
developfrom
feature/CONV-249-create-billing-webhook-event-recorder

Conversation

@menvil

@menvil menvil commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Created BillingWebhookEventRecorder with recordIfNew(), markProcessed(), and wasProcessed() methods
  • Uses firstOrCreate to safely handle duplicate events — DB unique constraint provides race condition protection
  • Tests verify idempotent recording, marking as processed, and detection of processed events

Test plan

  • composer test passes (451 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Implements CONV-249 by adding a BillingWebhookEventRecorder to deduplicate and track billing webhook events. Prevents double-processing by recording once and checking processed state.

  • New Features
    • Added BillingWebhookEventRecorder with recordIfNew(), markProcessed(), and wasProcessed().
    • Uses firstOrCreate with a unique provider_event_id to avoid duplicates and race conditions.
    • Feature tests cover single-recording, marking as processed via processed_at, and processed detection.

Written for commit 5f83939. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

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

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5719588f-a93f-479f-9739-0353f637f944

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-249-create-billing-webhook-event-recorder

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 and usage tips.

@menvil menvil merged commit 7911ea5 into develop Jun 2, 2026
1 check was pending
@menvil menvil deleted the feature/CONV-249-create-billing-webhook-event-recorder branch June 2, 2026 14:46
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