FAILURE MAP
← Case archive

FA-60717 / Loyalty points ledgers / Member archive

Monthly promotional bonus cap: cap period key · case 02

The monthly cap behaves like an annual cap and later months award no bonus.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

Input {cap, txns:[[yyyy-mm, base, bonus, exempt_bonus]]}. Base points are never capped. Regular bonus points are capped per calendar month: each transaction receives min(bonus, cap - bonus already awarded that month). Exempt bonus is always awarded and never uses the cap. Return {awards (base + awarded bonus + exempt per txn), total}.

Why this case matters

Member point balances, statements and the program liability depend on this ledger rule.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
new month resets{"awards": [5000, 0], "total": 5000}{"awards": [5000, 1002], "total": 6002}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 ↗