FA-60837 / Loyalty points ledgers / Member archive
Household pool redemption draw: remaining need tracking · case 02
A household redemption pulls points from every member, drawing far more than the reward costs.
Case contract
Input {balances:{member:pts}, caps:{member:max contribution}, requester, pts}. The requester contributes their full balance first (caps never apply to the requester). Other members contribute up to min(balance, cap), in descending order of that usable amount, ties by name. If total usable points are short return {"error":"insufficient"}. Return {draws:[[member,pts]]} with zero draws omitted.
Why this case matters
Member point balances, statements and the program liability depend on this ledger rule.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| requester first | {"draws": [["ann", 300], ["bob", 900], ["cy", 400]]} | {"draws": [["ann", 300], ["bob", 702]]} | 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 ↗