FAILURE MAP
← Case archive

FA-60560 / Loyalty points ledgers / Member archive

Promotion stacking rules: exclusive promo combination · case 05

Exclusive promotions are all applied together.

Member previewVariant 5 · 3 implementations · 7 checks per implementation

Case contract

Input {base, promos:[{id,kind,value,stackable,cap}]}. A multiplier promo (value in percent) gives floor(base*(value-100)/100) extra; a fixed promo gives value. Each extra is capped at cap when cap > 0. All stackable extras apply; of the non-stackable promos only the single best capped extra applies (ties to the lower id), in addition to the stackable ones. Return {bonus, applied ids sorted}.

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
mixed promos{"applied": [1, 2, 3], "bonus": 1807}{"applied": [1, 3], "bonus": 1507}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 ↗