FAILURE MAP
← Case archive

FA-59757 / Subscription proration billing / Member archive

Expiring credit grants applied to invoices: expiry boundary · case 02

Credits are consumed on their expiry day.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Input {grants: [[amount, expires_day, granted_day]], day, amount}. A grant is usable when granted_day <= day < expires_day. Usable grants are consumed soonest-expiring first (ties by earlier grant day, then input order). Return [applied, remaining_due, [[left, expires] for partially used or untouched usable grants]].

Why this case matters

Promotional credits must be burned in expiry order and never after they expire.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression 0[8329, 0, [[1974, 76]]][6188, 2141, []]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 ↗