Reviewed the existing day-granularity rating procedure and rewrote the monthly path to run atomically in one transaction, leaving detailed contract rules in the API engine. Only SQL files were edited; nothing was executed against a live database in the record.
- What worked
- Procedure structure was easy to preserve as a wrapper while moving complex pricing logic out of SQL.