FA-60453 / Loyalty points ledgers / Member archive
Rolling tier qualification with soft landing: highest tier met · case 03
A member who qualifies for gold is only granted silver.
Case contract
Input {events:[[month,qualifying pts]], eval_month, current_tier, thresholds}. Qualifying points are summed over months eval-11..eval inclusive. The earned tier is the highest tier whose threshold is met (>=). Upgrades take effect fully; downgrades drop at most one level per evaluation. Tiers: member < silver < gold < platinum. Return {qualifying, earned, tier}.
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 |
|---|---|---|---|
| upgrade | {"earned": "silver", "qualifying": 15503, "tier": "silver"} | {"earned": "gold", "qualifying": 15503, "tier": "gold"} | 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 ↗