FAILURE MAP
← Case archive

FA-60418 / Loyalty points ledgers / Member archive

Points redemption at checkout: request block rounding · case 03

Members are charged more points than they asked for.

Member previewVariant 3 · 3 implementations · 7 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
normal{"cash_due": 2103, "points_used": 1900}{"cash_due": 2203, "points_used": 1800}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 ↗