FA-60672 / Loyalty points ledgers / Member archive
Cancelled reward reinstatement: grace anchor · case 02
Reinstated points that had lapsed expire immediately or within days of reinstatement.
Case contract
Input {redemption:{day, sources:[[lot_expiry, pts]]}, cancel_day, grace, max_age}. Cancelling more than max_age days after the redemption returns {"error":"too late"}. Each source lot is reinstated with its original expiry if that expiry is on or after the cancel day, otherwise with expiry cancel_day + grace. Lots with the same resulting expiry are merged. Return {lots:[[expiry,pts]] by expiry, total}.
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 |
|---|---|---|---|
| mixed sources | {"lots": [[122, 300], [150, 200], [400, 100]], "total": 600} | {"lots": [[140, 300], [150, 200], [400, 100]], "total": 600} | 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 ↗