FAILURE MAP
← Case archive

FA-59698 / Subscription proration billing / Member archive

Volume discount tiers on quantity changes: discounted unit rounding · case 03

Discounted prorations drift by cents proportional to the quantity.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input {unit, old, new quantities, tiers: ascending [[min_qty, pct_off]], left, period}. A quantity's discount is the pct of the last tier with qty >= min_qty and applies to all units: total(q) = q*unit*(100-pct) in cent-percent. Proration of q = total(q)*left/(100*period) half-up. Return [-proration(old), proration(new)].

Why this case matters

Crossing a volume tier on a mid-cycle quantity change re-prices every unit for the rest of the period.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression 0[-38652, 28421][-38646, 28424]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 ↗