Skip to content

chore(deleter): extend deleter billing mocks for the pre-flight check - #1865

Open
whoAbhishekSah wants to merge 1 commit into
mainfrom
org-delete-preflight-mocks
Open

chore(deleter): extend deleter billing mocks for the pre-flight check#1865
whoAbhishekSah wants to merge 1 commit into
mainfrom
org-delete-preflight-mocks

Conversation

@whoAbhishekSah

@whoAbhishekSah whoAbhishekSah commented Aug 10, 2026

Copy link
Copy Markdown
Member

Part of #1837. Base of the stack; the pre-flight change sits on top.

Extends the deleter's billing mocks for the pre-flight check:

  • credit service mock gets GetBalance
  • subscription service mock gets List and Cancel
  • invoice service mock gets SyncWithProvider
  • new plan service mock (GetByID, used to resolve the standard plan)

The matching interface methods land with the pre-flight change in the next PR; the mocks compile standalone.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview Aug 13, 2026 11:16am

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@whoAbhishekSah, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c48bc83-55ea-42d0-aef3-4d14311a626e

📥 Commits

Reviewing files that changed from the base of the PR and between 2f3076f and 3f71c2d.

📒 Files selected for processing (1)
  • core/deleter/mocks/plan_service.go

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d10a8c8d-9ca3-4340-b061-318d93e413bf

📥 Commits

Reviewing files that changed from the base of the PR and between 229ea89 and 2f3076f.

📒 Files selected for processing (3)
  • core/deleter/mocks/credit_service.go
  • core/deleter/mocks/invoice_service.go
  • core/deleter/mocks/subscription_service.go

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Expanded service test coverage with mock support for credit balance retrieval, invoice synchronization, and subscription cancellation and listing.
    • Added flexible expectation, return-value, and callback handling for these service interactions.

Walkthrough

Changes

Deleter mock extensions

Layer / File(s) Summary
Credit balance mock support
core/deleter/mocks/credit_service.go
Adds GetBalance invocation handling and typed Run, Return, RunAndReturn, and expectation helpers.
Invoice synchronization mock support
core/deleter/mocks/invoice_service.go
Adds SyncWithProvider invocation handling and typed return, callback, and expectation helpers.
Subscription method mock support
core/deleter/mocks/subscription_service.go
Adds generated mock support for Cancel and List, including typed returns, callbacks, expectations, and the required package import.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 2f307

This change only extends generated billing and subscription mocks for upcoming interface updates and introduces no actionable merge-blocking risk beyond normal checks and review.

Possibly related PRs

Suggested reviewers: rohilsurana

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@coveralls

coveralls commented Aug 10, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 31694737529

Coverage remained the same at 48.266%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 39761
Covered Lines: 19191
Line Coverage: 48.27%
Coverage Strength: 15.43 hits per line

💛 - Coveralls

@whoAbhishekSah
whoAbhishekSah force-pushed the org-delete-preflight-mocks branch from 16f57af to 0ba1676 Compare August 10, 2026 06:27
@whoAbhishekSah
whoAbhishekSah changed the base branch from org-delete-ack-proto to main August 13, 2026 10:57
@whoAbhishekSah
whoAbhishekSah force-pushed the org-delete-preflight-mocks branch from 0ba1676 to 2f3076f Compare August 13, 2026 10:57
@whoAbhishekSah whoAbhishekSah changed the title chore(deleter): add GetBalance and subscription List to deleter mocks chore(deleter): extend deleter billing mocks for the pre-flight check Aug 13, 2026
Adds GetBalance to the credit service mock, List and Cancel to the
subscription service mock, SyncWithProvider to the invoice service
mock, and a new plan service mock. The interface methods land with the
pre-flight change on top of this branch; the mocks compile standalone.
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