FAILURE MAP
← Case archive

FA-60375 / Loyalty points ledgers / Member archive

Order points earning: promo multiplier increment · case 05

Promotional categories earn their base points twice.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input {lines:[{cat,amount cents}], tax, shipping, tier, promo:{cat:multiplier}}. Eligible spend = non-giftcard line amounts (tax and shipping never earn). Eligible spend below 500 cents earns nothing. Base = floor(eligible/100) computed once per order. Tier points = floor(base*pct/100) with pct base 100, silver 125, gold 150. Promo bonus per non-giftcard category = floor(category spend/100)*(multiplier-1); the order bonus is capped at 1000. Return {base, tier, bonus, 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
gold with promo{"base": 159, "bonus": 450, "tier": 238, "total": 688}{"base": 159, "bonus": 300, "tier": 238, "total": 538}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 ↗