{"abstract":"Quarterly periods that begin in December before a leap year use 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.","contract_signature":"a, b, freq","evaluation_group":"w2-bond_day_count_conventions-act-365-leap","failed_approach":"Accepting either year makes periods leaving a leap year use 366 as well.","family":"w2-bond_day_count_conventions-act-365-leap-non-annual-year-choice","id":"FA-60941","implementations":{"attempt":{"sha256":"571e20d8cd76e504e8e4fa077b66453765bd424aac97733e4a1f4647e6bbc9a9","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(A.year) or 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 non-annual year choice 1', [[2096, 12, 15], [2097, 3, 15], 4], 0.246575342], ['regression non-annual year choice 2', [[1916, 10, 19], [1917, 7, 19], 4], 0.747945205], ['partial repair probe 1', [[1908, 11, 30], [1909, 3, 29], 2], 0.326027397], ['partial repair probe 2', [[2000, 12, 29], [2001, 3, 29], 4], 0.246575342], ['boundary control 1', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29], 1], 1.0], ['normal control 1', [[2103, 1, 29], [2103, 3, 13], 1], 0.117808219], ['normal control 2', [[2096, 1, 29], [2096, 7, 29], 2], 0.49726776]], [['regression non-annual year choice 1', [[1999, 12, 15], [2000, 3, 15], 4], 0.24863388], ['regression non-annual year choice 2', [[2012, 3, 18], [2013, 4, 12], 2], 1.068493151], ['partial repair probe 1', [[2096, 3, 29], [2097, 1, 3], 4], 0.767123288], ['partial repair probe 2', [[2080, 5, 1], [2081, 2, 1], 4], 0.756164384], ['boundary control 1', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29], 1], 1.0], ['normal control 1', [[1912, 6, 19], [1913, 6, 19], 1], 1.0], ['normal control 2', [[1963, 9, 30], [1964, 9, 30], 1], 1.0]], [['regression non-annual year choice 1', [[2103, 12, 1], [2104, 3, 1], 4], 0.24863388], ['regression non-annual year choice 2', [[2084, 4, 30], [2085, 1, 30], 4], 0.753424658], ['partial repair probe 1', [[2000, 11, 14], [2001, 8, 14], 4], 0.747945205], ['partial repair probe 2', [[2072, 10, 28], [2073, 1, 28], 4], 0.252054795], ['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', [[2063, 3, 3], [2064, 3, 2], 1], 0.99726776], ['normal control 2', [[1906, 3, 6], [1906, 6, 6], 4], 0.252054795]], [['regression non-annual year choice 1', [[1947, 12, 30], [1948, 12, 30], 2], 1.0], ['regression non-annual year choice 2', [[2000, 3, 28], [2001, 9, 28], 2], 1.504109589], ['partial repair probe 1', [[2096, 1, 15], [2097, 7, 15], 2], 1.498630137], ['partial repair probe 2', [[2024, 12, 29], [2025, 3, 29], 4], 0.246575342], ['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', [[2004, 2, 28], [2004, 11, 7], 1], 0.691256831], ['normal control 2', [[1982, 2, 24], [1983, 2, 24], 1], 1.0]], [['regression non-annual year choice 1', [[1927, 7, 23], [1928, 4, 23], 4], 0.75136612], ['regression non-annual year choice 2', [[2044, 11, 4], [2045, 5, 4], 2], 0.495890411], ['partial repair probe 1', [[2024, 11, 15], [2025, 2, 15], 4], 0.252054795], ['partial repair probe 2', [[2028, 7, 31], [2029, 6, 7], 4], 0.852054795], ['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', [[2095, 3, 28], [2097, 3, 28], 1], 1.99726776], ['normal control 2', [[2069, 3, 7], [2070, 3, 7], 1], 1.0]]]\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":"7e27407492e1c5c1039fdf652cd8758322727ebe024e3cfd6d6e510d035521b3","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(A.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 non-annual year choice 1', [[2096, 12, 15], [2097, 3, 15], 4], 0.246575342], ['regression non-annual year choice 2', [[1916, 10, 19], [1917, 7, 19], 4], 0.747945205], ['partial repair probe 1', [[1908, 11, 30], [1909, 3, 29], 2], 0.326027397], ['partial repair probe 2', [[2000, 12, 29], [2001, 3, 29], 4], 0.246575342], ['boundary control 1', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29], 1], 1.0], ['normal control 1', [[2103, 1, 29], [2103, 3, 13], 1], 0.117808219], ['normal control 2', [[2096, 1, 29], [2096, 7, 29], 2], 0.49726776]], [['regression non-annual year choice 1', [[1999, 12, 15], [2000, 3, 15], 4], 0.24863388], ['regression non-annual year choice 2', [[2012, 3, 18], [2013, 4, 12], 2], 1.068493151], ['partial repair probe 1', [[2096, 3, 29], [2097, 1, 3], 4], 0.767123288], ['partial repair probe 2', [[2080, 5, 1], [2081, 2, 1], 4], 0.756164384], ['boundary control 1', [[2023, 3, 1], [2024, 3, 1], 1], 1.0], ['boundary control 2', [[2023, 2, 28], [2024, 2, 29], 1], 1.0], ['normal control 1', [[1912, 6, 19], [1913, 6, 19], 1], 1.0], ['normal control 2', [[1963, 9, 30], [1964, 9, 30], 1], 1.0]], [['regression non-annual year choice 1', [[2103, 12, 1], [2104, 3, 1], 4], 0.24863388], ['regression non-annual year choice 2', [[2084, 4, 30], [2085, 1, 30], 4], 0.753424658], ['partial repair probe 1', [[2000, 11, 14], [2001, 8, 14], 4], 0.747945205], ['partial repair probe 2', [[2072, 10, 28], [2073, 1, 28], 4], 0.252054795], ['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', [[2063, 3, 3], [2064, 3, 2], 1], 0.99726776], ['normal control 2', [[1906, 3, 6], [1906, 6, 6], 4], 0.252054795]], [['regression non-annual year choice 1', [[1947, 12, 30], [1948, 12, 30], 2], 1.0], ['regression non-annual year choice 2', [[2000, 3, 28], [2001, 9, 28], 2], 1.504109589], ['partial repair probe 1', [[2096, 1, 15], [2097, 7, 15], 2], 1.498630137], ['partial repair probe 2', [[2024, 12, 29], [2025, 3, 29], 4], 0.246575342], ['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', [[2004, 2, 28], [2004, 11, 7], 1], 0.691256831], ['normal control 2', [[1982, 2, 24], [1983, 2, 24], 1], 1.0]], [['regression non-annual year choice 1', [[1927, 7, 23], [1928, 4, 23], 4], 0.75136612], ['regression non-annual year choice 2', [[2044, 11, 4], [2045, 5, 4], 2], 0.495890411], ['partial repair probe 1', [[2024, 11, 15], [2025, 2, 15], 4], 0.252054795], ['partial repair probe 2', [[2028, 7, 31], [2029, 6, 7], 4], 0.852054795], ['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', [[2095, 3, 28], [2097, 3, 28], 1], 1.99726776], ['normal control 2', [[2069, 3, 7], [2070, 3, 7], 1], 1.0]]]\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-non-annual-year-choice","generated_at":"2026-09-29T14:46:50.297497+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 non-annual branch tests the leap status of the start year instead of the end year.","sha256":"1a8ae2c7b72ffbf1f88faedf3c91d71d5a7df725375f5c75ad97714073fe2795","title":"Act/365L denominator selection: sub-annual periods look at the start year · 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":42.681,"exit_code":1,"observations":[{"actual":0.245901639,"check":"regression non-annual year choice 1","expected":0.246575342,"passed":false},{"actual":0.745901639,"check":"regression non-annual year choice 2","expected":0.747945205,"passed":false},{"actual":0.325136612,"check":"partial repair probe 1","expected":0.326027397,"passed":false},{"actual":0.245901639,"check":"partial repair probe 2","expected":0.246575342,"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":0.117808219,"check":"normal control 1","expected":0.117808219,"passed":true},{"actual":0.49726776,"check":"normal control 2","expected":0.49726776,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression non-annual year choice 1\", \"actual\": 0.245901639, \"expected\": 0.246575342, \"passed\": false}, {\"check\": \"regression non-annual year choice 2\", \"actual\": 0.745901639, \"expected\": 0.747945205, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 0.325136612, \"expected\": 0.326027397, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 0.245901639, \"expected\": 0.246575342, \"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\": 0.117808219, \"expected\": 0.117808219, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.49726776, \"expected\": 0.49726776, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.812,"exit_code":1,"observations":[{"actual":0.245901639,"check":"regression non-annual year choice 1","expected":0.246575342,"passed":false},{"actual":0.745901639,"check":"regression non-annual year choice 2","expected":0.747945205,"passed":false},{"actual":0.325136612,"check":"partial repair probe 1","expected":0.326027397,"passed":false},{"actual":0.245901639,"check":"partial repair probe 2","expected":0.246575342,"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":0.117808219,"check":"normal control 1","expected":0.117808219,"passed":true},{"actual":0.49726776,"check":"normal control 2","expected":0.49726776,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression non-annual year choice 1\", \"actual\": 0.245901639, \"expected\": 0.246575342, \"passed\": false}, {\"check\": \"regression non-annual year choice 2\", \"actual\": 0.745901639, \"expected\": 0.747945205, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 0.325136612, \"expected\": 0.326027397, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 0.245901639, \"expected\": 0.246575342, \"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\": 0.117808219, \"expected\": 0.117808219, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.49726776, \"expected\": 0.49726776, \"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."}}