Spec a Python to Go port of billing totals
Your task
Your billing rollup service is Python, and it is too slow at month end. The team wants it in Go, and an agent will write the port. The module sums thousands of line items per customer with Python's Decimal, applies discounts and tax, and rounds to cents. Finance needs the Go totals to match the Python totals to the cent.
Write the spec you would hand the agent.
What you know:
- the Python module is
billing/rollup.py, about 600 lines, with few tests - Go is new to the team, so the agent will be the main author
github.com/shopspring/decimalis the decimal library the Go team allows- you can export last month's inputs and outputs for 40,000 customers
Then, in a few sentences: where do ports of money code usually drift?