Skip to content

CONV-230: Enforce credits in CreateConversionJobAction#199

Merged
menvil merged 1 commit into
developfrom
feature/CONV-230-enforce-credits-in-create-conversion-job-action
Jun 2, 2026
Merged

CONV-230: Enforce credits in CreateConversionJobAction#199
menvil merged 1 commit into
developfrom
feature/CONV-230-enforce-credits-in-create-conversion-job-action

Conversation

@menvil

@menvil menvil commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • CreateConversionJobAction now estimates cost and checks balance before creating job
  • Throws InsufficientCreditsException when balance < estimated cost
  • Creates ConversionCreditCharge with estimated status after job creation

Test plan

  • CreateConversionJobActionCreditTest passes (3 tests)
  • CreateConversionJobActionTest still passes (4 tests, no regression)

🤖 Generated with Claude Code


Summary by cubic

Enforces credits during conversion job creation by estimating cost and checking the user's balance. If funds are sufficient we create the job and an estimated charge; otherwise we throw InsufficientCreditsException (CONV-230).

  • New Features
    • Injects EstimateConversionCostAction and CreditLedger into CreateConversionJobAction.
    • Creates ConversionCreditCharge with status=Estimated, estimated_amount, and breakdown_json after job creation.
    • Keeps dispatch of ProcessConversionJob unchanged.

Written for commit cf6bfaa. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit 4e2d5f3 into develop Jun 2, 2026
1 of 2 checks passed
@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: 5863071b-cfc0-4408-b594-02abe692fafc

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-230-enforce-credits-in-create-conversion-job-action

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 deleted the feature/CONV-230-enforce-credits-in-create-conversion-job-action branch June 2, 2026 12:33
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