[CORRUPTED] Synthetic Benchmark PR #26823 - fix: address proration implementation flaws#552
Open
ofir-frd wants to merge 2 commits intobase_pr_26823_20260120_2889from
Open
[CORRUPTED] Synthetic Benchmark PR #26823 - fix: address proration implementation flaws#552ofir-frd wants to merge 2 commits intobase_pr_26823_20260120_2889from
ofir-frd wants to merge 2 commits intobase_pr_26823_20260120_2889from
Conversation
- Add operationId field to SeatChangeLog for idempotency (prevents duplicate seat change logs from race conditions) - Add voidInvoice method to billing service (prevents double charging on retry) - Add days_until_due for send_invoice collection method (ensures invoices have proper due dates) - Fix type error in stripe-subscription-utils (null to undefined conversion) Co-Authored-By: sean@cal.com <Sean@brydon.io>
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
|
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Benchmark PR calcom#26823
Type: Corrupted (contains bugs)
Original PR Title: fix: address proration implementation flaws
Original PR Description: ## What does this PR do?
This PR addresses several flaws identified during code review of the custom proration implementation on the
feat/prorationbranch:operationIdfield toSeatChangeLogmodel with a unique constraint to prevent duplicate seat change logs from race conditions when users flow through multiple code pathsvoidInvoicemethod that voids/deletes old invoices before creating new ones when retrying failed prorationsdaysUntilDueparameter (defaults to 30 days) for invoices usingsend_invoicecollection methodstripe-subscription-utils.ts(null to undefined conversion)Link to Devin run: https://app.devin.ai/sessions/e1373fed6b8442b18a8344f6ae9c8353
Requested by: @sean-brydon
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
logSeatAdditionorlogSeatRemovalmultiple times with the sameoperationId- should only create one recordsend_invoicecollection method and verify it has a 30-day due dateNote: The idempotency infrastructure is in place, but callers of
logSeatAddition/logSeatRemovalwill need to be updated to passoperationIdvalues for the protection to be active.Checklist for Human Review
operationIdfield and unique constraintoperationIdvaluesvoidInvoicelogic handles all invoice status edge cases appropriatelyOriginal PR URL: fix: address proration implementation flaws calcom/cal.com#26823
Compliance Violation