FA-60705 / Loyalty points ledgers / Member archive
Birthday bonus window: neighbouring birthday years · case 05
Purchases in late December miss an early-January birthday window.
Case contract
Input {bmonth, bday, window, bonus, purchases:[[y,m,d]] chronological}. The birthday of year Y is (Y,bmonth,bday), with Feb 29 falling back to Feb 28 in non-leap years (Gregorian rule). A purchase within window days (inclusive, either side) of the birthday of year Y-1, Y or Y+1 earns the bonus once per birthday year. Return per-purchase bonus list.
Why this case matters
Member point balances, statements and the program liability depend on this ledger rule.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| year crossing | [0, 300] | [300, 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 ↗