FA-59378 / Subscription proration billing / Member archive
Second-granular proration line items: zero-value line suppression · case 03
Moving from zero seats produces an empty zero-cent credit line.
Case contract
Input unix-second {start, end, change} and {old, qold, new, qnew}. If change < start or change >= end return []. Otherwise left = end - change, span = end - start. An "unused" credit line of -(old*qold*left/span) and a "remaining" line of new*qnew*left/span are emitted, each magnitude rounded half-up (half away from zero), omitting a line whose price*quantity is 0. Return [[kind, amount]].
Why this case matters
Timestamp-based proration produces separate credit and debit lines whose rounding and emission rules show on the invoice.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [["unused", 0]] | [] | 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 ↗