FAILURE MAP
← Case archive

FA-60412 / Loyalty points ledgers / Member archive

Points redemption at checkout: minimum balance boundary · case 02

A member with exactly the 500-point minimum cannot redeem.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Input {balance, order_cents, request_pts, max_pct, cpp (cents per point)}. Balance below 500 returns {"error":"below minimum"}. Points are used in blocks of 100: used = min(request floored to a block, balance floored to a block, cap) where cap = floor(order*max_pct/100 / cpp) floored to a block. Cash due = order - used*cpp. Return {points_used, cash_due}.

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
minimum balance edge{"error": "below minimum"}{"cash_due": 8999, "points_used": 500}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 ↗