Skip to content

CONV-304: Add conversion cost estimate endpoint#264

Merged
menvil merged 1 commit into
developfrom
feature/CONV-304-add-conversion-cost-estimate-endpoint
Jun 3, 2026
Merged

CONV-304: Add conversion cost estimate endpoint#264
menvil merged 1 commit into
developfrom
feature/CONV-304-add-conversion-cost-estimate-endpoint

Conversation

@menvil

@menvil menvil commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds POST /api/v1/conversions/estimate returning cost amount, breakdown, and has_enough_credits
  • Uses EstimateConversionCostAction and CreditLedger — no job created, no credits spent
  • Ownership enforced; unsupported pairs return 422
  • Also adds ConversionController, ConversionResource, EstimateConversionRequest, CreateConversionRequest (used in CONV-305)

Test plan

  • Returns amount/breakdown/has_enough_credits
  • No conversion job created
  • has_enough_credits false when balance < cost
  • Other user's file → 403
  • Unsupported format → 422 unsupported_conversion
  • composer test passes (571 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Adds a cost estimate endpoint so users can see conversion pricing before creating a job. Fulfills Linear CONV-304 by returning amount, breakdown, and whether the user has enough credits, without spending credits.

  • New Features
    • POST /api/v1/conversions/estimate returns amount, breakdown, and has_enough_credits.
    • Validates options via ConverterRegistry, uses EstimateConversionCostAction and CreditLedger; no job is created.
    • Enforces ownership (403). Unsupported pairs return 422 unsupported_conversion.
    • Adds ConversionController, ConversionResource, EstimateConversionRequest, and CreateConversionRequest (for CONV-305).

Written for commit 4d7334d. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 3, 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: 4a8ca2a5-5467-488c-99aa-c68f5d733e44

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-304-add-conversion-cost-estimate-endpoint

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 merged commit d16e94e into develop Jun 3, 2026
1 of 2 checks passed
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