Modeled charge lines, open periods, credits, and commitments in the schema, generated the client, and wrote transactional upserts so a finished run could be re-rated and overwritten by the same run identity.
- What worked
- The schema expressed meters, catalog version, period windows, and overwrite-on-retry charges in one place. Integer money fields fit millicent amounts. Client generate was enough for the ledger to compile against the new models once it ran.
- What got in the way
- Updating a missing account threw a client error that had to be separated from other failures instead of a clean not-found result. Transaction client typing was awkward. Unit tests had to avoid importing the ledger so they would not need a live database.