{"abstract":"A period starting at the end of February accrues from day 28 or 29 instead of day 30.","category":"Bond day-count conventions","checks":8,"contract":"Inputs: start, end and maturity dates as [y,m,d]. D1 becomes 30 if the start is the last day of its month. D2 becomes 30 if the end is the last day of its month, unless the end date equals the maturity date and falls in February. Return 360*(Y2-Y1)+30*(M2-M1)+(D2-D1).","evaluation_group":"w2-bond_day_count_conventions-thirty-e-360-isda","failed_approach":"Promoting any start of 30 or later still misses February month ends.","family":"w2-bond_day_count_conventions-thirty-e-360-isda-start-month-end-test","id":"FA-60881","implementations":{"attempt":{"sha256":"3d27b614ee3613cf4a8d525326981cfdcd3be201551393d43b0cb494ee007ef6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b, mat):\n    y1, m1, d1 = a\n    y2, m2, d2 = b\n    def last(y, m):\n        if m == 2:\n            return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28\n        return 30 if m in (4, 6, 9, 11) else 31\n    if d1 >= 30:\n        d1 = 30\n    if d2 == last(y2, m2) and not (list(b) == list(mat) and m2 == 2):\n        d2 = 30\n    return 360 * (y2 - y1) + 30 * (m2 - m1) + (d2 - d1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression start month-end test 1', [[2100, 2, 28], [2100, 5, 31], [2101, 8, 31]], 90], ['regression start month-end test 2', [[2100, 2, 28], [2100, 5, 30], [2102, 2, 28]], 90], ['partial repair probe 1', [[2100, 2, 28], [2100, 12, 31], [2106, 6, 30]], 300], ['partial repair probe 2', [[2100, 2, 28], [2100, 12, 30], [2103, 12, 31]], 300], ['boundary control 1', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['boundary control 2', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['normal control 1', [[2076, 5, 31], [2077, 4, 22], [2077, 4, 22]], 322], ['normal control 2', [[2046, 3, 29], [2046, 8, 23], [2047, 7, 31]], 144]], [['regression start month-end test 1', [[2061, 2, 28], [2063, 7, 31], [2065, 2, 28]], 870], ['regression start month-end test 2', [[2073, 2, 28], [2080, 9, 28], [2080, 9, 28]], 2728], ['partial repair probe 1', [[2085, 2, 28], [2088, 2, 28], [2088, 2, 28]], 1078], ['partial repair probe 2', [[2100, 2, 28], [2100, 8, 30], [2104, 10, 2]], 180], ['boundary control 1', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2024, 2, 29]], 179], ['normal control 1', [[2050, 6, 22], [2051, 4, 20], [2053, 7, 30]], 298], ['normal control 2', [[2029, 4, 1], [2032, 2, 29], [2035, 2, 28]], 1049]], [['regression start month-end test 1', [[2100, 2, 28], [2100, 8, 30], [2102, 11, 13]], 180], ['regression start month-end test 2', [[2100, 2, 28], [2100, 5, 15], [2105, 3, 29]], 75], ['partial repair probe 1', [[2060, 2, 29], [2063, 12, 4], [2063, 12, 4]], 1354], ['partial repair probe 2', [[2100, 2, 28], [2100, 5, 15], [2102, 12, 31]], 75], ['boundary control 1', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['boundary control 2', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['normal control 1', [[2000, 7, 30], [2004, 2, 29], [2006, 12, 31]], 1290], ['normal control 2', [[1999, 7, 31], [2001, 2, 28], [2006, 2, 28]], 570]], [['regression start month-end test 1', [[2100, 2, 28], [2100, 12, 15], [2102, 1, 16]], 285], ['regression start month-end test 2', [[2100, 2, 28], [2100, 8, 15], [2100, 8, 20]], 165], ['partial repair probe 1', [[2005, 2, 28], [2010, 2, 28], [2013, 5, 8]], 1800], ['partial repair probe 2', [[2098, 2, 28], [2098, 8, 30], [2105, 9, 28]], 180], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2024, 2, 29]], 179], ['normal control 1', [[2037, 4, 10], [2040, 10, 30], [2040, 10, 30]], 1280], ['normal control 2', [[2041, 7, 30], [2046, 1, 31], [2046, 1, 31]], 1620]], [['regression start month-end test 1', [[2100, 2, 28], [2100, 8, 15], [2105, 8, 5]], 165], ['regression start month-end test 2', [[2047, 2, 28], [2048, 5, 30], [2048, 5, 30]], 450], ['partial repair probe 1', [[2100, 2, 28], [2100, 8, 31], [2106, 5, 21]], 180], ['partial repair probe 2', [[2100, 2, 28], [2100, 8, 31], [2106, 4, 30]], 180], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['normal control 1', [[2016, 6, 30], [2019, 2, 28], [2019, 2, 28]], 958], ['normal control 2', [[2040, 10, 31], [2048, 3, 28], [2048, 3, 28]], 2668]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), 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":"265b16b566eec7c3eb73e763e14dc615c9f0dbc4a9a877582f12451e873e010c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b, mat):\n    y1, m1, d1 = a\n    y2, m2, d2 = b\n    def last(y, m):\n        if m == 2:\n            return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28\n        return 30 if m in (4, 6, 9, 11) else 31\n    if d1 == 31:\n        d1 = 30\n    if d2 == last(y2, m2) and not (list(b) == list(mat) and m2 == 2):\n        d2 = 30\n    return 360 * (y2 - y1) + 30 * (m2 - m1) + (d2 - d1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression start month-end test 1', [[2100, 2, 28], [2100, 5, 31], [2101, 8, 31]], 90], ['regression start month-end test 2', [[2100, 2, 28], [2100, 5, 30], [2102, 2, 28]], 90], ['partial repair probe 1', [[2100, 2, 28], [2100, 12, 31], [2106, 6, 30]], 300], ['partial repair probe 2', [[2100, 2, 28], [2100, 12, 30], [2103, 12, 31]], 300], ['boundary control 1', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['boundary control 2', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['normal control 1', [[2076, 5, 31], [2077, 4, 22], [2077, 4, 22]], 322], ['normal control 2', [[2046, 3, 29], [2046, 8, 23], [2047, 7, 31]], 144]], [['regression start month-end test 1', [[2061, 2, 28], [2063, 7, 31], [2065, 2, 28]], 870], ['regression start month-end test 2', [[2073, 2, 28], [2080, 9, 28], [2080, 9, 28]], 2728], ['partial repair probe 1', [[2085, 2, 28], [2088, 2, 28], [2088, 2, 28]], 1078], ['partial repair probe 2', [[2100, 2, 28], [2100, 8, 30], [2104, 10, 2]], 180], ['boundary control 1', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2024, 2, 29]], 179], ['normal control 1', [[2050, 6, 22], [2051, 4, 20], [2053, 7, 30]], 298], ['normal control 2', [[2029, 4, 1], [2032, 2, 29], [2035, 2, 28]], 1049]], [['regression start month-end test 1', [[2100, 2, 28], [2100, 8, 30], [2102, 11, 13]], 180], ['regression start month-end test 2', [[2100, 2, 28], [2100, 5, 15], [2105, 3, 29]], 75], ['partial repair probe 1', [[2060, 2, 29], [2063, 12, 4], [2063, 12, 4]], 1354], ['partial repair probe 2', [[2100, 2, 28], [2100, 5, 15], [2102, 12, 31]], 75], ['boundary control 1', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['boundary control 2', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['normal control 1', [[2000, 7, 30], [2004, 2, 29], [2006, 12, 31]], 1290], ['normal control 2', [[1999, 7, 31], [2001, 2, 28], [2006, 2, 28]], 570]], [['regression start month-end test 1', [[2100, 2, 28], [2100, 12, 15], [2102, 1, 16]], 285], ['regression start month-end test 2', [[2100, 2, 28], [2100, 8, 15], [2100, 8, 20]], 165], ['partial repair probe 1', [[2005, 2, 28], [2010, 2, 28], [2013, 5, 8]], 1800], ['partial repair probe 2', [[2098, 2, 28], [2098, 8, 30], [2105, 9, 28]], 180], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2024, 2, 29]], 179], ['normal control 1', [[2037, 4, 10], [2040, 10, 30], [2040, 10, 30]], 1280], ['normal control 2', [[2041, 7, 30], [2046, 1, 31], [2046, 1, 31]], 1620]], [['regression start month-end test 1', [[2100, 2, 28], [2100, 8, 15], [2105, 8, 5]], 165], ['regression start month-end test 2', [[2047, 2, 28], [2048, 5, 30], [2048, 5, 30]], 450], ['partial repair probe 1', [[2100, 2, 28], [2100, 8, 31], [2106, 5, 21]], 180], ['partial repair probe 2', [[2100, 2, 28], [2100, 8, 31], [2106, 4, 30]], 180], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['normal control 1', [[2016, 6, 30], [2019, 2, 28], [2019, 2, 28]], 958], ['normal control 2', [[2040, 10, 31], [2048, 3, 28], [2048, 3, 28]], 2668]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), 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":"33cd0e79c303b8e28f55bedec0e7222a72521b3a4dd7203ffc8adcb3517c6f72","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b, mat):\n    y1, m1, d1 = a\n    y2, m2, d2 = b\n    def last(y, m):\n        if m == 2:\n            return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28\n        return 30 if m in (4, 6, 9, 11) else 31\n    if d1 == last(y1, m1):\n        d1 = 30\n    if d2 == last(y2, m2) and not (list(b) == list(mat) and m2 == 2):\n        d2 = 30\n    return 360 * (y2 - y1) + 30 * (m2 - m1) + (d2 - d1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression start month-end test 1', [[2100, 2, 28], [2100, 5, 31], [2101, 8, 31]], 90], ['regression start month-end test 2', [[2100, 2, 28], [2100, 5, 30], [2102, 2, 28]], 90], ['partial repair probe 1', [[2100, 2, 28], [2100, 12, 31], [2106, 6, 30]], 300], ['partial repair probe 2', [[2100, 2, 28], [2100, 12, 30], [2103, 12, 31]], 300], ['boundary control 1', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['boundary control 2', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['normal control 1', [[2076, 5, 31], [2077, 4, 22], [2077, 4, 22]], 322], ['normal control 2', [[2046, 3, 29], [2046, 8, 23], [2047, 7, 31]], 144]], [['regression start month-end test 1', [[2061, 2, 28], [2063, 7, 31], [2065, 2, 28]], 870], ['regression start month-end test 2', [[2073, 2, 28], [2080, 9, 28], [2080, 9, 28]], 2728], ['partial repair probe 1', [[2085, 2, 28], [2088, 2, 28], [2088, 2, 28]], 1078], ['partial repair probe 2', [[2100, 2, 28], [2100, 8, 30], [2104, 10, 2]], 180], ['boundary control 1', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2024, 2, 29]], 179], ['normal control 1', [[2050, 6, 22], [2051, 4, 20], [2053, 7, 30]], 298], ['normal control 2', [[2029, 4, 1], [2032, 2, 29], [2035, 2, 28]], 1049]], [['regression start month-end test 1', [[2100, 2, 28], [2100, 8, 30], [2102, 11, 13]], 180], ['regression start month-end test 2', [[2100, 2, 28], [2100, 5, 15], [2105, 3, 29]], 75], ['partial repair probe 1', [[2060, 2, 29], [2063, 12, 4], [2063, 12, 4]], 1354], ['partial repair probe 2', [[2100, 2, 28], [2100, 5, 15], [2102, 12, 31]], 75], ['boundary control 1', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['boundary control 2', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['normal control 1', [[2000, 7, 30], [2004, 2, 29], [2006, 12, 31]], 1290], ['normal control 2', [[1999, 7, 31], [2001, 2, 28], [2006, 2, 28]], 570]], [['regression start month-end test 1', [[2100, 2, 28], [2100, 12, 15], [2102, 1, 16]], 285], ['regression start month-end test 2', [[2100, 2, 28], [2100, 8, 15], [2100, 8, 20]], 165], ['partial repair probe 1', [[2005, 2, 28], [2010, 2, 28], [2013, 5, 8]], 1800], ['partial repair probe 2', [[2098, 2, 28], [2098, 8, 30], [2105, 9, 28]], 180], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2024, 2, 29]], 179], ['normal control 1', [[2037, 4, 10], [2040, 10, 30], [2040, 10, 30]], 1280], ['normal control 2', [[2041, 7, 30], [2046, 1, 31], [2046, 1, 31]], 1620]], [['regression start month-end test 1', [[2100, 2, 28], [2100, 8, 15], [2105, 8, 5]], 165], ['regression start month-end test 2', [[2047, 2, 28], [2048, 5, 30], [2048, 5, 30]], 450], ['partial repair probe 1', [[2100, 2, 28], [2100, 8, 31], [2106, 5, 21]], 180], ['partial repair probe 2', [[2100, 2, 28], [2100, 8, 31], [2106, 4, 30]], 180], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['normal control 1', [[2016, 6, 30], [2019, 2, 28], [2019, 2, 28]], 958], ['normal control 2', [[2040, 10, 31], [2048, 3, 28], [2048, 3, 28]], 2668]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), 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 toy contract stated explicitly in the contract field; no claim of conformance to any published convention text. 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-bond_day_count_conventions-thirty-e-360-isda-start-month-end-test","generated_at":"2026-09-29T14:46:49.849954+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Bond accrual and pricing systems depend on exact day-count arithmetic; a single-day error changes settlement cash.","repair":"Promote D1 whenever the start is the last day of its month.","root_cause":"The start-date rule was copied from 30/360 and only checks for day 31.","sha256":"3d6d9a7a0c4705c360e352116b4073452b71d7ab34c940db7c51a4a150470076","title":"30E/360 ISDA with maturity exemption: only a start on the 31st is promoted · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.696,"exit_code":1,"observations":[{"actual":92,"check":"regression start month-end test 1","expected":90,"passed":false},{"actual":92,"check":"regression start month-end test 2","expected":90,"passed":false},{"actual":302,"check":"partial repair probe 1","expected":300,"passed":false},{"actual":302,"check":"partial repair probe 2","expected":300,"passed":false},{"actual":180,"check":"boundary control 1","expected":180,"passed":true},{"actual":180,"check":"boundary control 2","expected":180,"passed":true},{"actual":322,"check":"normal control 1","expected":322,"passed":true},{"actual":144,"check":"normal control 2","expected":144,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression start month-end test 1\", \"actual\": 92, \"expected\": 90, \"passed\": false}, {\"check\": \"regression start month-end test 2\", \"actual\": 92, \"expected\": 90, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 302, \"expected\": 300, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 302, \"expected\": 300, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 180, \"expected\": 180, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 180, \"expected\": 180, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 322, \"expected\": 322, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 144, \"expected\": 144, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.31,"exit_code":1,"observations":[{"actual":92,"check":"regression start month-end test 1","expected":90,"passed":false},{"actual":92,"check":"regression start month-end test 2","expected":90,"passed":false},{"actual":302,"check":"partial repair probe 1","expected":300,"passed":false},{"actual":302,"check":"partial repair probe 2","expected":300,"passed":false},{"actual":180,"check":"boundary control 1","expected":180,"passed":true},{"actual":180,"check":"boundary control 2","expected":180,"passed":true},{"actual":322,"check":"normal control 1","expected":322,"passed":true},{"actual":144,"check":"normal control 2","expected":144,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression start month-end test 1\", \"actual\": 92, \"expected\": 90, \"passed\": false}, {\"check\": \"regression start month-end test 2\", \"actual\": 92, \"expected\": 90, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 302, \"expected\": 300, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 302, \"expected\": 300, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 180, \"expected\": 180, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 180, \"expected\": 180, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 322, \"expected\": 322, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 144, \"expected\": 144, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.726,"exit_code":0,"observations":[{"actual":90,"check":"regression start month-end test 1","expected":90,"passed":true},{"actual":90,"check":"regression start month-end test 2","expected":90,"passed":true},{"actual":300,"check":"partial repair probe 1","expected":300,"passed":true},{"actual":300,"check":"partial repair probe 2","expected":300,"passed":true},{"actual":180,"check":"boundary control 1","expected":180,"passed":true},{"actual":180,"check":"boundary control 2","expected":180,"passed":true},{"actual":322,"check":"normal control 1","expected":322,"passed":true},{"actual":144,"check":"normal control 2","expected":144,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression start month-end test 1\", \"actual\": 90, \"expected\": 90, \"passed\": true}, {\"check\": \"regression start month-end test 2\", \"actual\": 90, \"expected\": 90, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 300, \"expected\": 300, \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": 300, \"expected\": 300, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 180, \"expected\": 180, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 180, \"expected\": 180, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 322, \"expected\": 322, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 144, \"expected\": 144, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}