FAILURE MAP
← Case archive

FA-59352 / Subscription proration billing / Member archive

Daily plan-change proration: net rounding composition · case 02

The amount due differs by a cent from the printed charge minus the printed credit.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Input {old, new prices per period, start, end (exclusive), change} dates with start <= change < end. Remaining days = end - change; period days = end - start. Credit = old*remaining/period and charge = new*remaining/period, each rounded half-up. Net = charge - credit; a positive net is due now, a negative net becomes a credit balance. Return [credit, charge, amount_due, credit_balance].

Why this case matters

Mid-cycle plan changes must credit unused time on the old plan and charge the new plan for the same days.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression 0[20226, 4268, 0, 15959][20226, 4268, 0, 15958]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 ↗