FA-59668 / Subscription proration billing / Member archive
Flat fee proration with metered usage: cancel beyond period · case 03
Cancellations scheduled after period end over-charge the flat fee beyond one period.
Case contract
Input {flat, period_days, from, cancel|None, unit, events: [[day, qty]]}. Active window is [from, end) with end = min(cancel, period_days) or period_days. The flat fee is prorated by active days half-up; usage is not prorated: every event inside the window is billed qty*unit. Return [flat_charge, usage_charge].
Why this case matters
Only the recurring fee is prorated; metered usage is billed exactly for the active window.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [5403, 208] | [4803, 208] | 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 ↗