{"abstract":"A span from March of a leap year to its December loses a day that it never contained.","category":"Bond day-count conventions","checks":8,"contract":"Inputs start and end [y,m,d]. If end < start return \"end before start\". Days are actual days minus the number of 29 February dates lying in (start, end]. Return [days, days/365 rounded to 9 decimals].","contract_signature":"a, b","evaluation_group":"w2-bond_day_count_conventions-no-leap-365","failed_approach":"Excluding a start year that begins after February still counts end years that stop before 29 February.","family":"w2-bond_day_count_conventions-no-leap-365-leap-day-window-test","id":"FA-61041","implementations":{"attempt":{"sha256":"d6a6a04f767032ff17e546d25e21bdcbb57e7485421a8f6b2b21686b76769f55","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b):\n    A = datetime.date(*a)\n    B = datetime.date(*b)\n    if B < A:\n        return 'end before start'\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    leapdays = sum(1 for y in range(A.year, B.year + 1) if leap(y) and (y != A.year or A.month <= 2))\n    days = (B - A).days - leapdays\n    return [days, round(days / 365, 9)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression leap day window test 1', [[1896, 3, 28], [1904, 9, 2]], [3078, 8.432876712]], ['regression leap day window test 2', [[2104, 12, 20], [2113, 10, 18]], [3222, 8.82739726]], ['partial repair probe 1', [[2104, 2, 1], [2104, 2, 6]], [5, 0.01369863]], ['partial repair probe 2', [[2014, 8, 28], [2020, 1, 19]], [1969, 5.394520548]], ['boundary control 1', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['normal control 1', [[2020, 1, 28], [2029, 1, 29]], [3286, 9.002739726]], ['normal control 2', [[2103, 5, 31], [2105, 10, 19]], [871, 2.38630137]]], [['regression leap day window test 1', [[2059, 6, 6], [2064, 2, 6]], [1705, 4.671232877]], ['regression leap day window test 2', [[2044, 4, 23], [2054, 6, 24]], [3712, 10.169863014]], ['partial repair probe 1', [[1915, 3, 28], [1916, 1, 18]], [296, 0.810958904]], ['partial repair probe 2', [[2104, 3, 28], [2112, 1, 31]], [2864, 7.846575342]], ['boundary control 1', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['normal control 1', [[1896, 1, 1], [1896, 11, 2]], [305, 0.835616438]], ['normal control 2', [[1953, 1, 30], [1953, 6, 14]], [135, 0.369863014]]], [['regression leap day window test 1', [[2000, 3, 28], [2001, 1, 19]], [297, 0.81369863]], ['regression leap day window test 2', [[2084, 4, 30], [2084, 8, 19]], [111, 0.304109589]], ['partial repair probe 1', [[1896, 1, 28], [1896, 1, 31]], [3, 0.008219178]], ['partial repair probe 2', [[1922, 11, 30], [1932, 1, 20]], [3336, 9.139726027]], ['boundary control 1', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['normal control 1', [[1922, 7, 28], [1923, 4, 8]], [254, 0.695890411]], ['normal control 2', [[1999, 3, 30], [2007, 11, 14]], [3149, 8.62739726]]], [['regression leap day window test 1', [[2092, 11, 29], [2103, 4, 4]], [3776, 10.345205479]], ['regression leap day window test 2', [[1904, 3, 15], [1905, 3, 6]], [356, 0.975342466]], ['partial repair probe 1', [[2030, 3, 11], [2032, 1, 26]], [686, 1.879452055]], ['partial repair probe 2', [[2104, 1, 1], [2104, 2, 25]], [55, 0.150684932]], ['boundary control 1', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['normal control 1', [[1896, 1, 30], [1905, 9, 28]], [3526, 9.660273973]], ['normal control 2', [[2019, 7, 15], [2023, 12, 30]], [1628, 4.460273973]]], [['regression leap day window test 1', [[1896, 3, 1], [1896, 6, 17]], [108, 0.295890411]], ['regression leap day window test 2', [[2104, 3, 15], [2113, 6, 25]], [3387, 9.279452055]], ['partial repair probe 1', [[2020, 1, 1], [2020, 1, 1]], [0, 0.0]], ['partial repair probe 2', [[2038, 4, 26], [2048, 1, 28]], [3562, 9.75890411]], ['boundary control 1', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['boundary control 2', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['normal control 1', [[2021, 8, 31], [2022, 3, 7]], [188, 0.515068493]], ['normal control 2', [[2028, 2, 1], [2029, 1, 9]], [342, 0.936986301]]]]\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":"c2a45546e2aeab1da4353dec7f5becabc5ecc25dce59620f97b709e51402aa20","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b):\n    A = datetime.date(*a)\n    B = datetime.date(*b)\n    if B < A:\n        return 'end before start'\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    leapdays = sum(1 for y in range(A.year, B.year + 1) if leap(y))\n    days = (B - A).days - leapdays\n    return [days, round(days / 365, 9)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression leap day window test 1', [[1896, 3, 28], [1904, 9, 2]], [3078, 8.432876712]], ['regression leap day window test 2', [[2104, 12, 20], [2113, 10, 18]], [3222, 8.82739726]], ['partial repair probe 1', [[2104, 2, 1], [2104, 2, 6]], [5, 0.01369863]], ['partial repair probe 2', [[2014, 8, 28], [2020, 1, 19]], [1969, 5.394520548]], ['boundary control 1', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['normal control 1', [[2020, 1, 28], [2029, 1, 29]], [3286, 9.002739726]], ['normal control 2', [[2103, 5, 31], [2105, 10, 19]], [871, 2.38630137]]], [['regression leap day window test 1', [[2059, 6, 6], [2064, 2, 6]], [1705, 4.671232877]], ['regression leap day window test 2', [[2044, 4, 23], [2054, 6, 24]], [3712, 10.169863014]], ['partial repair probe 1', [[1915, 3, 28], [1916, 1, 18]], [296, 0.810958904]], ['partial repair probe 2', [[2104, 3, 28], [2112, 1, 31]], [2864, 7.846575342]], ['boundary control 1', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['normal control 1', [[1896, 1, 1], [1896, 11, 2]], [305, 0.835616438]], ['normal control 2', [[1953, 1, 30], [1953, 6, 14]], [135, 0.369863014]]], [['regression leap day window test 1', [[2000, 3, 28], [2001, 1, 19]], [297, 0.81369863]], ['regression leap day window test 2', [[2084, 4, 30], [2084, 8, 19]], [111, 0.304109589]], ['partial repair probe 1', [[1896, 1, 28], [1896, 1, 31]], [3, 0.008219178]], ['partial repair probe 2', [[1922, 11, 30], [1932, 1, 20]], [3336, 9.139726027]], ['boundary control 1', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['normal control 1', [[1922, 7, 28], [1923, 4, 8]], [254, 0.695890411]], ['normal control 2', [[1999, 3, 30], [2007, 11, 14]], [3149, 8.62739726]]], [['regression leap day window test 1', [[2092, 11, 29], [2103, 4, 4]], [3776, 10.345205479]], ['regression leap day window test 2', [[1904, 3, 15], [1905, 3, 6]], [356, 0.975342466]], ['partial repair probe 1', [[2030, 3, 11], [2032, 1, 26]], [686, 1.879452055]], ['partial repair probe 2', [[2104, 1, 1], [2104, 2, 25]], [55, 0.150684932]], ['boundary control 1', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['normal control 1', [[1896, 1, 30], [1905, 9, 28]], [3526, 9.660273973]], ['normal control 2', [[2019, 7, 15], [2023, 12, 30]], [1628, 4.460273973]]], [['regression leap day window test 1', [[1896, 3, 1], [1896, 6, 17]], [108, 0.295890411]], ['regression leap day window test 2', [[2104, 3, 15], [2113, 6, 25]], [3387, 9.279452055]], ['partial repair probe 1', [[2020, 1, 1], [2020, 1, 1]], [0, 0.0]], ['partial repair probe 2', [[2038, 4, 26], [2048, 1, 28]], [3562, 9.75890411]], ['boundary control 1', [[2023, 2, 28], [2024, 2, 29]], [365, 1.0]], ['boundary control 2', [[2099, 1, 1], [2101, 1, 1]], [730, 2.0]], ['normal control 1', [[2021, 8, 31], [2022, 3, 7]], [188, 0.515068493]], ['normal control 2', [[2028, 2, 1], [2029, 1, 9]], [342, 0.936986301]]]]\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-no-leap-365-leap-day-window-test","generated_at":"2026-09-29T14:46:51.417202+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.","root_cause":"The adjustment counts leap years in the year range without checking that 29 February is inside the interval.","sha256":"bdf8d93dc5f08a100cbee4e7d403ca533956dbb6be4514cf1e8fd4fbd9c041da","title":"NL/365 no-leap day count: every leap year touched by the span removes a day · 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":47.836,"exit_code":1,"observations":[{"actual":[3078,8.432876712],"check":"regression leap day window test 1","expected":[3078,8.432876712],"passed":true},{"actual":[3222,8.82739726],"check":"regression leap day window test 2","expected":[3222,8.82739726],"passed":true},{"actual":[4,0.010958904],"check":"partial repair probe 1","expected":[5,0.01369863],"passed":false},{"actual":[1968,5.391780822],"check":"partial repair probe 2","expected":[1969,5.394520548],"passed":false},{"actual":[730,2.0],"check":"boundary control 1","expected":[730,2.0],"passed":true},{"actual":[365,1.0],"check":"boundary control 2","expected":[365,1.0],"passed":true},{"actual":[3286,9.002739726],"check":"normal control 1","expected":[3286,9.002739726],"passed":true},{"actual":[871,2.38630137],"check":"normal control 2","expected":[871,2.38630137],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression leap day window test 1\", \"actual\": [3078, 8.432876712], \"expected\": [3078, 8.432876712], \"passed\": true}, {\"check\": \"regression leap day window test 2\", \"actual\": [3222, 8.82739726], \"expected\": [3222, 8.82739726], \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": [4, 0.010958904], \"expected\": [5, 0.01369863], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [1968, 5.391780822], \"expected\": [1969, 5.394520548], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [730, 2.0], \"expected\": [730, 2.0], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [365, 1.0], \"expected\": [365, 1.0], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [3286, 9.002739726], \"expected\": [3286, 9.002739726], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [871, 2.38630137], \"expected\": [871, 2.38630137], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.989,"exit_code":1,"observations":[{"actual":[3077,8.430136986],"check":"regression leap day window test 1","expected":[3078,8.432876712],"passed":false},{"actual":[3221,8.824657534],"check":"regression leap day window test 2","expected":[3222,8.82739726],"passed":false},{"actual":[4,0.010958904],"check":"partial repair probe 1","expected":[5,0.01369863],"passed":false},{"actual":[1968,5.391780822],"check":"partial repair probe 2","expected":[1969,5.394520548],"passed":false},{"actual":[730,2.0],"check":"boundary control 1","expected":[730,2.0],"passed":true},{"actual":[365,1.0],"check":"boundary control 2","expected":[365,1.0],"passed":true},{"actual":[3286,9.002739726],"check":"normal control 1","expected":[3286,9.002739726],"passed":true},{"actual":[871,2.38630137],"check":"normal control 2","expected":[871,2.38630137],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression leap day window test 1\", \"actual\": [3077, 8.430136986], \"expected\": [3078, 8.432876712], \"passed\": false}, {\"check\": \"regression leap day window test 2\", \"actual\": [3221, 8.824657534], \"expected\": [3222, 8.82739726], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [4, 0.010958904], \"expected\": [5, 0.01369863], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [1968, 5.391780822], \"expected\": [1969, 5.394520548], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [730, 2.0], \"expected\": [730, 2.0], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [365, 1.0], \"expected\": [365, 1.0], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [3286, 9.002739726], \"expected\": [3286, 9.002739726], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [871, 2.38630137], \"expected\": [871, 2.38630137], \"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."}}