{"abstract":"Periods ending on the 31st are one day short.","category":"Bond day-count conventions","checks":8,"contract":"Inputs two dates [y,m,d]. If D1 is 31 it becomes 30. If D2 is 31 it becomes 1 and M2 increases by one (the formula absorbs a month 13). Return 360*(Y2-Y1)+30*(M2-M1)+(D2-D1).","evaluation_group":"w2-bond_day_count_conventions-thirty-e-plus-360","failed_approach":"Setting the day to 1 without advancing the month loses a whole month.","family":"w2-bond_day_count_conventions-thirty-e-plus-360-end-day-rollover","id":"FA-61231","implementations":{"attempt":{"sha256":"cefa6fae81888f8defbf3e552fa3d3b6e1e529c9459c450d1115eaf62b26b94c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    y1, m1, d1 = a\n    y2, m2, d2 = b\n    if d1 == 31:\n        d1 = 30\n    if d2 == 31:\n        d2 = 1\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 end day rollover 1', [[2033, 11, 1], [2034, 12, 31]], 420], ['regression end day rollover 2', [[2040, 10, 29], [2041, 12, 31]], 422], ['partial repair probe 1', [[2027, 5, 31], [2029, 5, 31]], 721], ['partial repair probe 2', [[2045, 10, 17], [2047, 10, 31]], 734], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2026, 2, 28], [2027, 6, 11]], 463], ['normal control 2', [[2052, 7, 31], [2054, 6, 11]], 671], ['normal control 3', [[2046, 9, 30], [2047, 12, 12]], 432]], [['regression end day rollover 1', [[2019, 2, 22], [2021, 10, 31]], 969], ['regression end day rollover 2', [[2033, 3, 31], [2033, 12, 31]], 271], ['partial repair probe 1', [[2034, 6, 30], [2036, 3, 31]], 631], ['partial repair probe 2', [[2042, 3, 31], [2043, 7, 31]], 481], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2046, 8, 29], [2048, 12, 9]], 820], ['normal control 2', [[2054, 6, 1], [2056, 11, 1]], 870], ['normal control 3', [[2013, 1, 30], [2013, 9, 27]], 237]], [['regression end day rollover 1', [[2002, 6, 30], [2003, 12, 31]], 541], ['regression end day rollover 2', [[2049, 11, 14], [2050, 8, 31]], 287], ['partial repair probe 1', [[2005, 10, 1], [2008, 5, 31]], 960], ['partial repair probe 2', [[2026, 4, 18], [2027, 5, 31]], 403], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2001, 1, 1], [2003, 6, 30]], 899], ['normal control 2', [[2021, 9, 28], [2021, 4, 30]], -148], ['normal control 3', [[2044, 4, 30], [2046, 8, 29]], 839]], [['regression end day rollover 1', [[2024, 1, 15], [2024, 1, 31]], 16], ['regression end day rollover 2', [[2006, 3, 18], [2006, 7, 31]], 133], ['partial repair probe 1', [[2038, 3, 31], [2039, 12, 31]], 631], ['partial repair probe 2', [[2049, 4, 30], [2051, 5, 31]], 751], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2029, 1, 1], [2030, 6, 22]], 531], ['normal control 2', [[2053, 3, 31], [2054, 2, 28]], 328], ['normal control 3', [[2026, 1, 13], [2027, 6, 2]], 499]], [['regression end day rollover 1', [[2003, 6, 30], [2003, 1, 31]], -149], ['regression end day rollover 2', [[2048, 9, 30], [2049, 3, 31]], 181], ['partial repair probe 1', [[2033, 1, 19], [2033, 1, 31]], 12], ['partial repair probe 2', [[2036, 1, 31], [2037, 3, 31]], 421], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2052, 1, 3], [2052, 11, 28]], 325], ['normal control 2', [[2012, 7, 31], [2013, 9, 30]], 420], ['normal control 3', [[2015, 2, 28], [2015, 9, 30]], 212]]]\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":"87bbe782a7c24a462a3a0b39996d155171255564a07e8509ed9b10c989b29716","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    y1, m1, d1 = a\n    y2, m2, d2 = b\n    if d1 == 31:\n        d1 = 30\n    if d2 == 31:\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 end day rollover 1', [[2033, 11, 1], [2034, 12, 31]], 420], ['regression end day rollover 2', [[2040, 10, 29], [2041, 12, 31]], 422], ['partial repair probe 1', [[2027, 5, 31], [2029, 5, 31]], 721], ['partial repair probe 2', [[2045, 10, 17], [2047, 10, 31]], 734], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2026, 2, 28], [2027, 6, 11]], 463], ['normal control 2', [[2052, 7, 31], [2054, 6, 11]], 671], ['normal control 3', [[2046, 9, 30], [2047, 12, 12]], 432]], [['regression end day rollover 1', [[2019, 2, 22], [2021, 10, 31]], 969], ['regression end day rollover 2', [[2033, 3, 31], [2033, 12, 31]], 271], ['partial repair probe 1', [[2034, 6, 30], [2036, 3, 31]], 631], ['partial repair probe 2', [[2042, 3, 31], [2043, 7, 31]], 481], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2046, 8, 29], [2048, 12, 9]], 820], ['normal control 2', [[2054, 6, 1], [2056, 11, 1]], 870], ['normal control 3', [[2013, 1, 30], [2013, 9, 27]], 237]], [['regression end day rollover 1', [[2002, 6, 30], [2003, 12, 31]], 541], ['regression end day rollover 2', [[2049, 11, 14], [2050, 8, 31]], 287], ['partial repair probe 1', [[2005, 10, 1], [2008, 5, 31]], 960], ['partial repair probe 2', [[2026, 4, 18], [2027, 5, 31]], 403], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2001, 1, 1], [2003, 6, 30]], 899], ['normal control 2', [[2021, 9, 28], [2021, 4, 30]], -148], ['normal control 3', [[2044, 4, 30], [2046, 8, 29]], 839]], [['regression end day rollover 1', [[2024, 1, 15], [2024, 1, 31]], 16], ['regression end day rollover 2', [[2006, 3, 18], [2006, 7, 31]], 133], ['partial repair probe 1', [[2038, 3, 31], [2039, 12, 31]], 631], ['partial repair probe 2', [[2049, 4, 30], [2051, 5, 31]], 751], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2029, 1, 1], [2030, 6, 22]], 531], ['normal control 2', [[2053, 3, 31], [2054, 2, 28]], 328], ['normal control 3', [[2026, 1, 13], [2027, 6, 2]], 499]], [['regression end day rollover 1', [[2003, 6, 30], [2003, 1, 31]], -149], ['regression end day rollover 2', [[2048, 9, 30], [2049, 3, 31]], 181], ['partial repair probe 1', [[2033, 1, 19], [2033, 1, 31]], 12], ['partial repair probe 2', [[2036, 1, 31], [2037, 3, 31]], 421], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2052, 1, 3], [2052, 11, 28]], 325], ['normal control 2', [[2012, 7, 31], [2013, 9, 30]], 420], ['normal control 3', [[2015, 2, 28], [2015, 9, 30]], 212]]]\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":"cb3ae5d7ecf89ce0995e21911d9fe7925e3b4fdfd9e3b26f4ada70fe6f0581bc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(a, b):\n    y1, m1, d1 = a\n    y2, m2, d2 = b\n    if d1 == 31:\n        d1 = 30\n    if d2 == 31:\n        d2 = 1\n        m2 += 1\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 end day rollover 1', [[2033, 11, 1], [2034, 12, 31]], 420], ['regression end day rollover 2', [[2040, 10, 29], [2041, 12, 31]], 422], ['partial repair probe 1', [[2027, 5, 31], [2029, 5, 31]], 721], ['partial repair probe 2', [[2045, 10, 17], [2047, 10, 31]], 734], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2026, 2, 28], [2027, 6, 11]], 463], ['normal control 2', [[2052, 7, 31], [2054, 6, 11]], 671], ['normal control 3', [[2046, 9, 30], [2047, 12, 12]], 432]], [['regression end day rollover 1', [[2019, 2, 22], [2021, 10, 31]], 969], ['regression end day rollover 2', [[2033, 3, 31], [2033, 12, 31]], 271], ['partial repair probe 1', [[2034, 6, 30], [2036, 3, 31]], 631], ['partial repair probe 2', [[2042, 3, 31], [2043, 7, 31]], 481], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2046, 8, 29], [2048, 12, 9]], 820], ['normal control 2', [[2054, 6, 1], [2056, 11, 1]], 870], ['normal control 3', [[2013, 1, 30], [2013, 9, 27]], 237]], [['regression end day rollover 1', [[2002, 6, 30], [2003, 12, 31]], 541], ['regression end day rollover 2', [[2049, 11, 14], [2050, 8, 31]], 287], ['partial repair probe 1', [[2005, 10, 1], [2008, 5, 31]], 960], ['partial repair probe 2', [[2026, 4, 18], [2027, 5, 31]], 403], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2001, 1, 1], [2003, 6, 30]], 899], ['normal control 2', [[2021, 9, 28], [2021, 4, 30]], -148], ['normal control 3', [[2044, 4, 30], [2046, 8, 29]], 839]], [['regression end day rollover 1', [[2024, 1, 15], [2024, 1, 31]], 16], ['regression end day rollover 2', [[2006, 3, 18], [2006, 7, 31]], 133], ['partial repair probe 1', [[2038, 3, 31], [2039, 12, 31]], 631], ['partial repair probe 2', [[2049, 4, 30], [2051, 5, 31]], 751], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2029, 1, 1], [2030, 6, 22]], 531], ['normal control 2', [[2053, 3, 31], [2054, 2, 28]], 328], ['normal control 3', [[2026, 1, 13], [2027, 6, 2]], 499]], [['regression end day rollover 1', [[2003, 6, 30], [2003, 1, 31]], -149], ['regression end day rollover 2', [[2048, 9, 30], [2049, 3, 31]], 181], ['partial repair probe 1', [[2033, 1, 19], [2033, 1, 31]], 12], ['partial repair probe 2', [[2036, 1, 31], [2037, 3, 31]], 421], ['boundary control 1', [[2024, 2, 29], [2024, 3, 30]], 31], ['normal control 1', [[2052, 1, 3], [2052, 11, 28]], 325], ['normal control 2', [[2012, 7, 31], [2013, 9, 30]], 420], ['normal control 3', [[2015, 2, 28], [2015, 9, 30]], 212]]]\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-plus-360-end-day-rollover","generated_at":"2026-09-29T14:46:53.296228+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":"Map D2=31 to day 1 of the following month.","root_cause":"The end-day rule was copied from 30E/360 and clamps to 30 instead of rolling to the 1st of the next month.","sha256":"635a57d2264af4538cb4b40ee792baca510af427cf6d02e65f41bbbdffd6427b","title":"30E+/360 end-of-month rollover: an end on the 31st is clamped to 30 like 30E/360 · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.668,"exit_code":1,"observations":[{"actual":390,"check":"regression end day rollover 1","expected":420,"passed":false},{"actual":392,"check":"regression end day rollover 2","expected":422,"passed":false},{"actual":691,"check":"partial repair probe 1","expected":721,"passed":false},{"actual":704,"check":"partial repair probe 2","expected":734,"passed":false},{"actual":31,"check":"boundary control 1","expected":31,"passed":true},{"actual":463,"check":"normal control 1","expected":463,"passed":true},{"actual":671,"check":"normal control 2","expected":671,"passed":true},{"actual":432,"check":"normal control 3","expected":432,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression end day rollover 1\", \"actual\": 390, \"expected\": 420, \"passed\": false}, {\"check\": \"regression end day rollover 2\", \"actual\": 392, \"expected\": 422, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 691, \"expected\": 721, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 704, \"expected\": 734, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 31, \"expected\": 31, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 463, \"expected\": 463, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 671, \"expected\": 671, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": 432, \"expected\": 432, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.867,"exit_code":1,"observations":[{"actual":419,"check":"regression end day rollover 1","expected":420,"passed":false},{"actual":421,"check":"regression end day rollover 2","expected":422,"passed":false},{"actual":720,"check":"partial repair probe 1","expected":721,"passed":false},{"actual":733,"check":"partial repair probe 2","expected":734,"passed":false},{"actual":31,"check":"boundary control 1","expected":31,"passed":true},{"actual":463,"check":"normal control 1","expected":463,"passed":true},{"actual":671,"check":"normal control 2","expected":671,"passed":true},{"actual":432,"check":"normal control 3","expected":432,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression end day rollover 1\", \"actual\": 419, \"expected\": 420, \"passed\": false}, {\"check\": \"regression end day rollover 2\", \"actual\": 421, \"expected\": 422, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 720, \"expected\": 721, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 733, \"expected\": 734, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 31, \"expected\": 31, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 463, \"expected\": 463, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 671, \"expected\": 671, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": 432, \"expected\": 432, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.312,"exit_code":0,"observations":[{"actual":420,"check":"regression end day rollover 1","expected":420,"passed":true},{"actual":422,"check":"regression end day rollover 2","expected":422,"passed":true},{"actual":721,"check":"partial repair probe 1","expected":721,"passed":true},{"actual":734,"check":"partial repair probe 2","expected":734,"passed":true},{"actual":31,"check":"boundary control 1","expected":31,"passed":true},{"actual":463,"check":"normal control 1","expected":463,"passed":true},{"actual":671,"check":"normal control 2","expected":671,"passed":true},{"actual":432,"check":"normal control 3","expected":432,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression end day rollover 1\", \"actual\": 420, \"expected\": 420, \"passed\": true}, {\"check\": \"regression end day rollover 2\", \"actual\": 422, \"expected\": 422, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 721, \"expected\": 721, \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": 734, \"expected\": 734, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 31, \"expected\": 31, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 463, \"expected\": 463, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 671, \"expected\": 671, \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": 432, \"expected\": 432, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}