FA-59745 / Subscription proration billing / Member archive
Metered usage split at a mid-period price change: chronological order for last · case 05
Last-value meters report whichever event arrived last rather than the latest reading.
Case contract
Input {events: [[day, qty]], change day, old_unit, new_unit, agg sum|max|last}. Events are ordered by day (stable). Events before the change day are aggregated and priced at old_unit; events on or after it at new_unit. Empty segments aggregate to 0; last means the chronologically last quantity. Return [old_charge, new_charge].
Why this case matters
Metered usage must be attributed to the price in effect when it occurred, with the aggregation mode applied per segment.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [20, 1260] | [20, 1200] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗