{"abstract":"Installments after December keep the starting year.","category":"Loan amortization schedules","checks":7,"contract":"x = {'first_due': [y, m, d] (d may exceed the month length), 'count', 'roll': 'none'|'following'|'modified_following', 'holidays': ISO dates}. Installment i falls in month m+i on the anchor day d clamped to the month length (later months return to d). Unless roll is 'none', a Saturday, Sunday or holiday rolls forward to the next business day; under modified_following a roll that leaves the month instead rolls back to the previous business day. Return ISO date strings.","evaluation_group":"w2-loan-amortization-schedules-due-date-calendar","failed_approach":"Adding one before dividing moves November installments into the next year.","family":"w2-loan-amortization-schedules-due-date-calendar-year-rollover","id":"FA-58766","implementations":{"attempt":{"sha256":"2e467782840154fe876ca9595329f276b9864f42b2298091661882928e5c88f6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nimport calendar\nN = 1\nobservations = []\ndef solve(x):\n    y, m, d = x['first_due']\n    hol = set(x['holidays'])\n    def bad(t):\n        return t.weekday() >= 5 or t.isoformat() in hol\n    out = []\n    for i in range(x['count']):\n        mm = m - 1 + i\n        yy = y + (mm + 1) // 12\n        mm = mm % 12 + 1\n        dd = min(d, calendar.monthrange(yy, mm)[1])\n        date = datetime.date(yy, mm, dd)\n        adj = date\n        if x['roll'] != 'none':\n            while bad(adj):\n                adj += datetime.timedelta(days=1)\n            if x['roll'] == 'modified_following' and adj.month != date.month:\n                adj = date\n                while bad(adj):\n                    adj -= datetime.timedelta(days=1)\n        out.append(adj.isoformat())\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: year rollover', {'first_due': [2023, 9, 1], 'count': 13, 'roll': 'modified_following', 'holidays': ['2024-03-29', '2024-05-31']}, ['2023-09-01', '2023-10-02', '2023-11-01', '2023-12-01', '2024-01-01', '2024-02-01', '2024-03-01', '2024-04-01', '2024-05-01', '2024-06-03', '2024-07-01', '2024-08-01', '2024-09-02']], ['control 1', {'first_due': [2024, 2, 5], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-03-29', '2024-05-31', '2023-12-25']}, ['2024-02-05', '2024-03-05', '2024-04-05']], ['control 2', {'first_due': [2023, 8, 15], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-02-29', '2023-06-30']}, ['2023-08-15', '2023-09-15', '2023-10-16']], ['control 3', {'first_due': [2023, 3, 31], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-03-29']}, ['2023-03-31', '2023-04-28', '2023-05-31', '2023-06-30', '2023-07-31', '2023-08-31']], ['control 4', {'first_due': [2024, 3, 15], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-05-31']}, ['2024-03-15', '2024-04-15', '2024-05-15', '2024-06-17', '2024-07-15', '2024-08-15']], ['control 5', {'first_due': [2024, 2, 30], 'count': 3, 'roll': 'none', 'holidays': ['2023-12-25']}, ['2024-02-29', '2024-03-30', '2024-04-30']], ['control 6', {'first_due': [2023, 6, 15], 'count': 6, 'roll': 'none', 'holidays': ['2024-12-31']}, ['2023-06-15', '2023-07-15', '2023-08-15', '2023-09-15', '2023-10-15', '2023-11-15']]], [['regression: year rollover', {'first_due': [2024, 9, 5], 'count': 13, 'roll': 'following', 'holidays': []}, ['2024-09-05', '2024-10-07', '2024-11-05', '2024-12-05', '2025-01-06', '2025-02-05', '2025-03-05', '2025-04-07', '2025-05-05', '2025-06-05', '2025-07-07', '2025-08-05', '2025-09-05']], ['control 1', {'first_due': [2023, 4, 5], 'count': 6, 'roll': 'following', 'holidays': ['2024-01-01', '2024-05-31', '2023-06-30']}, ['2023-04-05', '2023-05-05', '2023-06-05', '2023-07-05', '2023-08-07', '2023-09-05']], ['control 2', {'first_due': [2023, 6, 5], 'count': 6, 'roll': 'none', 'holidays': ['2024-01-01']}, ['2023-06-05', '2023-07-05', '2023-08-05', '2023-09-05', '2023-10-05', '2023-11-05']], ['control 3', {'first_due': [2023, 7, 30], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-12-31']}, ['2023-07-31', '2023-08-30', '2023-09-29', '2023-10-30', '2023-11-30', '2023-12-29']], ['control 4', {'first_due': [2023, 3, 28], 'count': 3, 'roll': 'following', 'holidays': ['2024-05-31', '2023-06-30', '2023-12-25']}, ['2023-03-28', '2023-04-28', '2023-05-29']], ['control 5', {'first_due': [2024, 9, 15], 'count': 3, 'roll': 'following', 'holidays': ['2024-12-31', '2024-05-31']}, ['2024-09-16', '2024-10-15', '2024-11-15']], ['control 6', {'first_due': [2024, 4, 30], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-03-29', '2024-01-01', '2024-05-31']}, ['2024-04-30', '2024-05-30', '2024-06-28']]], [['regression: year rollover', {'first_due': [2024, 5, 1], 'count': 13, 'roll': 'none', 'holidays': []}, ['2024-05-01', '2024-06-01', '2024-07-01', '2024-08-01', '2024-09-01', '2024-10-01', '2024-11-01', '2024-12-01', '2025-01-01', '2025-02-01', '2025-03-01', '2025-04-01', '2025-05-01']], ['control 1', {'first_due': [2023, 9, 1], 'count': 3, 'roll': 'modified_following', 'holidays': []}, ['2023-09-01', '2023-10-02', '2023-11-01']], ['control 2', {'first_due': [2024, 10, 30], 'count': 3, 'roll': 'following', 'holidays': ['2024-05-31', '2023-06-30', '2024-03-29']}, ['2024-10-30', '2024-12-02', '2024-12-30']], ['control 3', {'first_due': [2023, 2, 5], 'count': 3, 'roll': 'none', 'holidays': ['2024-03-29']}, ['2023-02-05', '2023-03-05', '2023-04-05']], ['control 4', {'first_due': [2023, 8, 29], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-01-01', '2024-05-31', '2024-03-29']}, ['2023-08-29', '2023-09-29', '2023-10-30']], ['control 5', {'first_due': [2024, 3, 29], 'count': 3, 'roll': 'none', 'holidays': ['2023-12-25', '2024-01-01']}, ['2024-03-29', '2024-04-29', '2024-05-29']], ['control 6', {'first_due': [2024, 6, 15], 'count': 6, 'roll': 'following', 'holidays': ['2024-02-29', '2024-12-31']}, ['2024-06-17', '2024-07-15', '2024-08-15', '2024-09-16', '2024-10-15', '2024-11-15']]], [['regression: year rollover', {'first_due': [2024, 8, 15], 'count': 6, 'roll': 'modified_following', 'holidays': []}, ['2024-08-15', '2024-09-16', '2024-10-15', '2024-11-15', '2024-12-16', '2025-01-15']], ['control 1', {'first_due': [2023, 8, 1], 'count': 3, 'roll': 'following', 'holidays': []}, ['2023-08-01', '2023-09-01', '2023-10-02']], ['control 2', {'first_due': [2023, 2, 28], 'count': 3, 'roll': 'following', 'holidays': ['2023-12-25', '2024-05-31']}, ['2023-02-28', '2023-03-28', '2023-04-28']], ['control 3', {'first_due': [2024, 1, 5], 'count': 3, 'roll': 'none', 'holidays': ['2024-03-29', '2024-05-31']}, ['2024-01-05', '2024-02-05', '2024-03-05']], ['control 4', {'first_due': [2023, 4, 30], 'count': 3, 'roll': 'none', 'holidays': ['2023-06-30']}, ['2023-04-30', '2023-05-30', '2023-06-30']], ['control 5', {'first_due': [2023, 5, 30], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-01-01', '2024-03-29']}, ['2023-05-30', '2023-06-30', '2023-07-31', '2023-08-30', '2023-09-29', '2023-10-30']], ['control 6', {'first_due': [2023, 7, 5], 'count': 3, 'roll': 'following', 'holidays': ['2024-12-31', '2024-05-31']}, ['2023-07-05', '2023-08-07', '2023-09-05']]], [['regression: year rollover', {'first_due': [2023, 10, 30], 'count': 13, 'roll': 'none', 'holidays': ['2024-01-01', '2024-03-29']}, ['2023-10-30', '2023-11-30', '2023-12-30', '2024-01-30', '2024-02-29', '2024-03-30', '2024-04-30', '2024-05-30', '2024-06-30', '2024-07-30', '2024-08-30', '2024-09-30', '2024-10-30']], ['control 1', {'first_due': [2024, 1, 29], 'count': 6, 'roll': 'none', 'holidays': []}, ['2024-01-29', '2024-02-29', '2024-03-29', '2024-04-29', '2024-05-29', '2024-06-29']], ['control 2', {'first_due': [2024, 8, 5], 'count': 3, 'roll': 'modified_following', 'holidays': []}, ['2024-08-05', '2024-09-05', '2024-10-07']], ['control 3', {'first_due': [2023, 10, 28], 'count': 3, 'roll': 'following', 'holidays': ['2024-12-31']}, ['2023-10-30', '2023-11-28', '2023-12-28']], ['control 4', {'first_due': [2023, 6, 30], 'count': 6, 'roll': 'modified_following', 'holidays': []}, ['2023-06-30', '2023-07-31', '2023-08-30', '2023-09-29', '2023-10-30', '2023-11-30']], ['control 5', {'first_due': [2023, 1, 1], 'count': 3, 'roll': 'none', 'holidays': ['2024-12-31', '2024-02-29', '2024-01-01']}, ['2023-01-01', '2023-02-01', '2023-03-01']], ['control 6', {'first_due': [2023, 2, 15], 'count': 6, 'roll': 'none', 'holidays': ['2024-12-31']}, ['2023-02-15', '2023-03-15', '2023-04-15', '2023-05-15', '2023-06-15', '2023-07-15']]]]\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":"33238ea9e0238235e5509e5df3000d91247df2945a7fe82a1db74225792a7a11","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nimport calendar\nN = 1\nobservations = []\ndef solve(x):\n    y, m, d = x['first_due']\n    hol = set(x['holidays'])\n    def bad(t):\n        return t.weekday() >= 5 or t.isoformat() in hol\n    out = []\n    for i in range(x['count']):\n        mm = m - 1 + i\n        yy = y + i // 12\n        mm = mm % 12 + 1\n        dd = min(d, calendar.monthrange(yy, mm)[1])\n        date = datetime.date(yy, mm, dd)\n        adj = date\n        if x['roll'] != 'none':\n            while bad(adj):\n                adj += datetime.timedelta(days=1)\n            if x['roll'] == 'modified_following' and adj.month != date.month:\n                adj = date\n                while bad(adj):\n                    adj -= datetime.timedelta(days=1)\n        out.append(adj.isoformat())\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: year rollover', {'first_due': [2023, 9, 1], 'count': 13, 'roll': 'modified_following', 'holidays': ['2024-03-29', '2024-05-31']}, ['2023-09-01', '2023-10-02', '2023-11-01', '2023-12-01', '2024-01-01', '2024-02-01', '2024-03-01', '2024-04-01', '2024-05-01', '2024-06-03', '2024-07-01', '2024-08-01', '2024-09-02']], ['control 1', {'first_due': [2024, 2, 5], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-03-29', '2024-05-31', '2023-12-25']}, ['2024-02-05', '2024-03-05', '2024-04-05']], ['control 2', {'first_due': [2023, 8, 15], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-02-29', '2023-06-30']}, ['2023-08-15', '2023-09-15', '2023-10-16']], ['control 3', {'first_due': [2023, 3, 31], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-03-29']}, ['2023-03-31', '2023-04-28', '2023-05-31', '2023-06-30', '2023-07-31', '2023-08-31']], ['control 4', {'first_due': [2024, 3, 15], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-05-31']}, ['2024-03-15', '2024-04-15', '2024-05-15', '2024-06-17', '2024-07-15', '2024-08-15']], ['control 5', {'first_due': [2024, 2, 30], 'count': 3, 'roll': 'none', 'holidays': ['2023-12-25']}, ['2024-02-29', '2024-03-30', '2024-04-30']], ['control 6', {'first_due': [2023, 6, 15], 'count': 6, 'roll': 'none', 'holidays': ['2024-12-31']}, ['2023-06-15', '2023-07-15', '2023-08-15', '2023-09-15', '2023-10-15', '2023-11-15']]], [['regression: year rollover', {'first_due': [2024, 9, 5], 'count': 13, 'roll': 'following', 'holidays': []}, ['2024-09-05', '2024-10-07', '2024-11-05', '2024-12-05', '2025-01-06', '2025-02-05', '2025-03-05', '2025-04-07', '2025-05-05', '2025-06-05', '2025-07-07', '2025-08-05', '2025-09-05']], ['control 1', {'first_due': [2023, 4, 5], 'count': 6, 'roll': 'following', 'holidays': ['2024-01-01', '2024-05-31', '2023-06-30']}, ['2023-04-05', '2023-05-05', '2023-06-05', '2023-07-05', '2023-08-07', '2023-09-05']], ['control 2', {'first_due': [2023, 6, 5], 'count': 6, 'roll': 'none', 'holidays': ['2024-01-01']}, ['2023-06-05', '2023-07-05', '2023-08-05', '2023-09-05', '2023-10-05', '2023-11-05']], ['control 3', {'first_due': [2023, 7, 30], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-12-31']}, ['2023-07-31', '2023-08-30', '2023-09-29', '2023-10-30', '2023-11-30', '2023-12-29']], ['control 4', {'first_due': [2023, 3, 28], 'count': 3, 'roll': 'following', 'holidays': ['2024-05-31', '2023-06-30', '2023-12-25']}, ['2023-03-28', '2023-04-28', '2023-05-29']], ['control 5', {'first_due': [2024, 9, 15], 'count': 3, 'roll': 'following', 'holidays': ['2024-12-31', '2024-05-31']}, ['2024-09-16', '2024-10-15', '2024-11-15']], ['control 6', {'first_due': [2024, 4, 30], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-03-29', '2024-01-01', '2024-05-31']}, ['2024-04-30', '2024-05-30', '2024-06-28']]], [['regression: year rollover', {'first_due': [2024, 5, 1], 'count': 13, 'roll': 'none', 'holidays': []}, ['2024-05-01', '2024-06-01', '2024-07-01', '2024-08-01', '2024-09-01', '2024-10-01', '2024-11-01', '2024-12-01', '2025-01-01', '2025-02-01', '2025-03-01', '2025-04-01', '2025-05-01']], ['control 1', {'first_due': [2023, 9, 1], 'count': 3, 'roll': 'modified_following', 'holidays': []}, ['2023-09-01', '2023-10-02', '2023-11-01']], ['control 2', {'first_due': [2024, 10, 30], 'count': 3, 'roll': 'following', 'holidays': ['2024-05-31', '2023-06-30', '2024-03-29']}, ['2024-10-30', '2024-12-02', '2024-12-30']], ['control 3', {'first_due': [2023, 2, 5], 'count': 3, 'roll': 'none', 'holidays': ['2024-03-29']}, ['2023-02-05', '2023-03-05', '2023-04-05']], ['control 4', {'first_due': [2023, 8, 29], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-01-01', '2024-05-31', '2024-03-29']}, ['2023-08-29', '2023-09-29', '2023-10-30']], ['control 5', {'first_due': [2024, 3, 29], 'count': 3, 'roll': 'none', 'holidays': ['2023-12-25', '2024-01-01']}, ['2024-03-29', '2024-04-29', '2024-05-29']], ['control 6', {'first_due': [2024, 6, 15], 'count': 6, 'roll': 'following', 'holidays': ['2024-02-29', '2024-12-31']}, ['2024-06-17', '2024-07-15', '2024-08-15', '2024-09-16', '2024-10-15', '2024-11-15']]], [['regression: year rollover', {'first_due': [2024, 8, 15], 'count': 6, 'roll': 'modified_following', 'holidays': []}, ['2024-08-15', '2024-09-16', '2024-10-15', '2024-11-15', '2024-12-16', '2025-01-15']], ['control 1', {'first_due': [2023, 8, 1], 'count': 3, 'roll': 'following', 'holidays': []}, ['2023-08-01', '2023-09-01', '2023-10-02']], ['control 2', {'first_due': [2023, 2, 28], 'count': 3, 'roll': 'following', 'holidays': ['2023-12-25', '2024-05-31']}, ['2023-02-28', '2023-03-28', '2023-04-28']], ['control 3', {'first_due': [2024, 1, 5], 'count': 3, 'roll': 'none', 'holidays': ['2024-03-29', '2024-05-31']}, ['2024-01-05', '2024-02-05', '2024-03-05']], ['control 4', {'first_due': [2023, 4, 30], 'count': 3, 'roll': 'none', 'holidays': ['2023-06-30']}, ['2023-04-30', '2023-05-30', '2023-06-30']], ['control 5', {'first_due': [2023, 5, 30], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-01-01', '2024-03-29']}, ['2023-05-30', '2023-06-30', '2023-07-31', '2023-08-30', '2023-09-29', '2023-10-30']], ['control 6', {'first_due': [2023, 7, 5], 'count': 3, 'roll': 'following', 'holidays': ['2024-12-31', '2024-05-31']}, ['2023-07-05', '2023-08-07', '2023-09-05']]], [['regression: year rollover', {'first_due': [2023, 10, 30], 'count': 13, 'roll': 'none', 'holidays': ['2024-01-01', '2024-03-29']}, ['2023-10-30', '2023-11-30', '2023-12-30', '2024-01-30', '2024-02-29', '2024-03-30', '2024-04-30', '2024-05-30', '2024-06-30', '2024-07-30', '2024-08-30', '2024-09-30', '2024-10-30']], ['control 1', {'first_due': [2024, 1, 29], 'count': 6, 'roll': 'none', 'holidays': []}, ['2024-01-29', '2024-02-29', '2024-03-29', '2024-04-29', '2024-05-29', '2024-06-29']], ['control 2', {'first_due': [2024, 8, 5], 'count': 3, 'roll': 'modified_following', 'holidays': []}, ['2024-08-05', '2024-09-05', '2024-10-07']], ['control 3', {'first_due': [2023, 10, 28], 'count': 3, 'roll': 'following', 'holidays': ['2024-12-31']}, ['2023-10-30', '2023-11-28', '2023-12-28']], ['control 4', {'first_due': [2023, 6, 30], 'count': 6, 'roll': 'modified_following', 'holidays': []}, ['2023-06-30', '2023-07-31', '2023-08-30', '2023-09-29', '2023-10-30', '2023-11-30']], ['control 5', {'first_due': [2023, 1, 1], 'count': 3, 'roll': 'none', 'holidays': ['2024-12-31', '2024-02-29', '2024-01-01']}, ['2023-01-01', '2023-02-01', '2023-03-01']], ['control 6', {'first_due': [2023, 2, 15], 'count': 6, 'roll': 'none', 'holidays': ['2024-12-31']}, ['2023-02-15', '2023-03-15', '2023-04-15', '2023-05-15', '2023-06-15', '2023-07-15']]]]\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"},"fixed":{"sha256":"08e885ba938bcc2bbcf64120b52eeed02bd2809d5fbf4f8be2378b14d4c88495","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nimport calendar\nN = 1\nobservations = []\ndef solve(x):\n    y, m, d = x['first_due']\n    hol = set(x['holidays'])\n    def bad(t):\n        return t.weekday() >= 5 or t.isoformat() in hol\n    out = []\n    for i in range(x['count']):\n        mm = m - 1 + i\n        yy = y + mm // 12\n        mm = mm % 12 + 1\n        dd = min(d, calendar.monthrange(yy, mm)[1])\n        date = datetime.date(yy, mm, dd)\n        adj = date\n        if x['roll'] != 'none':\n            while bad(adj):\n                adj += datetime.timedelta(days=1)\n            if x['roll'] == 'modified_following' and adj.month != date.month:\n                adj = date\n                while bad(adj):\n                    adj -= datetime.timedelta(days=1)\n        out.append(adj.isoformat())\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: year rollover', {'first_due': [2023, 9, 1], 'count': 13, 'roll': 'modified_following', 'holidays': ['2024-03-29', '2024-05-31']}, ['2023-09-01', '2023-10-02', '2023-11-01', '2023-12-01', '2024-01-01', '2024-02-01', '2024-03-01', '2024-04-01', '2024-05-01', '2024-06-03', '2024-07-01', '2024-08-01', '2024-09-02']], ['control 1', {'first_due': [2024, 2, 5], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-03-29', '2024-05-31', '2023-12-25']}, ['2024-02-05', '2024-03-05', '2024-04-05']], ['control 2', {'first_due': [2023, 8, 15], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-02-29', '2023-06-30']}, ['2023-08-15', '2023-09-15', '2023-10-16']], ['control 3', {'first_due': [2023, 3, 31], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-03-29']}, ['2023-03-31', '2023-04-28', '2023-05-31', '2023-06-30', '2023-07-31', '2023-08-31']], ['control 4', {'first_due': [2024, 3, 15], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-05-31']}, ['2024-03-15', '2024-04-15', '2024-05-15', '2024-06-17', '2024-07-15', '2024-08-15']], ['control 5', {'first_due': [2024, 2, 30], 'count': 3, 'roll': 'none', 'holidays': ['2023-12-25']}, ['2024-02-29', '2024-03-30', '2024-04-30']], ['control 6', {'first_due': [2023, 6, 15], 'count': 6, 'roll': 'none', 'holidays': ['2024-12-31']}, ['2023-06-15', '2023-07-15', '2023-08-15', '2023-09-15', '2023-10-15', '2023-11-15']]], [['regression: year rollover', {'first_due': [2024, 9, 5], 'count': 13, 'roll': 'following', 'holidays': []}, ['2024-09-05', '2024-10-07', '2024-11-05', '2024-12-05', '2025-01-06', '2025-02-05', '2025-03-05', '2025-04-07', '2025-05-05', '2025-06-05', '2025-07-07', '2025-08-05', '2025-09-05']], ['control 1', {'first_due': [2023, 4, 5], 'count': 6, 'roll': 'following', 'holidays': ['2024-01-01', '2024-05-31', '2023-06-30']}, ['2023-04-05', '2023-05-05', '2023-06-05', '2023-07-05', '2023-08-07', '2023-09-05']], ['control 2', {'first_due': [2023, 6, 5], 'count': 6, 'roll': 'none', 'holidays': ['2024-01-01']}, ['2023-06-05', '2023-07-05', '2023-08-05', '2023-09-05', '2023-10-05', '2023-11-05']], ['control 3', {'first_due': [2023, 7, 30], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-12-31']}, ['2023-07-31', '2023-08-30', '2023-09-29', '2023-10-30', '2023-11-30', '2023-12-29']], ['control 4', {'first_due': [2023, 3, 28], 'count': 3, 'roll': 'following', 'holidays': ['2024-05-31', '2023-06-30', '2023-12-25']}, ['2023-03-28', '2023-04-28', '2023-05-29']], ['control 5', {'first_due': [2024, 9, 15], 'count': 3, 'roll': 'following', 'holidays': ['2024-12-31', '2024-05-31']}, ['2024-09-16', '2024-10-15', '2024-11-15']], ['control 6', {'first_due': [2024, 4, 30], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-03-29', '2024-01-01', '2024-05-31']}, ['2024-04-30', '2024-05-30', '2024-06-28']]], [['regression: year rollover', {'first_due': [2024, 5, 1], 'count': 13, 'roll': 'none', 'holidays': []}, ['2024-05-01', '2024-06-01', '2024-07-01', '2024-08-01', '2024-09-01', '2024-10-01', '2024-11-01', '2024-12-01', '2025-01-01', '2025-02-01', '2025-03-01', '2025-04-01', '2025-05-01']], ['control 1', {'first_due': [2023, 9, 1], 'count': 3, 'roll': 'modified_following', 'holidays': []}, ['2023-09-01', '2023-10-02', '2023-11-01']], ['control 2', {'first_due': [2024, 10, 30], 'count': 3, 'roll': 'following', 'holidays': ['2024-05-31', '2023-06-30', '2024-03-29']}, ['2024-10-30', '2024-12-02', '2024-12-30']], ['control 3', {'first_due': [2023, 2, 5], 'count': 3, 'roll': 'none', 'holidays': ['2024-03-29']}, ['2023-02-05', '2023-03-05', '2023-04-05']], ['control 4', {'first_due': [2023, 8, 29], 'count': 3, 'roll': 'modified_following', 'holidays': ['2024-01-01', '2024-05-31', '2024-03-29']}, ['2023-08-29', '2023-09-29', '2023-10-30']], ['control 5', {'first_due': [2024, 3, 29], 'count': 3, 'roll': 'none', 'holidays': ['2023-12-25', '2024-01-01']}, ['2024-03-29', '2024-04-29', '2024-05-29']], ['control 6', {'first_due': [2024, 6, 15], 'count': 6, 'roll': 'following', 'holidays': ['2024-02-29', '2024-12-31']}, ['2024-06-17', '2024-07-15', '2024-08-15', '2024-09-16', '2024-10-15', '2024-11-15']]], [['regression: year rollover', {'first_due': [2024, 8, 15], 'count': 6, 'roll': 'modified_following', 'holidays': []}, ['2024-08-15', '2024-09-16', '2024-10-15', '2024-11-15', '2024-12-16', '2025-01-15']], ['control 1', {'first_due': [2023, 8, 1], 'count': 3, 'roll': 'following', 'holidays': []}, ['2023-08-01', '2023-09-01', '2023-10-02']], ['control 2', {'first_due': [2023, 2, 28], 'count': 3, 'roll': 'following', 'holidays': ['2023-12-25', '2024-05-31']}, ['2023-02-28', '2023-03-28', '2023-04-28']], ['control 3', {'first_due': [2024, 1, 5], 'count': 3, 'roll': 'none', 'holidays': ['2024-03-29', '2024-05-31']}, ['2024-01-05', '2024-02-05', '2024-03-05']], ['control 4', {'first_due': [2023, 4, 30], 'count': 3, 'roll': 'none', 'holidays': ['2023-06-30']}, ['2023-04-30', '2023-05-30', '2023-06-30']], ['control 5', {'first_due': [2023, 5, 30], 'count': 6, 'roll': 'modified_following', 'holidays': ['2024-01-01', '2024-03-29']}, ['2023-05-30', '2023-06-30', '2023-07-31', '2023-08-30', '2023-09-29', '2023-10-30']], ['control 6', {'first_due': [2023, 7, 5], 'count': 3, 'roll': 'following', 'holidays': ['2024-12-31', '2024-05-31']}, ['2023-07-05', '2023-08-07', '2023-09-05']]], [['regression: year rollover', {'first_due': [2023, 10, 30], 'count': 13, 'roll': 'none', 'holidays': ['2024-01-01', '2024-03-29']}, ['2023-10-30', '2023-11-30', '2023-12-30', '2024-01-30', '2024-02-29', '2024-03-30', '2024-04-30', '2024-05-30', '2024-06-30', '2024-07-30', '2024-08-30', '2024-09-30', '2024-10-30']], ['control 1', {'first_due': [2024, 1, 29], 'count': 6, 'roll': 'none', 'holidays': []}, ['2024-01-29', '2024-02-29', '2024-03-29', '2024-04-29', '2024-05-29', '2024-06-29']], ['control 2', {'first_due': [2024, 8, 5], 'count': 3, 'roll': 'modified_following', 'holidays': []}, ['2024-08-05', '2024-09-05', '2024-10-07']], ['control 3', {'first_due': [2023, 10, 28], 'count': 3, 'roll': 'following', 'holidays': ['2024-12-31']}, ['2023-10-30', '2023-11-28', '2023-12-28']], ['control 4', {'first_due': [2023, 6, 30], 'count': 6, 'roll': 'modified_following', 'holidays': []}, ['2023-06-30', '2023-07-31', '2023-08-30', '2023-09-29', '2023-10-30', '2023-11-30']], ['control 5', {'first_due': [2023, 1, 1], 'count': 3, 'roll': 'none', 'holidays': ['2024-12-31', '2024-02-29', '2024-01-01']}, ['2023-01-01', '2023-02-01', '2023-03-01']], ['control 6', {'first_due': [2023, 2, 15], 'count': 6, 'roll': 'none', 'holidays': ['2024-12-31']}, ['2023-02-15', '2023-03-15', '2023-04-15', '2023-05-15', '2023-06-15', '2023-07-15']]]]\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-due-date-calendar-year-rollover","generated_at":"2026-09-29T14:46:29.790041+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.","repair":"Derive the year from the zero-based absolute month.","root_cause":"The year offset counts installments instead of absolute months.","sha256":"ac525c0eaff438d475f90a05a1e3649b592dab0d0f988cd51465f921f0925f47","title":"Installment due date calendar: year rollover · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.815,"exit_code":1,"observations":[{"actual":["2023-09-01","2023-10-02","2023-11-01","2024-12-02","2024-01-01","2024-02-01","2024-03-01","2024-04-01","2024-05-01","2024-06-03","2024-07-01","2024-08-01","2024-09-02"],"check":"regression: year rollover","expected":["2023-09-01","2023-10-02","2023-11-01","2023-12-01","2024-01-01","2024-02-01","2024-03-01","2024-04-01","2024-05-01","2024-06-03","2024-07-01","2024-08-01","2024-09-02"],"passed":false},{"actual":["2024-02-05","2024-03-05","2024-04-05"],"check":"control 1","expected":["2024-02-05","2024-03-05","2024-04-05"],"passed":true},{"actual":["2023-08-15","2023-09-15","2023-10-16"],"check":"control 2","expected":["2023-08-15","2023-09-15","2023-10-16"],"passed":true},{"actual":["2023-03-31","2023-04-28","2023-05-31","2023-06-30","2023-07-31","2023-08-31"],"check":"control 3","expected":["2023-03-31","2023-04-28","2023-05-31","2023-06-30","2023-07-31","2023-08-31"],"passed":true},{"actual":["2024-03-15","2024-04-15","2024-05-15","2024-06-17","2024-07-15","2024-08-15"],"check":"control 4","expected":["2024-03-15","2024-04-15","2024-05-15","2024-06-17","2024-07-15","2024-08-15"],"passed":true},{"actual":["2024-02-29","2024-03-30","2024-04-30"],"check":"control 5","expected":["2024-02-29","2024-03-30","2024-04-30"],"passed":true},{"actual":["2023-06-15","2023-07-15","2023-08-15","2023-09-15","2023-10-15","2023-11-15"],"check":"control 6","expected":["2023-06-15","2023-07-15","2023-08-15","2023-09-15","2023-10-15","2023-11-15"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: year rollover\", \"actual\": [\"2023-09-01\", \"2023-10-02\", \"2023-11-01\", \"2024-12-02\", \"2024-01-01\", \"2024-02-01\", \"2024-03-01\", \"2024-04-01\", \"2024-05-01\", \"2024-06-03\", \"2024-07-01\", \"2024-08-01\", \"2024-09-02\"], \"expected\": [\"2023-09-01\", \"2023-10-02\", \"2023-11-01\", \"2023-12-01\", \"2024-01-01\", \"2024-02-01\", \"2024-03-01\", \"2024-04-01\", \"2024-05-01\", \"2024-06-03\", \"2024-07-01\", \"2024-08-01\", \"2024-09-02\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [\"2024-02-05\", \"2024-03-05\", \"2024-04-05\"], \"expected\": [\"2024-02-05\", \"2024-03-05\", \"2024-04-05\"], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [\"2023-08-15\", \"2023-09-15\", \"2023-10-16\"], \"expected\": [\"2023-08-15\", \"2023-09-15\", \"2023-10-16\"], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [\"2023-03-31\", \"2023-04-28\", \"2023-05-31\", \"2023-06-30\", \"2023-07-31\", \"2023-08-31\"], \"expected\": [\"2023-03-31\", \"2023-04-28\", \"2023-05-31\", \"2023-06-30\", \"2023-07-31\", \"2023-08-31\"], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [\"2024-03-15\", \"2024-04-15\", \"2024-05-15\", \"2024-06-17\", \"2024-07-15\", \"2024-08-15\"], \"expected\": [\"2024-03-15\", \"2024-04-15\", \"2024-05-15\", \"2024-06-17\", \"2024-07-15\", \"2024-08-15\"], \"passed\": true}, {\"check\": \"control 5\", \"actual\": [\"2024-02-29\", \"2024-03-30\", \"2024-04-30\"], \"expected\": [\"2024-02-29\", \"2024-03-30\", \"2024-04-30\"], \"passed\": true}, {\"check\": \"control 6\", \"actual\": [\"2023-06-15\", \"2023-07-15\", \"2023-08-15\", \"2023-09-15\", \"2023-10-15\", \"2023-11-15\"], \"expected\": [\"2023-06-15\", \"2023-07-15\", \"2023-08-15\", \"2023-09-15\", \"2023-10-15\", \"2023-11-15\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.956,"exit_code":1,"observations":[{"actual":["2023-09-01","2023-10-02","2023-11-01","2023-12-01","2023-01-02","2023-02-01","2023-03-01","2023-04-03","2023-05-01","2023-06-01","2023-07-03","2023-08-01","2024-09-02"],"check":"regression: year rollover","expected":["2023-09-01","2023-10-02","2023-11-01","2023-12-01","2024-01-01","2024-02-01","2024-03-01","2024-04-01","2024-05-01","2024-06-03","2024-07-01","2024-08-01","2024-09-02"],"passed":false},{"actual":["2024-02-05","2024-03-05","2024-04-05"],"check":"control 1","expected":["2024-02-05","2024-03-05","2024-04-05"],"passed":true},{"actual":["2023-08-15","2023-09-15","2023-10-16"],"check":"control 2","expected":["2023-08-15","2023-09-15","2023-10-16"],"passed":true},{"actual":["2023-03-31","2023-04-28","2023-05-31","2023-06-30","2023-07-31","2023-08-31"],"check":"control 3","expected":["2023-03-31","2023-04-28","2023-05-31","2023-06-30","2023-07-31","2023-08-31"],"passed":true},{"actual":["2024-03-15","2024-04-15","2024-05-15","2024-06-17","2024-07-15","2024-08-15"],"check":"control 4","expected":["2024-03-15","2024-04-15","2024-05-15","2024-06-17","2024-07-15","2024-08-15"],"passed":true},{"actual":["2024-02-29","2024-03-30","2024-04-30"],"check":"control 5","expected":["2024-02-29","2024-03-30","2024-04-30"],"passed":true},{"actual":["2023-06-15","2023-07-15","2023-08-15","2023-09-15","2023-10-15","2023-11-15"],"check":"control 6","expected":["2023-06-15","2023-07-15","2023-08-15","2023-09-15","2023-10-15","2023-11-15"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: year rollover\", \"actual\": [\"2023-09-01\", \"2023-10-02\", \"2023-11-01\", \"2023-12-01\", \"2023-01-02\", \"2023-02-01\", \"2023-03-01\", \"2023-04-03\", \"2023-05-01\", \"2023-06-01\", \"2023-07-03\", \"2023-08-01\", \"2024-09-02\"], \"expected\": [\"2023-09-01\", \"2023-10-02\", \"2023-11-01\", \"2023-12-01\", \"2024-01-01\", \"2024-02-01\", \"2024-03-01\", \"2024-04-01\", \"2024-05-01\", \"2024-06-03\", \"2024-07-01\", \"2024-08-01\", \"2024-09-02\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [\"2024-02-05\", \"2024-03-05\", \"2024-04-05\"], \"expected\": [\"2024-02-05\", \"2024-03-05\", \"2024-04-05\"], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [\"2023-08-15\", \"2023-09-15\", \"2023-10-16\"], \"expected\": [\"2023-08-15\", \"2023-09-15\", \"2023-10-16\"], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [\"2023-03-31\", \"2023-04-28\", \"2023-05-31\", \"2023-06-30\", \"2023-07-31\", \"2023-08-31\"], \"expected\": [\"2023-03-31\", \"2023-04-28\", \"2023-05-31\", \"2023-06-30\", \"2023-07-31\", \"2023-08-31\"], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [\"2024-03-15\", \"2024-04-15\", \"2024-05-15\", \"2024-06-17\", \"2024-07-15\", \"2024-08-15\"], \"expected\": [\"2024-03-15\", \"2024-04-15\", \"2024-05-15\", \"2024-06-17\", \"2024-07-15\", \"2024-08-15\"], \"passed\": true}, {\"check\": \"control 5\", \"actual\": [\"2024-02-29\", \"2024-03-30\", \"2024-04-30\"], \"expected\": [\"2024-02-29\", \"2024-03-30\", \"2024-04-30\"], \"passed\": true}, {\"check\": \"control 6\", \"actual\": [\"2023-06-15\", \"2023-07-15\", \"2023-08-15\", \"2023-09-15\", \"2023-10-15\", \"2023-11-15\"], \"expected\": [\"2023-06-15\", \"2023-07-15\", \"2023-08-15\", \"2023-09-15\", \"2023-10-15\", \"2023-11-15\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.366,"exit_code":0,"observations":[{"actual":["2023-09-01","2023-10-02","2023-11-01","2023-12-01","2024-01-01","2024-02-01","2024-03-01","2024-04-01","2024-05-01","2024-06-03","2024-07-01","2024-08-01","2024-09-02"],"check":"regression: year rollover","expected":["2023-09-01","2023-10-02","2023-11-01","2023-12-01","2024-01-01","2024-02-01","2024-03-01","2024-04-01","2024-05-01","2024-06-03","2024-07-01","2024-08-01","2024-09-02"],"passed":true},{"actual":["2024-02-05","2024-03-05","2024-04-05"],"check":"control 1","expected":["2024-02-05","2024-03-05","2024-04-05"],"passed":true},{"actual":["2023-08-15","2023-09-15","2023-10-16"],"check":"control 2","expected":["2023-08-15","2023-09-15","2023-10-16"],"passed":true},{"actual":["2023-03-31","2023-04-28","2023-05-31","2023-06-30","2023-07-31","2023-08-31"],"check":"control 3","expected":["2023-03-31","2023-04-28","2023-05-31","2023-06-30","2023-07-31","2023-08-31"],"passed":true},{"actual":["2024-03-15","2024-04-15","2024-05-15","2024-06-17","2024-07-15","2024-08-15"],"check":"control 4","expected":["2024-03-15","2024-04-15","2024-05-15","2024-06-17","2024-07-15","2024-08-15"],"passed":true},{"actual":["2024-02-29","2024-03-30","2024-04-30"],"check":"control 5","expected":["2024-02-29","2024-03-30","2024-04-30"],"passed":true},{"actual":["2023-06-15","2023-07-15","2023-08-15","2023-09-15","2023-10-15","2023-11-15"],"check":"control 6","expected":["2023-06-15","2023-07-15","2023-08-15","2023-09-15","2023-10-15","2023-11-15"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: year rollover\", \"actual\": [\"2023-09-01\", \"2023-10-02\", \"2023-11-01\", \"2023-12-01\", \"2024-01-01\", \"2024-02-01\", \"2024-03-01\", \"2024-04-01\", \"2024-05-01\", \"2024-06-03\", \"2024-07-01\", \"2024-08-01\", \"2024-09-02\"], \"expected\": [\"2023-09-01\", \"2023-10-02\", \"2023-11-01\", \"2023-12-01\", \"2024-01-01\", \"2024-02-01\", \"2024-03-01\", \"2024-04-01\", \"2024-05-01\", \"2024-06-03\", \"2024-07-01\", \"2024-08-01\", \"2024-09-02\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [\"2024-02-05\", \"2024-03-05\", \"2024-04-05\"], \"expected\": [\"2024-02-05\", \"2024-03-05\", \"2024-04-05\"], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [\"2023-08-15\", \"2023-09-15\", \"2023-10-16\"], \"expected\": [\"2023-08-15\", \"2023-09-15\", \"2023-10-16\"], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [\"2023-03-31\", \"2023-04-28\", \"2023-05-31\", \"2023-06-30\", \"2023-07-31\", \"2023-08-31\"], \"expected\": [\"2023-03-31\", \"2023-04-28\", \"2023-05-31\", \"2023-06-30\", \"2023-07-31\", \"2023-08-31\"], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [\"2024-03-15\", \"2024-04-15\", \"2024-05-15\", \"2024-06-17\", \"2024-07-15\", \"2024-08-15\"], \"expected\": [\"2024-03-15\", \"2024-04-15\", \"2024-05-15\", \"2024-06-17\", \"2024-07-15\", \"2024-08-15\"], \"passed\": true}, {\"check\": \"control 5\", \"actual\": [\"2024-02-29\", \"2024-03-30\", \"2024-04-30\"], \"expected\": [\"2024-02-29\", \"2024-03-30\", \"2024-04-30\"], \"passed\": true}, {\"check\": \"control 6\", \"actual\": [\"2023-06-15\", \"2023-07-15\", \"2023-08-15\", \"2023-09-15\", \"2023-10-15\", \"2023-11-15\"], \"expected\": [\"2023-06-15\", \"2023-07-15\", \"2023-08-15\", \"2023-09-15\", \"2023-10-15\", \"2023-11-15\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}