FAILURE MAP
← Case archive

FA-59490 / Subscription proration billing / Member archive

Cancellation refund for unused days: refund rounding direction · case 05

Refunds sometimes exceed the exact unused value by a cent.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input {price, setup, period_days, used_days, min_days, mode immediate|period_end}. Unused = max(0, period_days - used_days). period_end: no refund, access continues for the unused days. immediate: charged days = max(used_days, min_days); refund = price*max(0, period_days - charged)/period_days floored (never over-refund); the setup fee is never refunded; access ends. Return [refund, access_days].

Why this case matters

Refund math must respect minimum-charge terms and exclude non-refundable fees.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression 0[3853, 0][3852, 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 ↗