Skip to content

CONV-221: Implement image to image cost#190

Merged
menvil merged 1 commit into
developfrom
feature/CONV-221-implement-image-to-image-cost
Jun 2, 2026
Merged

CONV-221: Implement image to image cost#190
menvil merged 1 commit into
developfrom
feature/CONV-221-implement-image-to-image-cost

Conversation

@menvil

@menvil menvil commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements ConfigDrivenConversionCostEstimator::estimate() for image-to-image conversions (1 credit)
  • Also prepares image-to-pdf path (2 credits) for CONV-223
  • Adds UnsupportedConversionCostException for unknown conversion pairs

Test plan

  • ConversionCostEstimatorTest passes (2 tests: PNG→JPG, JPG→WEBP = 1 credit)

🤖 Generated with Claude Code


Summary by cubic

Implements cost estimation for image-to-image conversions in ConfigDrivenConversionCostEstimator (1 credit). Also sets up image→PDF rule (2 credits) and adds a clear exception for unsupported pairs, satisfying CONV-221.

  • New Features
    • Image→image conversions now return a CreditCost with a 1-credit base; image→PDF path is wired via conversion_costs.rules.
    • Throws UnsupportedConversionCostException when a source/target pair isn't supported.
    • Uses conversion_costs.groups.image and .pdf to classify formats and includes a concise cost breakdown (rule, formats, converter key, file size).

Written for commit 9ea385e. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit eba9622 into develop Jun 2, 2026
1 check was pending
@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: 727b0f13-d3f7-45cc-9436-7cb6060f8665

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-221-implement-image-to-image-cost

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-221-implement-image-to-image-cost branch June 2, 2026 12:26
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