Repository navigation
fix(billing): withhold the free allowance from Gmail aliases of an existing account - #9418
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
No issues found across 8 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
This PR changes payment, billing, or quota logic. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.
Turn on auto-fix | Re-trigger cubic
[Medium impact] The PR appears safe to merge with the stated allowance trade-off. SummaryThis PR limits the free allowance to the first account on a Gmail inbox.
Reviews (4) · Last reviewed commit: "fix(billing): count any earlier account ..." · Reviewed by Greptile |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
+tagvariant of an address (and itsgooglemail.comtwin) to one inbox, so a single person could registera.b@gmail.com,ab+1@gmail.com, … and get a fresh free allowance on eachhandleNewUserand thecreateUserStatsIfMissingfallback, via oneidentityHadFreeAllowancecheckgmailMailbox()SQL expression in the schema (built onfoldedEmail) plus partial indexuser_gmail_mailbox_idx, so the lookup is an index probe instead of a scan ofuser; migration builds itCONCURRENTLYType of Change
Testing
lib/users/gmail-alias.integration.tsagainst real Postgres withINTEGRATION_DB_PROVISION=migrate(exercises migration 0439): 5/5 pass. Disabling the check turns the 3 withholding tests red; one test asserts the plan usesuser_gmail_mailbox_idxlib/billing/core/usage.test.ts: 25/25 passcheck:migrations,check:file-names,check:test-patterns,check:comment-hygiene, biome on touched files;drizzle-kit generatereports no driftChecklist
test-auditauthoring gate)