{"abstract":"Payoff interest does not equal the quoted per diem times the days.","category":"Loan amortization schedules","checks":7,"contract":"x = {'balance', 'rate_bp', 'last_paid_day', 'payoff_day', 'basis', 'fees_due', 'escrow' (credit, may be negative), 'penalty_bp', 'penalty_until'}. Per diem = round_half_up(balance*bp/(10000*basis)); interest = per diem * (payoff_day - last_paid_day). Penalty = round_half_up(balance*penalty_bp/10000) when payoff_day <= penalty_until, else 0. Payoff = balance + interest + fees + penalty - escrow. Return {'per_diem', 'interest', 'penalty', 'payoff'}.","contract_signature":"x","evaluation_group":"w2-loan-amortization-schedules-payoff-quote-per-diem","failed_approach":"Truncating the per diem keeps the multiplication but understates the daily charge.","family":"w2-loan-amortization-schedules-payoff-quote-per-diem-per-diem-rounding-stage","id":"FA-58646","implementations":{"attempt":{"sha256":"f925d22a0a524dd83d9522711310eef1a5f361d48da5494f761210796e5edefd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    def rnd(n, d):\n        q, r = divmod(n, d)\n        return q + (1 if 2 * r >= d else 0)\n    per_diem = x['balance'] * x['rate_bp'] // (10000 * x['basis'])\n    days = x['payoff_day'] - x['last_paid_day']\n    interest = per_diem * days\n    penalty = rnd(x['balance'] * x['penalty_bp'], 10000) if x['payoff_day'] <= x['penalty_until'] else 0\n    payoff = x['balance'] + interest + x['fees_due'] + penalty - x['escrow']\n    return {'per_diem': per_diem, 'interest': interest, 'penalty': penalty, 'payoff': payoff}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: per diem rounding stage', {'balance': 100000, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 145, 'basis': 360, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 115}, {'per_diem': 17, 'interest': 765, 'penalty': 0, 'payoff': 108265}], ['control 1', {'balance': 999999, 'rate_bp': 600, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 365, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 100, 'penalty_until': 10}, {'per_diem': 164, 'interest': 164, 'penalty': 0, 'payoff': 1000163}], ['control 2', {'balance': 12345678, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 160}, {'per_diem': 2029, 'interest': 2029, 'penalty': 246914, 'payoff': 12598121}], ['control 3', {'balance': 999999, 'rate_bp': 1250, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 360, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 200, 'penalty_until': 70}, {'per_diem': 347, 'interest': 347, 'penalty': 20000, 'payoff': 1011846}], ['control 4', {'balance': 12345678, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 200, 'penalty_until': 130}, {'per_diem': 2058, 'interest': 2058, 'penalty': 246914, 'payoff': 12582650}], ['control 5', {'balance': 100000, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 0, 'penalty_until': 115}, {'per_diem': 12, 'interest': 12, 'penalty': 0, 'payoff': 103512}], ['control 6', {'balance': 12345678, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 115}, {'per_diem': 2058, 'interest': 2058, 'penalty': 246914, 'payoff': 12598150}]], [['regression: per diem rounding stage', {'balance': 999999, 'rate_bp': 1250, 'last_paid_day': 1, 'payoff_day': 46, 'basis': 365, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 100, 'penalty_until': 1}, {'per_diem': 342, 'interest': 15390, 'penalty': 0, 'payoff': 1022889}], ['regression: per diem rounding stage, partial-repair probe', {'balance': 100000, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 360, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 61}, {'per_diem': 13, 'interest': 13, 'penalty': 2000, 'payoff': 105513}], ['control 1', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 31, 'basis': 360, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 0, 'penalty_until': 61}, {'per_diem': 125, 'interest': 3750, 'penalty': 0, 'payoff': 1007249}], ['control 2', {'balance': 12345678, 'rate_bp': 1250, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 365, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 0, 'penalty_until': 40}, {'per_diem': 4228, 'interest': 4228, 'penalty': 0, 'payoff': 12337906}], ['control 3', {'balance': 100000, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 200, 'penalty_until': 130}, {'per_diem': 12, 'interest': 12, 'penalty': 2000, 'payoff': 90012}], ['control 4', {'balance': 12345678, 'rate_bp': 450, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 365, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 200, 'penalty_until': 40}, {'per_diem': 1522, 'interest': 1522, 'penalty': 246914, 'payoff': 12598114}], ['control 5', {'balance': 999999, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 100, 'penalty_until': 100}, {'per_diem': 342, 'interest': 342, 'penalty': 0, 'payoff': 1000341}]], [['regression: per diem rounding stage', {'balance': 5000, 'rate_bp': 450, 'last_paid_day': 10, 'payoff_day': 55, 'basis': 365, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 40}, {'per_diem': 1, 'interest': 45, 'penalty': 0, 'payoff': 9045}], ['control 1', {'balance': 100000, 'rate_bp': 1250, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 365, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 100, 'penalty_until': 1}, {'per_diem': 34, 'interest': 34, 'penalty': 0, 'payoff': 91534}], ['control 2', {'balance': 12345678, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 0, 'penalty_until': 100}, {'per_diem': 4287, 'interest': 4287, 'penalty': 0, 'payoff': 12337965}], ['control 3', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 10, 'payoff_day': 40, 'basis': 360, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 100, 'penalty_until': 10}, {'per_diem': 125, 'interest': 3750, 'penalty': 0, 'payoff': 995249}], ['control 4', {'balance': 100000, 'rate_bp': 600, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 360, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 100, 'penalty_until': 10}, {'per_diem': 17, 'interest': 17, 'penalty': 0, 'payoff': 104017}], ['control 5', {'balance': 12345678, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 160}, {'per_diem': 2058, 'interest': 2058, 'penalty': 0, 'payoff': 12355236}], ['control 6', {'balance': 12345678, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 100}, {'per_diem': 4287, 'interest': 4287, 'penalty': 0, 'payoff': 12349965}]], [['regression: per diem rounding stage', {'balance': 5000, 'rate_bp': 600, 'last_paid_day': 10, 'payoff_day': 40, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 70}, {'per_diem': 1, 'interest': 30, 'penalty': 100, 'payoff': 8630}], ['control 1', {'balance': 12345678, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 115, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 100}, {'per_diem': 4228, 'interest': 63420, 'penalty': 0, 'payoff': 12412598}], ['control 2', {'balance': 100000, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 130}, {'per_diem': 12, 'interest': 12, 'penalty': 2000, 'payoff': 105512}], ['control 3', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 365, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 100, 'penalty_until': 61}, {'per_diem': 123, 'interest': 123, 'penalty': 10000, 'payoff': 1010122}], ['control 4', {'balance': 100000, 'rate_bp': 1250, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 360, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 200, 'penalty_until': 70}, {'per_diem': 35, 'interest': 35, 'penalty': 2000, 'payoff': 90035}], ['control 5', {'balance': 5000, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 100, 'penalty_until': 100}, {'per_diem': 1, 'interest': 1, 'penalty': 0, 'payoff': -6999}], ['control 6', {'balance': 100000, 'rate_bp': 1250, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 360, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 0, 'penalty_until': 16}, {'per_diem': 35, 'interest': 35, 'penalty': 0, 'payoff': 91535}]], [['regression: per diem rounding stage', {'balance': 999999, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 131, 'basis': 360, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 100, 'penalty_until': 115}, {'per_diem': 347, 'interest': 10757, 'penalty': 0, 'payoff': 1014256}], ['regression: per diem rounding stage, partial-repair probe', {'balance': 999999, 'rate_bp': 600, 'last_paid_day': 10, 'payoff_day': 40, 'basis': 360, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 0, 'penalty_until': 70}, {'per_diem': 167, 'interest': 5010, 'penalty': 0, 'payoff': 1005009}], ['control 1', {'balance': 12345678, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 100, 'penalty_until': 130}, {'per_diem': 1522, 'interest': 1522, 'penalty': 123457, 'payoff': 12478157}], ['control 2', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 31, 'basis': 360, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 200, 'penalty_until': 16}, {'per_diem': 125, 'interest': 3750, 'penalty': 0, 'payoff': 1007749}], ['control 3', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 365, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 0, 'penalty_until': 25}, {'per_diem': 123, 'interest': 123, 'penalty': 0, 'payoff': 991622}], ['control 4', {'balance': 100000, 'rate_bp': 1250, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 365, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 16}, {'per_diem': 34, 'interest': 34, 'penalty': 0, 'payoff': 104034}], ['control 5', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 365, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 61}, {'per_diem': 123, 'interest': 123, 'penalty': 0, 'payoff': 1007622}]]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'raised ' + type(exc).__name__\n    check(label, actual, expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"e9438e225855bae51cd519dc7608e34463d3818213fc4b86491108455957552b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    def rnd(n, d):\n        q, r = divmod(n, d)\n        return q + (1 if 2 * r >= d else 0)\n    per_diem = rnd(x['balance'] * x['rate_bp'], 10000 * x['basis'])\n    days = x['payoff_day'] - x['last_paid_day']\n    interest = rnd(x['balance'] * x['rate_bp'] * days, 10000 * x['basis'])\n    penalty = rnd(x['balance'] * x['penalty_bp'], 10000) if x['payoff_day'] <= x['penalty_until'] else 0\n    payoff = x['balance'] + interest + x['fees_due'] + penalty - x['escrow']\n    return {'per_diem': per_diem, 'interest': interest, 'penalty': penalty, 'payoff': payoff}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: per diem rounding stage', {'balance': 100000, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 145, 'basis': 360, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 115}, {'per_diem': 17, 'interest': 765, 'penalty': 0, 'payoff': 108265}], ['control 1', {'balance': 999999, 'rate_bp': 600, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 365, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 100, 'penalty_until': 10}, {'per_diem': 164, 'interest': 164, 'penalty': 0, 'payoff': 1000163}], ['control 2', {'balance': 12345678, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 160}, {'per_diem': 2029, 'interest': 2029, 'penalty': 246914, 'payoff': 12598121}], ['control 3', {'balance': 999999, 'rate_bp': 1250, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 360, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 200, 'penalty_until': 70}, {'per_diem': 347, 'interest': 347, 'penalty': 20000, 'payoff': 1011846}], ['control 4', {'balance': 12345678, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 200, 'penalty_until': 130}, {'per_diem': 2058, 'interest': 2058, 'penalty': 246914, 'payoff': 12582650}], ['control 5', {'balance': 100000, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 0, 'penalty_until': 115}, {'per_diem': 12, 'interest': 12, 'penalty': 0, 'payoff': 103512}], ['control 6', {'balance': 12345678, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 115}, {'per_diem': 2058, 'interest': 2058, 'penalty': 246914, 'payoff': 12598150}]], [['regression: per diem rounding stage', {'balance': 999999, 'rate_bp': 1250, 'last_paid_day': 1, 'payoff_day': 46, 'basis': 365, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 100, 'penalty_until': 1}, {'per_diem': 342, 'interest': 15390, 'penalty': 0, 'payoff': 1022889}], ['regression: per diem rounding stage, partial-repair probe', {'balance': 100000, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 360, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 61}, {'per_diem': 13, 'interest': 13, 'penalty': 2000, 'payoff': 105513}], ['control 1', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 31, 'basis': 360, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 0, 'penalty_until': 61}, {'per_diem': 125, 'interest': 3750, 'penalty': 0, 'payoff': 1007249}], ['control 2', {'balance': 12345678, 'rate_bp': 1250, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 365, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 0, 'penalty_until': 40}, {'per_diem': 4228, 'interest': 4228, 'penalty': 0, 'payoff': 12337906}], ['control 3', {'balance': 100000, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 200, 'penalty_until': 130}, {'per_diem': 12, 'interest': 12, 'penalty': 2000, 'payoff': 90012}], ['control 4', {'balance': 12345678, 'rate_bp': 450, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 365, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 200, 'penalty_until': 40}, {'per_diem': 1522, 'interest': 1522, 'penalty': 246914, 'payoff': 12598114}], ['control 5', {'balance': 999999, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 100, 'penalty_until': 100}, {'per_diem': 342, 'interest': 342, 'penalty': 0, 'payoff': 1000341}]], [['regression: per diem rounding stage', {'balance': 5000, 'rate_bp': 450, 'last_paid_day': 10, 'payoff_day': 55, 'basis': 365, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 40}, {'per_diem': 1, 'interest': 45, 'penalty': 0, 'payoff': 9045}], ['control 1', {'balance': 100000, 'rate_bp': 1250, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 365, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 100, 'penalty_until': 1}, {'per_diem': 34, 'interest': 34, 'penalty': 0, 'payoff': 91534}], ['control 2', {'balance': 12345678, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 0, 'penalty_until': 100}, {'per_diem': 4287, 'interest': 4287, 'penalty': 0, 'payoff': 12337965}], ['control 3', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 10, 'payoff_day': 40, 'basis': 360, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 100, 'penalty_until': 10}, {'per_diem': 125, 'interest': 3750, 'penalty': 0, 'payoff': 995249}], ['control 4', {'balance': 100000, 'rate_bp': 600, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 360, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 100, 'penalty_until': 10}, {'per_diem': 17, 'interest': 17, 'penalty': 0, 'payoff': 104017}], ['control 5', {'balance': 12345678, 'rate_bp': 600, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 160}, {'per_diem': 2058, 'interest': 2058, 'penalty': 0, 'payoff': 12355236}], ['control 6', {'balance': 12345678, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 360, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 100}, {'per_diem': 4287, 'interest': 4287, 'penalty': 0, 'payoff': 12349965}]], [['regression: per diem rounding stage', {'balance': 5000, 'rate_bp': 600, 'last_paid_day': 10, 'payoff_day': 40, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 70}, {'per_diem': 1, 'interest': 30, 'penalty': 100, 'payoff': 8630}], ['control 1', {'balance': 12345678, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 115, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 100}, {'per_diem': 4228, 'interest': 63420, 'penalty': 0, 'payoff': 12412598}], ['control 2', {'balance': 100000, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 200, 'penalty_until': 130}, {'per_diem': 12, 'interest': 12, 'penalty': 2000, 'payoff': 105512}], ['control 3', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 365, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 100, 'penalty_until': 61}, {'per_diem': 123, 'interest': 123, 'penalty': 10000, 'payoff': 1010122}], ['control 4', {'balance': 100000, 'rate_bp': 1250, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 360, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 200, 'penalty_until': 70}, {'per_diem': 35, 'interest': 35, 'penalty': 2000, 'payoff': 90035}], ['control 5', {'balance': 5000, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 0, 'escrow': 12000, 'penalty_bp': 100, 'penalty_until': 100}, {'per_diem': 1, 'interest': 1, 'penalty': 0, 'payoff': -6999}], ['control 6', {'balance': 100000, 'rate_bp': 1250, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 360, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 0, 'penalty_until': 16}, {'per_diem': 35, 'interest': 35, 'penalty': 0, 'payoff': 91535}]], [['regression: per diem rounding stage', {'balance': 999999, 'rate_bp': 1250, 'last_paid_day': 100, 'payoff_day': 131, 'basis': 360, 'fees_due': 3500, 'escrow': 0, 'penalty_bp': 100, 'penalty_until': 115}, {'per_diem': 347, 'interest': 10757, 'penalty': 0, 'payoff': 1014256}], ['regression: per diem rounding stage, partial-repair probe', {'balance': 999999, 'rate_bp': 600, 'last_paid_day': 10, 'payoff_day': 40, 'basis': 360, 'fees_due': 0, 'escrow': 0, 'penalty_bp': 0, 'penalty_until': 70}, {'per_diem': 167, 'interest': 5010, 'penalty': 0, 'payoff': 1005009}], ['control 1', {'balance': 12345678, 'rate_bp': 450, 'last_paid_day': 100, 'payoff_day': 101, 'basis': 365, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 100, 'penalty_until': 130}, {'per_diem': 1522, 'interest': 1522, 'penalty': 123457, 'payoff': 12478157}], ['control 2', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 31, 'basis': 360, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 200, 'penalty_until': 16}, {'per_diem': 125, 'interest': 3750, 'penalty': 0, 'payoff': 1007749}], ['control 3', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 10, 'payoff_day': 11, 'basis': 365, 'fees_due': 3500, 'escrow': 12000, 'penalty_bp': 0, 'penalty_until': 25}, {'per_diem': 123, 'interest': 123, 'penalty': 0, 'payoff': 991622}], ['control 4', {'balance': 100000, 'rate_bp': 1250, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 365, 'fees_due': 0, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 16}, {'per_diem': 34, 'interest': 34, 'penalty': 0, 'payoff': 104034}], ['control 5', {'balance': 999999, 'rate_bp': 450, 'last_paid_day': 1, 'payoff_day': 2, 'basis': 365, 'fees_due': 3500, 'escrow': -4000, 'penalty_bp': 0, 'penalty_until': 61}, {'per_diem': 123, 'interest': 123, 'penalty': 0, 'payoff': 1007622}]]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'raised ' + type(exc).__name__\n    check(label, actual, expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic bounded teaching model with stipulated toy lending rules stated in the contract; money is integer cents and rates are basis points; it makes no claim of conformance to any regulation, servicing standard or product. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-loan-amortization-schedules-payoff-quote-per-diem-per-diem-rounding-stage","generated_at":"2026-09-29T14:46:28.732279+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Amortization engines drive borrower statements, payoff quotes and investor remittances; a misplaced rounding step, boundary or ordering rule compounds across hundreds of periods.","root_cause":"Interest is rounded once over all days instead of multiplying the rounded per diem.","sha256":"6537cbbafcbb825513b24a86f8aa2a5d8e4d082fd5952153902bbac46b88a901","title":"Payoff quote with per diem: per diem rounding stage · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.349,"exit_code":1,"observations":[{"actual":{"interest":720,"payoff":108220,"penalty":0,"per_diem":16},"check":"regression: per diem rounding stage","expected":{"interest":765,"payoff":108265,"penalty":0,"per_diem":17},"passed":false},{"actual":{"interest":164,"payoff":1000163,"penalty":0,"per_diem":164},"check":"control 1","expected":{"interest":164,"payoff":1000163,"penalty":0,"per_diem":164},"passed":true},{"actual":{"interest":2029,"payoff":12598121,"penalty":246914,"per_diem":2029},"check":"control 2","expected":{"interest":2029,"payoff":12598121,"penalty":246914,"per_diem":2029},"passed":true},{"actual":{"interest":347,"payoff":1011846,"penalty":20000,"per_diem":347},"check":"control 3","expected":{"interest":347,"payoff":1011846,"penalty":20000,"per_diem":347},"passed":true},{"actual":{"interest":2057,"payoff":12582649,"penalty":246914,"per_diem":2057},"check":"control 4","expected":{"interest":2058,"payoff":12582650,"penalty":246914,"per_diem":2058},"passed":false},{"actual":{"interest":12,"payoff":103512,"penalty":0,"per_diem":12},"check":"control 5","expected":{"interest":12,"payoff":103512,"penalty":0,"per_diem":12},"passed":true},{"actual":{"interest":2057,"payoff":12598149,"penalty":246914,"per_diem":2057},"check":"control 6","expected":{"interest":2058,"payoff":12598150,"penalty":246914,"per_diem":2058},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: per diem rounding stage\", \"actual\": {\"per_diem\": 16, \"interest\": 720, \"penalty\": 0, \"payoff\": 108220}, \"expected\": {\"per_diem\": 17, \"interest\": 765, \"penalty\": 0, \"payoff\": 108265}, \"passed\": false}, {\"check\": \"control 1\", \"actual\": {\"per_diem\": 164, \"interest\": 164, \"penalty\": 0, \"payoff\": 1000163}, \"expected\": {\"per_diem\": 164, \"interest\": 164, \"penalty\": 0, \"payoff\": 1000163}, \"passed\": true}, {\"check\": \"control 2\", \"actual\": {\"per_diem\": 2029, \"interest\": 2029, \"penalty\": 246914, \"payoff\": 12598121}, \"expected\": {\"per_diem\": 2029, \"interest\": 2029, \"penalty\": 246914, \"payoff\": 12598121}, \"passed\": true}, {\"check\": \"control 3\", \"actual\": {\"per_diem\": 347, \"interest\": 347, \"penalty\": 20000, \"payoff\": 1011846}, \"expected\": {\"per_diem\": 347, \"interest\": 347, \"penalty\": 20000, \"payoff\": 1011846}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"per_diem\": 2057, \"interest\": 2057, \"penalty\": 246914, \"payoff\": 12582649}, \"expected\": {\"per_diem\": 2058, \"interest\": 2058, \"penalty\": 246914, \"payoff\": 12582650}, \"passed\": false}, {\"check\": \"control 5\", \"actual\": {\"per_diem\": 12, \"interest\": 12, \"penalty\": 0, \"payoff\": 103512}, \"expected\": {\"per_diem\": 12, \"interest\": 12, \"penalty\": 0, \"payoff\": 103512}, \"passed\": true}, {\"check\": \"control 6\", \"actual\": {\"per_diem\": 2057, \"interest\": 2057, \"penalty\": 246914, \"payoff\": 12598149}, \"expected\": {\"per_diem\": 2058, \"interest\": 2058, \"penalty\": 246914, \"payoff\": 12598150}, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.727,"exit_code":1,"observations":[{"actual":{"interest":750,"payoff":108250,"penalty":0,"per_diem":17},"check":"regression: per diem rounding stage","expected":{"interest":765,"payoff":108265,"penalty":0,"per_diem":17},"passed":false},{"actual":{"interest":164,"payoff":1000163,"penalty":0,"per_diem":164},"check":"control 1","expected":{"interest":164,"payoff":1000163,"penalty":0,"per_diem":164},"passed":true},{"actual":{"interest":2029,"payoff":12598121,"penalty":246914,"per_diem":2029},"check":"control 2","expected":{"interest":2029,"payoff":12598121,"penalty":246914,"per_diem":2029},"passed":true},{"actual":{"interest":347,"payoff":1011846,"penalty":20000,"per_diem":347},"check":"control 3","expected":{"interest":347,"payoff":1011846,"penalty":20000,"per_diem":347},"passed":true},{"actual":{"interest":2058,"payoff":12582650,"penalty":246914,"per_diem":2058},"check":"control 4","expected":{"interest":2058,"payoff":12582650,"penalty":246914,"per_diem":2058},"passed":true},{"actual":{"interest":12,"payoff":103512,"penalty":0,"per_diem":12},"check":"control 5","expected":{"interest":12,"payoff":103512,"penalty":0,"per_diem":12},"passed":true},{"actual":{"interest":2058,"payoff":12598150,"penalty":246914,"per_diem":2058},"check":"control 6","expected":{"interest":2058,"payoff":12598150,"penalty":246914,"per_diem":2058},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: per diem rounding stage\", \"actual\": {\"per_diem\": 17, \"interest\": 750, \"penalty\": 0, \"payoff\": 108250}, \"expected\": {\"per_diem\": 17, \"interest\": 765, \"penalty\": 0, \"payoff\": 108265}, \"passed\": false}, {\"check\": \"control 1\", \"actual\": {\"per_diem\": 164, \"interest\": 164, \"penalty\": 0, \"payoff\": 1000163}, \"expected\": {\"per_diem\": 164, \"interest\": 164, \"penalty\": 0, \"payoff\": 1000163}, \"passed\": true}, {\"check\": \"control 2\", \"actual\": {\"per_diem\": 2029, \"interest\": 2029, \"penalty\": 246914, \"payoff\": 12598121}, \"expected\": {\"per_diem\": 2029, \"interest\": 2029, \"penalty\": 246914, \"payoff\": 12598121}, \"passed\": true}, {\"check\": \"control 3\", \"actual\": {\"per_diem\": 347, \"interest\": 347, \"penalty\": 20000, \"payoff\": 1011846}, \"expected\": {\"per_diem\": 347, \"interest\": 347, \"penalty\": 20000, \"payoff\": 1011846}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"per_diem\": 2058, \"interest\": 2058, \"penalty\": 246914, \"payoff\": 12582650}, \"expected\": {\"per_diem\": 2058, \"interest\": 2058, \"penalty\": 246914, \"payoff\": 12582650}, \"passed\": true}, {\"check\": \"control 5\", \"actual\": {\"per_diem\": 12, \"interest\": 12, \"penalty\": 0, \"payoff\": 103512}, \"expected\": {\"per_diem\": 12, \"interest\": 12, \"penalty\": 0, \"payoff\": 103512}, \"passed\": true}, {\"check\": \"control 6\", \"actual\": {\"per_diem\": 2058, \"interest\": 2058, \"penalty\": 246914, \"payoff\": 12598150}, \"expected\": {\"per_diem\": 2058, \"interest\": 2058, \"penalty\": 246914, \"payoff\": 12598150}, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}