{"abstract":"An annual period ending in March of a leap year from March of the prior year is priced on 365 days.","category":"Bond day-count conventions","checks":8,"contract":"Inputs start, end ([y,m,d]) and coupon frequency. Days are actual days. For annual frequency the denominator is 366 if any 29 February lies in (start, end], else 365. For other frequencies the denominator is 366 if the end date year is a leap year, else 365. Return days/denominator rounded to 9 decimals.","evaluation_group":"w2-bond_day_count_conventions-act-365-leap","failed_approach":"Checking that the end is on or after 29 February of a leap end year misses leap days in the start year.","family":"w2-bond_day_count_conventions-act-365-leap-annual-leap-day-test","id":"FA-60946","implementations":{"attempt":{"sha256":"123fcc41cc82526d89a9d2eaaf809d75ebd05b907f2a52869e9c05ce1eb10730","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b, freq):\n    A = datetime.date(*a)\n    B = datetime.date(*b)\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    days = (B - A).days\n    if freq == 1:\n        has29 = any(leap(y) and A < datetime.date(y, 2, 29) <= B for y in range(A.year, B.year + 1))\n        den = 366 if leap(B.year) and B >= datetime.date(B.year, 2, 29) else 365\n    else:\n        den = 366 if leap(B.year) else 365\n    return round(days / den, 9)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression annual leap-day test 1', [[2095, 2, 28], [2098, 2, 28], 1], 2.994535519], ['regression annual leap-day test 2', [[1967, 6, 7], [1970, 6, 7], 1], 2.994535519], ['partial repair probe 1', [[1995, 12, 1], [1998, 12, 1], 1], 2.994535519], ['partial repair probe 2', [[2026, 3, 31], [2029, 3, 31], 1], 2.994535519], ['boundary control 1', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['boundary control 2', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['normal control 1', [[2084, 12, 5], [2086, 2, 11], 1], 1.18630137], ['normal control 2', [[2058, 8, 8], [2060, 8, 8], 1], 1.99726776]], [['regression annual leap-day test 1', [[1943, 2, 28], [1946, 2, 28], 1], 2.994535519], ['regression annual leap-day test 2', [[2027, 1, 28], [2028, 1, 28], 1], 1.0], ['partial repair probe 1', [[2004, 2, 1], [2005, 2, 1], 1], 1.0], ['partial repair probe 2', [[2104, 2, 28], [2105, 2, 28], 1], 1.0], ['boundary control 1', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['boundary control 2', [[2023, 12, 15], [2024, 3, 15], 4], 0.24863388], ['normal control 1', [[1898, 3, 30], [1899, 3, 16], 4], 0.961643836], ['normal control 2', [[2096, 1, 15], [2096, 8, 25], 2], 0.609289617]], [['regression annual leap-day test 1', [[1995, 8, 19], [1997, 8, 19], 1], 1.99726776], ['regression annual leap-day test 2', [[2050, 11, 30], [2053, 11, 30], 1], 2.994535519], ['partial repair probe 1', [[2103, 12, 1], [2105, 12, 1], 1], 1.99726776], ['partial repair probe 2', [[2028, 2, 28], [2030, 2, 28], 1], 1.99726776], ['boundary control 1', [[2024, 11, 15], [2025, 2, 15], 4], 0.252054795], ['boundary control 2', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['normal control 1', [[2004, 1, 28], [2004, 7, 28], 2], 0.49726776], ['normal control 2', [[1996, 2, 28], [1996, 8, 28], 4], 0.49726776]], [['regression annual leap-day test 1', [[2023, 2, 28], [2026, 2, 28], 1], 2.994535519], ['regression annual leap-day test 2', [[1951, 1, 25], [1952, 1, 25], 1], 1.0], ['partial repair probe 1', [[1999, 12, 28], [2002, 12, 28], 1], 2.994535519], ['partial repair probe 2', [[2104, 1, 28], [2106, 1, 28], 1], 1.99726776], ['boundary control 1', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['boundary control 2', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['normal control 1', [[2005, 3, 28], [2005, 9, 28], 2], 0.504109589], ['normal control 2', [[2038, 4, 30], [2038, 7, 30], 4], 0.249315068]], [['regression annual leap-day test 1', [[2000, 1, 29], [2002, 1, 29], 1], 1.99726776], ['regression annual leap-day test 2', [[1995, 1, 15], [1998, 1, 15], 1], 2.994535519], ['partial repair probe 1', [[2095, 6, 18], [2098, 6, 18], 1], 2.994535519], ['partial repair probe 2', [[2028, 1, 15], [2029, 1, 15], 1], 1.0], ['boundary control 1', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['boundary control 2', [[2023, 12, 15], [2024, 3, 15], 4], 0.24863388], ['normal control 1', [[1964, 11, 30], [1966, 3, 30], 4], 1.328767123], ['normal control 2', [[1967, 2, 28], [1967, 8, 28], 2], 0.495890411]]]\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":"1cc73a9e86ed4c802f8df146f16d7bfcc6f69fd70dd884bf778e2cd7bf08909b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b, freq):\n    A = datetime.date(*a)\n    B = datetime.date(*b)\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    days = (B - A).days\n    if freq == 1:\n        has29 = any(leap(y) and A < datetime.date(y, 2, 29) <= B for y in range(A.year, B.year + 1))\n        den = 366 if leap(B.year) else 365\n    else:\n        den = 366 if leap(B.year) else 365\n    return round(days / den, 9)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression annual leap-day test 1', [[2095, 2, 28], [2098, 2, 28], 1], 2.994535519], ['regression annual leap-day test 2', [[1967, 6, 7], [1970, 6, 7], 1], 2.994535519], ['partial repair probe 1', [[1995, 12, 1], [1998, 12, 1], 1], 2.994535519], ['partial repair probe 2', [[2026, 3, 31], [2029, 3, 31], 1], 2.994535519], ['boundary control 1', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['boundary control 2', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['normal control 1', [[2084, 12, 5], [2086, 2, 11], 1], 1.18630137], ['normal control 2', [[2058, 8, 8], [2060, 8, 8], 1], 1.99726776]], [['regression annual leap-day test 1', [[1943, 2, 28], [1946, 2, 28], 1], 2.994535519], ['regression annual leap-day test 2', [[2027, 1, 28], [2028, 1, 28], 1], 1.0], ['partial repair probe 1', [[2004, 2, 1], [2005, 2, 1], 1], 1.0], ['partial repair probe 2', [[2104, 2, 28], [2105, 2, 28], 1], 1.0], ['boundary control 1', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['boundary control 2', [[2023, 12, 15], [2024, 3, 15], 4], 0.24863388], ['normal control 1', [[1898, 3, 30], [1899, 3, 16], 4], 0.961643836], ['normal control 2', [[2096, 1, 15], [2096, 8, 25], 2], 0.609289617]], [['regression annual leap-day test 1', [[1995, 8, 19], [1997, 8, 19], 1], 1.99726776], ['regression annual leap-day test 2', [[2050, 11, 30], [2053, 11, 30], 1], 2.994535519], ['partial repair probe 1', [[2103, 12, 1], [2105, 12, 1], 1], 1.99726776], ['partial repair probe 2', [[2028, 2, 28], [2030, 2, 28], 1], 1.99726776], ['boundary control 1', [[2024, 11, 15], [2025, 2, 15], 4], 0.252054795], ['boundary control 2', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['normal control 1', [[2004, 1, 28], [2004, 7, 28], 2], 0.49726776], ['normal control 2', [[1996, 2, 28], [1996, 8, 28], 4], 0.49726776]], [['regression annual leap-day test 1', [[2023, 2, 28], [2026, 2, 28], 1], 2.994535519], ['regression annual leap-day test 2', [[1951, 1, 25], [1952, 1, 25], 1], 1.0], ['partial repair probe 1', [[1999, 12, 28], [2002, 12, 28], 1], 2.994535519], ['partial repair probe 2', [[2104, 1, 28], [2106, 1, 28], 1], 1.99726776], ['boundary control 1', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['boundary control 2', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['normal control 1', [[2005, 3, 28], [2005, 9, 28], 2], 0.504109589], ['normal control 2', [[2038, 4, 30], [2038, 7, 30], 4], 0.249315068]], [['regression annual leap-day test 1', [[2000, 1, 29], [2002, 1, 29], 1], 1.99726776], ['regression annual leap-day test 2', [[1995, 1, 15], [1998, 1, 15], 1], 2.994535519], ['partial repair probe 1', [[2095, 6, 18], [2098, 6, 18], 1], 2.994535519], ['partial repair probe 2', [[2028, 1, 15], [2029, 1, 15], 1], 1.0], ['boundary control 1', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['boundary control 2', [[2023, 12, 15], [2024, 3, 15], 4], 0.24863388], ['normal control 1', [[1964, 11, 30], [1966, 3, 30], 4], 1.328767123], ['normal control 2', [[1967, 2, 28], [1967, 8, 28], 2], 0.495890411]]]\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":"8af02bd3e5add6180dc8a32dfa903bfa222464d6ca9f705dd7d7918fb2068341","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b, freq):\n    A = datetime.date(*a)\n    B = datetime.date(*b)\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    days = (B - A).days\n    if freq == 1:\n        has29 = any(leap(y) and A < datetime.date(y, 2, 29) <= B for y in range(A.year, B.year + 1))\n        den = 366 if has29 else 365\n    else:\n        den = 366 if leap(B.year) else 365\n    return round(days / den, 9)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression annual leap-day test 1', [[2095, 2, 28], [2098, 2, 28], 1], 2.994535519], ['regression annual leap-day test 2', [[1967, 6, 7], [1970, 6, 7], 1], 2.994535519], ['partial repair probe 1', [[1995, 12, 1], [1998, 12, 1], 1], 2.994535519], ['partial repair probe 2', [[2026, 3, 31], [2029, 3, 31], 1], 2.994535519], ['boundary control 1', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['boundary control 2', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['normal control 1', [[2084, 12, 5], [2086, 2, 11], 1], 1.18630137], ['normal control 2', [[2058, 8, 8], [2060, 8, 8], 1], 1.99726776]], [['regression annual leap-day test 1', [[1943, 2, 28], [1946, 2, 28], 1], 2.994535519], ['regression annual leap-day test 2', [[2027, 1, 28], [2028, 1, 28], 1], 1.0], ['partial repair probe 1', [[2004, 2, 1], [2005, 2, 1], 1], 1.0], ['partial repair probe 2', [[2104, 2, 28], [2105, 2, 28], 1], 1.0], ['boundary control 1', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['boundary control 2', [[2023, 12, 15], [2024, 3, 15], 4], 0.24863388], ['normal control 1', [[1898, 3, 30], [1899, 3, 16], 4], 0.961643836], ['normal control 2', [[2096, 1, 15], [2096, 8, 25], 2], 0.609289617]], [['regression annual leap-day test 1', [[1995, 8, 19], [1997, 8, 19], 1], 1.99726776], ['regression annual leap-day test 2', [[2050, 11, 30], [2053, 11, 30], 1], 2.994535519], ['partial repair probe 1', [[2103, 12, 1], [2105, 12, 1], 1], 1.99726776], ['partial repair probe 2', [[2028, 2, 28], [2030, 2, 28], 1], 1.99726776], ['boundary control 1', [[2024, 11, 15], [2025, 2, 15], 4], 0.252054795], ['boundary control 2', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['normal control 1', [[2004, 1, 28], [2004, 7, 28], 2], 0.49726776], ['normal control 2', [[1996, 2, 28], [1996, 8, 28], 4], 0.49726776]], [['regression annual leap-day test 1', [[2023, 2, 28], [2026, 2, 28], 1], 2.994535519], ['regression annual leap-day test 2', [[1951, 1, 25], [1952, 1, 25], 1], 1.0], ['partial repair probe 1', [[1999, 12, 28], [2002, 12, 28], 1], 2.994535519], ['partial repair probe 2', [[2104, 1, 28], [2106, 1, 28], 1], 1.99726776], ['boundary control 1', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['boundary control 2', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['normal control 1', [[2005, 3, 28], [2005, 9, 28], 2], 0.504109589], ['normal control 2', [[2038, 4, 30], [2038, 7, 30], 4], 0.249315068]], [['regression annual leap-day test 1', [[2000, 1, 29], [2002, 1, 29], 1], 1.99726776], ['regression annual leap-day test 2', [[1995, 1, 15], [1998, 1, 15], 1], 2.994535519], ['partial repair probe 1', [[2095, 6, 18], [2098, 6, 18], 1], 2.994535519], ['partial repair probe 2', [[2028, 1, 15], [2029, 1, 15], 1], 1.0], ['boundary control 1', [[2024, 2, 29], [2025, 2, 28], 1], 1.0], ['boundary control 2', [[2023, 12, 15], [2024, 3, 15], 4], 0.24863388], ['normal control 1', [[1964, 11, 30], [1966, 3, 30], 4], 1.328767123], ['normal control 2', [[1967, 2, 28], [1967, 8, 28], 2], 0.495890411]]]\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-act-365-leap-annual-leap-day-test","generated_at":"2026-09-29T14:46:50.383909+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":"For annual frequency test whether a 29 February lies inside the period.","root_cause":"The annual branch reuses the sub-annual end-year rule instead of looking for a contained 29 February.","sha256":"4aff758bc155c86b716c469c7bd85239b388d384114f155fe0f0c497d5ea3e6a","title":"Act/365L denominator selection: annual periods use the end year leap status · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.678,"exit_code":1,"observations":[{"actual":3.002739726,"check":"regression annual leap-day test 1","expected":2.994535519,"passed":false},{"actual":3.002739726,"check":"regression annual leap-day test 2","expected":2.994535519,"passed":false},{"actual":3.002739726,"check":"partial repair probe 1","expected":2.994535519,"passed":false},{"actual":3.002739726,"check":"partial repair probe 2","expected":2.994535519,"passed":false},{"actual":1.0,"check":"boundary control 1","expected":1.0,"passed":true},{"actual":1.0,"check":"boundary control 2","expected":1.0,"passed":true},{"actual":1.18630137,"check":"normal control 1","expected":1.18630137,"passed":true},{"actual":1.99726776,"check":"normal control 2","expected":1.99726776,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression annual leap-day test 1\", \"actual\": 3.002739726, \"expected\": 2.994535519, \"passed\": false}, {\"check\": \"regression annual leap-day test 2\", \"actual\": 3.002739726, \"expected\": 2.994535519, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 3.002739726, \"expected\": 2.994535519, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 3.002739726, \"expected\": 2.994535519, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.18630137, \"expected\": 1.18630137, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 1.99726776, \"expected\": 1.99726776, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.153,"exit_code":1,"observations":[{"actual":3.002739726,"check":"regression annual leap-day test 1","expected":2.994535519,"passed":false},{"actual":3.002739726,"check":"regression annual leap-day test 2","expected":2.994535519,"passed":false},{"actual":3.002739726,"check":"partial repair probe 1","expected":2.994535519,"passed":false},{"actual":3.002739726,"check":"partial repair probe 2","expected":2.994535519,"passed":false},{"actual":1.0,"check":"boundary control 1","expected":1.0,"passed":true},{"actual":1.0,"check":"boundary control 2","expected":1.0,"passed":true},{"actual":1.18630137,"check":"normal control 1","expected":1.18630137,"passed":true},{"actual":1.99726776,"check":"normal control 2","expected":1.99726776,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression annual leap-day test 1\", \"actual\": 3.002739726, \"expected\": 2.994535519, \"passed\": false}, {\"check\": \"regression annual leap-day test 2\", \"actual\": 3.002739726, \"expected\": 2.994535519, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 3.002739726, \"expected\": 2.994535519, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 3.002739726, \"expected\": 2.994535519, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.18630137, \"expected\": 1.18630137, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 1.99726776, \"expected\": 1.99726776, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.907,"exit_code":0,"observations":[{"actual":2.994535519,"check":"regression annual leap-day test 1","expected":2.994535519,"passed":true},{"actual":2.994535519,"check":"regression annual leap-day test 2","expected":2.994535519,"passed":true},{"actual":2.994535519,"check":"partial repair probe 1","expected":2.994535519,"passed":true},{"actual":2.994535519,"check":"partial repair probe 2","expected":2.994535519,"passed":true},{"actual":1.0,"check":"boundary control 1","expected":1.0,"passed":true},{"actual":1.0,"check":"boundary control 2","expected":1.0,"passed":true},{"actual":1.18630137,"check":"normal control 1","expected":1.18630137,"passed":true},{"actual":1.99726776,"check":"normal control 2","expected":1.99726776,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression annual leap-day test 1\", \"actual\": 2.994535519, \"expected\": 2.994535519, \"passed\": true}, {\"check\": \"regression annual leap-day test 2\", \"actual\": 2.994535519, \"expected\": 2.994535519, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 2.994535519, \"expected\": 2.994535519, \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": 2.994535519, \"expected\": 2.994535519, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.18630137, \"expected\": 1.18630137, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 1.99726776, \"expected\": 1.99726776, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}