Skip to content

[codex] Fix quota notification threshold selection#381

Draft
AdrianLeeElder wants to merge 1 commit into
developfrom
codex/quota-notification-threshold
Draft

[codex] Fix quota notification threshold selection#381
AdrianLeeElder wants to merge 1 commit into
developfrom
codex/quota-notification-threshold

Conversation

@AdrianLeeElder
Copy link
Copy Markdown
Contributor

Summary

  • Send only the highest applicable base quota notification per billing pass
  • Keep PAYG warning behavior unchanged
  • Update billing background service tests for 80%, 90%, and exceeded threshold selection

Root cause

At 100% usage the billing job attempted the 80%, 90%, and 100% base notifications in the same pass, which could surface a misleading 90% subject even when usage was already at the quota.

Validation

  • GRADLE_OPTS='-Xmx2g -XX:MaxMetaspaceSize=768m' ./gradlew --no-daemon :test --tests com.moneat.services.BillingBackgroundServiceTest -Dkotlin.compiler.execution.strategy=in-process
  • git diff --check

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Important

Review skipped

Draft detected.

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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1a8a7c0a-a1a3-487c-ae1e-591233d64a6d

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 codex/quota-notification-threshold

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.

@github-actions
Copy link
Copy Markdown
Contributor

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