FA-59780 / Subscription proration billing / Member archive
Ratable monthly schedule of a prepaid term: cumulative remainder allocation · case 05
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 | [["2024-07", 46], ["2024-08", 84], ["2024-09", 81], ["2024-10", 84], ["2024-11", 81], ["2024-12", 84], ["2025-01", 84], ["2025-02", 76], ["2025-03", 84], ["2025-04", 81], ["2025-05", 84], ["2025-06", 81], ["2025-07", 40]] | [["2024-07", 46], ["2024-08", 85], ["2024-09", 82], ["2024-10", 84], ["2024-11", 82], ["2024-12", 85], ["2025-01", 85], ["2025-02", 76], ["2025-03", 85], ["2025-04", 82], ["2025-05", 85], ["2025-06", 82], ["2025-07", 41]] | 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 ↗