FA-60648 / Loyalty points ledgers / Member archive
Partner miles conversion: minimum on usable points · case 03
A conversion goes through with fewer points than the partner minimum after block flooring.
Case contract
Input {pts, block, min_pts, num, den, bonus_bp, threshold}. Usable points = pts floored to a block; usable below min_pts returns {"error"}. Miles = floor(usable*num/den). If usable >= threshold, bonus miles = floor(miles*bonus_bp/10000). Leftover points stay in the account. Return {used, miles, bonus, leftover}.
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 |
|---|---|---|---|
| below minimum after flooring | {"bonus": 0, "leftover": 996, "miles": 5000, "used": 5000} | {"error": "below minimum"} | 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 ↗