FAILURE MAP
← Case archive

FA-60637 / Loyalty points ledgers / Member archive

Idempotent points event ledger: rejected redemption record · case 02

Reversing a redemption that was rejected for insufficient points credits points that were never taken.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

Input {events:[{id,ts,type:"earn"|"redeem"|"reverse",pts,ref}]}. Duplicate ids are dropped keeping the first delivery in input order; survivors are applied sorted by (ts,id). Redeem requires balance >= pts or is rejected. Reverse undoes an applied earn or redeem once; unknown, rejected, already reversed, or reverse targets are rejected. Return {balance, rejected, applied}.

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
reverse rejected redeem{"applied": ["e1", "e3"], "balance": 62, "rejected": ["e2"]}{"applied": ["e1"], "balance": 10, "rejected": ["e2", "e3"]}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 ↗