Repository navigation
refactor(charges): remove legacy intent override wiring - #4563
Conversation
📝 WalkthroughWalkthroughRemoves the ChangesIntentOverride removal from billing charges
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
5de2f2c to
156e06f
Compare
Greptile SummaryThis PR removes the legacy embedded-column intent override runtime wiring from flat-fee and usage-based charges as an intermediate step before a follow-up PR introduces type-owned override rows.
Confidence Score: 5/5Safe to merge; the changes are a clean, intentional removal of an API surface with no new logic introduced. All changes are deletions of the old inline-column override path. The adapter no longer writes or reads the override_* columns, the domain structs no longer carry the IntentOverride field, and the ent schema marks those columns as deprecated while keeping them physically present. Any existing override data in the DB columns is left frozen (neither read nor overwritten), which is the stated intent before the follow-up PR introduces type-owned override rows. The generated ent/db files correctly move the deprecated field names out of the default Columns list while keeping them in ValidColumn. The deleted test suites covered exactly the behavior being removed. No new logic paths are introduced. No files require special attention. The ent/db generated files are consistent with the schema changes, and the adapter/mapper removals are symmetric between flat-fee and usage-based charge types. Important Files Changed
|
What
Removes the legacy embedded charge intent override runtime wiring from flat-fee and usage-based charges.
This deletes the old domain
IntentOverridefields, adapter update/hydration paths, reusable embedded-column override helpers, and tests that asserted the old inline-column behavior.It also marks the remaining legacy inline override columns as deprecated in Ent while keeping the physical columns in place for compatibility.
Why
The follow-up implementation moves charge intent overrides to type-owned override rows. This PR keeps the compatibility columns physically present, but removes the old runtime API surface first so the replacement PR can focus on the new storage and adapter semantics.
Validation
direnv exec . env POSTGRES_HOST=127.0.0.1 go test -count=1 -tags=dynamic ./openmeter/billing/charges/flatfee/... ./openmeter/billing/charges/usagebased/... ./openmeter/billing/charges/models/intentoverride/...direnv exec . env GO_LINT_PATH='./openmeter/billing/charges/flatfee/... ./openmeter/billing/charges/usagebased/... ./openmeter/billing/charges/models/intentoverride/...' make lint-go-fast