FA-58489 / Loan amortization schedules / Member archive
Payment application waterfall: threshold boundary · case 04
A payment exactly equal to the threshold is parked in suspense.
Case contract
x = {'due': {'interest', 'principal', 'late_fee', 'fees'}, 'payment', 'suspense', 'threshold', 'balance'}. Available = payment + suspense. If available < threshold, everything goes to suspense and nothing is applied. Otherwise apply in order interest, principal, late_fee, fees, then curtail principal with the remainder up to balance - applied principal; the rest is refunded. Return {'applied', 'curtailment', 'refund', 'suspense', 'new_balance'}.
Why this case matters
Amortization engines drive borrower statements, payoff quotes and investor remittances; a misplaced rounding step, boundary or ordering rule compounds across hundreds of periods.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: threshold boundary | {"applied": {"fees": 0, "interest": 0, "late_fee": 0, "principal": 0}, "curtailment": 0, "new_balance": 2000, "refund": 0, "suspense": 1000} | {"applied": {"fees": 0, "interest": 1000, "late_fee": 0, "principal": 0}, "curtailment": 0, "new_balance": 2000, "refund": 0, "suspense": 0} | 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 ↗