Skip to content

fix: annotations usage#4150

Merged
turip merged 1 commit into
mainfrom
chore/fix-annotations
Apr 16, 2026
Merged

fix: annotations usage#4150
turip merged 1 commit into
mainfrom
chore/fix-annotations

Conversation

@turip
Copy link
Copy Markdown
Member

@turip turip commented Apr 16, 2026

Overview

Use standard set of annotations for the accrued transaction.

Notes for reviewer

Summary by CodeRabbit

  • Refactor
    • Internal code organization improvements for the charge annotation handling with no impact to user-facing functionality.

@turip turip requested a review from a team as a code owner April 16, 2026 11:18
@turip turip added the release-note/misc Miscellaneous changes label Apr 16, 2026
@turip turip requested a review from GAlexIHU April 16, 2026 11:18
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9f176f36-5153-448b-bafe-dee37145b7f1

📥 Commits

Reviewing files that changed from the base of the PR and between 4f61789 and 1aa974f.

📒 Files selected for processing (1)
  • openmeter/ledger/chargeadapter/usagebased.go

📝 Walkthrough

Walkthrough

A small refactoring in the usage-based charge adapter that removes an unused import and replaces a manual annotation construction with a direct helper function call in the OnInvoiceUsageAccrued method. No functional behavior changes.

Changes

Cohort / File(s) Summary
Import & Annotation Cleanup
openmeter/ledger/chargeadapter/usagebased.go
Removed github.com/openmeterio/openmeter/pkg/models import and replaced manual annotations creation via ledger.ChargeAnnotations() with a direct call to chargeAnnotationsForUsageBasedCharge(input.Charge) when committing transactions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: annotations usage' directly relates to the changeset, which removes the annotations import and updates how charge annotations are passed to transactions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/fix-annotations

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.

@turip turip enabled auto-merge (squash) April 16, 2026 11:19
@turip turip merged commit dfad7ca into main Apr 16, 2026
28 checks passed
@turip turip deleted the chore/fix-annotations branch April 16, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/misc Miscellaneous changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants