FAILURE MAP
← Case archive

FA-60754 / Loyalty points ledgers / Member archive

Tier multiplier in force at transaction time: history ordering · case 04

An out-of-order tier history makes later transactions use an older tier.

Member previewVariant 4 · 3 implementations · 7 checks per implementation

Case contract

Input {tier_history:[[effective_day,tier]] (any order), txns:[[day,base]], mult:{tier:pct}}. Each transaction earns floor(base*pct/100) using the tier with the latest effective_day <= transaction day ("member" before any entry). Unknown tier names earn at 100%. Return {points, 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
unsorted history{"points": [104, 150], "total": 254}{"points": [156, 200], "total": 356}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 ↗