Repository navigation
refactor: clean up charge patch mutation APIs - #4577
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
💤 Files with no reviewable changes (4)
📝 WalkthroughWalkthroughThis PR changes flatfee and usagebased charge intent mutations to pointer-based callbacks on cloned mutable fields. It also removes ChangesBilling charge contract updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Greptile SummaryThis PR cleans up charge patch and mutation APIs. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "refactor: clean up charge patch mutation..." | Re-trigger Greptile |
781739b to
77b8470
Compare
991b8ef to
8f9732f
Compare
What changed
This stacked cleanup removes the leftover patch trigger parameter adapter now that charge state machines receive the patch payload directly.
It also simplifies flat-fee and usage-based intent mutation callbacks so callers mutate the provided non-nil cloned mutable-field pointer directly. The mutator still owns target validation, normalization, and final validation before writing the layer back.
Why
The previous shape kept extra API surface around the transition: patches exposed TriggerParams even though the patch itself is the trigger payload, and mutate callbacks returned values/errors even though production mutations are simple in-place field edits.
Validation
Summary by CodeRabbit