FA-59778 / Subscription proration billing / Member archive
Ratable monthly schedule of a prepaid term: cumulative remainder allocation · case 03
Monthly schedule parts do not add up to the invoiced amount.
Case contract
Input {amount, start, end (exclusive)}. The amount is spread by days across calendar months. The cumulative amount through each month is floor(amount*cumulative_days/total_days), and each month gets the increase, so the parts sum exactly to amount. Return [["YYYY-MM", cents]] for each month touched.
Why this case matters
Prepaid subscriptions are recognized day-by-day, and per-month rounding must not leak or create cents.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [["2023-06", 8], ["2023-07", 27], ["2023-08", 27], ["2023-09", 26], ["2023-10", 8]] | [["2023-06", 8], ["2023-07", 28], ["2023-08", 28], ["2023-09", 26], ["2023-10", 9]] | 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 ↗