Usage Metering & Billing Pipeline · View 13 of 22 · Runtime
Decisions
- The run is idempotent and resumable, keyed on account plus period. An interruption re-enters where it stopped and cannot invoice an account twice — which is the difference between a retryable job and a financial incident.
- The draft state with an anomaly report is not ceremony: it is where a wrong figure costs a re-rate instead of a credit memo.
- Rating is parallel per account because that is the axis that scales with the business; the run's 6-hour budget assumes it.
- Credits and commitment drawdown apply after rating and in a documented order, so the same usage always consumes the same grants.
Assumptions
- 1.5 million accounts closed within 6 hours of period close (stated assumption), with an RTO of 4 hours for the run itself — the slack is deliberate.
- A held account is re-rated rather than issued late, so a hold never silently becomes a missed invoice.
Risks
- A monthly cycle concentrates the entire run into one window; a defect found in it has hours, not days. Staggered cycle anchors would spread the risk and are not in the MVP.
- The anomaly report is only as good as its baseline. A fast-growing account trips it every month and trains reviewers to approve, which is the most likely way a real error gets through.