{"abstract":"Spans crossing from a non-leap year into a leap year divide leap-year days by 365.","category":"Bond day-count conventions","checks":8,"contract":"Inputs start and end [y,m,d]. If end < start return \"end before start\". Split the interval at each 1 January; each piece contributes its actual days divided by 366 if the piece lies in a Gregorian leap year, else 365. Sum exactly and return the float rounded to 9 decimals.","evaluation_group":"w2-bond_day_count_conventions-act-act-isda","failed_approach":"Using the end year basis for all pieces moves the error to the first piece.","family":"w2-bond_day_count_conventions-act-act-isda-segment-denominator-year","id":"FA-60911","implementations":{"attempt":{"sha256":"b27f0915d9598f0c9b61f4bdc8f6fb4c2b4473ce25c532921679809612ab4249","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    total = Fraction(0)\n    cur = A\n    while cur < B:\n        nxt = min(B, datetime.date(cur.year + 1, 1, 1))\n        total += Fraction((nxt - cur).days, 366 if leap(B.year) else 365)\n        cur = nxt\n    return round(float(total), 9)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression segment denominator year 1', [[1920, 8, 29], [1921, 12, 9]], 1.278516356], ['regression segment denominator year 2', [[2088, 10, 21], [2093, 8, 9]], 4.799461038], ['partial repair probe 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['partial repair probe 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['normal control 1', [[2098, 9, 14], [2099, 8, 15]], 0.917808219], ['normal control 2', [[2096, 2, 29], [2096, 6, 22]], 0.31147541]], [['regression segment denominator year 1', [[2049, 10, 8], [2054, 9, 16]], 4.939726027], ['regression segment denominator year 2', [[2091, 8, 29], [2093, 12, 24]], 2.320547945], ['partial repair probe 1', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['partial repair probe 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[1898, 2, 10], [1899, 1, 16]], 0.931506849], ['normal control 2', [[1983, 9, 20], [1983, 10, 2]], 0.032876712]], [['regression segment denominator year 1', [[2104, 1, 11], [2109, 3, 18]], 5.180896774], ['regression segment denominator year 2', [[2023, 11, 30], [2026, 10, 31]], 2.917808219], ['partial repair probe 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['partial repair probe 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['normal control 1', [[1909, 5, 31], [1910, 7, 3]], 1.090410959], ['normal control 2', [[2054, 6, 11], [2054, 5, 11]], 'end before start']], [['regression segment denominator year 1', [[1913, 2, 14], [1916, 9, 4]], 3.554315443], ['regression segment denominator year 2', [[1911, 1, 28], [1916, 3, 20]], 5.141874392], ['partial repair probe 1', [[2023, 12, 30], [2024, 1, 1]], 0.005479452], ['partial repair probe 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2078, 8, 31], [2078, 7, 25]], 'end before start'], ['normal control 2', [[1941, 8, 21], [1942, 1, 26]], 0.432876712]], [['regression segment denominator year 1', [[2056, 7, 19], [2057, 5, 22]], 0.839853282], ['regression segment denominator year 2', [[1938, 2, 28], [1943, 7, 22]], 5.394520548], ['partial repair probe 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['partial repair probe 2', [[2056, 2, 10], [2057, 1, 1]], 0.890710383], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2090, 12, 9], [2091, 10, 25]], 0.876712329], ['normal control 2', [[2031, 7, 31], [2031, 10, 31]], 0.252054795]]]\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":"ca666869288183eda84c957f24ef661ea674f936f74624b135113f1de93ef851","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    total = Fraction(0)\n    cur = A\n    while cur < B:\n        nxt = min(B, datetime.date(cur.year + 1, 1, 1))\n        total += Fraction((nxt - cur).days, 366 if leap(A.year) else 365)\n        cur = nxt\n    return round(float(total), 9)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression segment denominator year 1', [[1920, 8, 29], [1921, 12, 9]], 1.278516356], ['regression segment denominator year 2', [[2088, 10, 21], [2093, 8, 9]], 4.799461038], ['partial repair probe 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['partial repair probe 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['normal control 1', [[2098, 9, 14], [2099, 8, 15]], 0.917808219], ['normal control 2', [[2096, 2, 29], [2096, 6, 22]], 0.31147541]], [['regression segment denominator year 1', [[2049, 10, 8], [2054, 9, 16]], 4.939726027], ['regression segment denominator year 2', [[2091, 8, 29], [2093, 12, 24]], 2.320547945], ['partial repair probe 1', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['partial repair probe 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[1898, 2, 10], [1899, 1, 16]], 0.931506849], ['normal control 2', [[1983, 9, 20], [1983, 10, 2]], 0.032876712]], [['regression segment denominator year 1', [[2104, 1, 11], [2109, 3, 18]], 5.180896774], ['regression segment denominator year 2', [[2023, 11, 30], [2026, 10, 31]], 2.917808219], ['partial repair probe 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['partial repair probe 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['normal control 1', [[1909, 5, 31], [1910, 7, 3]], 1.090410959], ['normal control 2', [[2054, 6, 11], [2054, 5, 11]], 'end before start']], [['regression segment denominator year 1', [[1913, 2, 14], [1916, 9, 4]], 3.554315443], ['regression segment denominator year 2', [[1911, 1, 28], [1916, 3, 20]], 5.141874392], ['partial repair probe 1', [[2023, 12, 30], [2024, 1, 1]], 0.005479452], ['partial repair probe 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2078, 8, 31], [2078, 7, 25]], 'end before start'], ['normal control 2', [[1941, 8, 21], [1942, 1, 26]], 0.432876712]], [['regression segment denominator year 1', [[2056, 7, 19], [2057, 5, 22]], 0.839853282], ['regression segment denominator year 2', [[1938, 2, 28], [1943, 7, 22]], 5.394520548], ['partial repair probe 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['partial repair probe 2', [[2056, 2, 10], [2057, 1, 1]], 0.890710383], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2090, 12, 9], [2091, 10, 25]], 0.876712329], ['normal control 2', [[2031, 7, 31], [2031, 10, 31]], 0.252054795]]]\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":"21bfed50aa3c60f14596cfbe34cc6b57be3519c985582b5004f318ed705875eb","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    total = Fraction(0)\n    cur = A\n    while cur < B:\n        nxt = min(B, datetime.date(cur.year + 1, 1, 1))\n        total += Fraction((nxt - cur).days, 366 if leap(cur.year) else 365)\n        cur = nxt\n    return round(float(total), 9)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression segment denominator year 1', [[1920, 8, 29], [1921, 12, 9]], 1.278516356], ['regression segment denominator year 2', [[2088, 10, 21], [2093, 8, 9]], 4.799461038], ['partial repair probe 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['partial repair probe 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['normal control 1', [[2098, 9, 14], [2099, 8, 15]], 0.917808219], ['normal control 2', [[2096, 2, 29], [2096, 6, 22]], 0.31147541]], [['regression segment denominator year 1', [[2049, 10, 8], [2054, 9, 16]], 4.939726027], ['regression segment denominator year 2', [[2091, 8, 29], [2093, 12, 24]], 2.320547945], ['partial repair probe 1', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['partial repair probe 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[1898, 2, 10], [1899, 1, 16]], 0.931506849], ['normal control 2', [[1983, 9, 20], [1983, 10, 2]], 0.032876712]], [['regression segment denominator year 1', [[2104, 1, 11], [2109, 3, 18]], 5.180896774], ['regression segment denominator year 2', [[2023, 11, 30], [2026, 10, 31]], 2.917808219], ['partial repair probe 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['partial repair probe 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['normal control 1', [[1909, 5, 31], [1910, 7, 3]], 1.090410959], ['normal control 2', [[2054, 6, 11], [2054, 5, 11]], 'end before start']], [['regression segment denominator year 1', [[1913, 2, 14], [1916, 9, 4]], 3.554315443], ['regression segment denominator year 2', [[1911, 1, 28], [1916, 3, 20]], 5.141874392], ['partial repair probe 1', [[2023, 12, 30], [2024, 1, 1]], 0.005479452], ['partial repair probe 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2078, 8, 31], [2078, 7, 25]], 'end before start'], ['normal control 2', [[1941, 8, 21], [1942, 1, 26]], 0.432876712]], [['regression segment denominator year 1', [[2056, 7, 19], [2057, 5, 22]], 0.839853282], ['regression segment denominator year 2', [[1938, 2, 28], [1943, 7, 22]], 5.394520548], ['partial repair probe 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['partial repair probe 2', [[2056, 2, 10], [2057, 1, 1]], 0.890710383], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2090, 12, 9], [2091, 10, 25]], 0.876712329], ['normal control 2', [[2031, 7, 31], [2031, 10, 31]], 0.252054795]]]\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-act-isda-segment-denominator-year","generated_at":"2026-09-29T14:46:49.990421+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":"Choose 366 or 365 separately for each calendar-year piece.","root_cause":"The denominator is chosen from the start year instead of the year of each piece.","sha256":"9978245080d81978b5b844f66b97bf1fb92633f877e335b509daf99b2fbe3740","title":"Act/Act ISDA year fraction: every calendar piece uses the start year basis · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.399,"exit_code":1,"observations":[{"actual":1.279452055,"check":"regression segment denominator year 1","expected":1.278516356,"passed":false},{"actual":4.802739726,"check":"regression segment denominator year 2","expected":4.799461038,"passed":false},{"actual":1.002739726,"check":"partial repair probe 1","expected":1.0,"passed":false},{"actual":0.00273224,"check":"partial repair probe 2","expected":0.002739726,"passed":false},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":0.246575342,"check":"boundary control 2","expected":0.246575342,"passed":true},{"actual":0.917808219,"check":"normal control 1","expected":0.917808219,"passed":true},{"actual":0.31147541,"check":"normal control 2","expected":0.31147541,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression segment denominator year 1\", \"actual\": 1.279452055, \"expected\": 1.278516356, \"passed\": false}, {\"check\": \"regression segment denominator year 2\", \"actual\": 4.802739726, \"expected\": 4.799461038, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 1.002739726, \"expected\": 1.0, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 0.00273224, \"expected\": 0.002739726, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 0.246575342, \"expected\": 0.246575342, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.917808219, \"expected\": 0.917808219, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.31147541, \"expected\": 0.31147541, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.134,"exit_code":1,"observations":[{"actual":1.275956284,"check":"regression segment denominator year 1","expected":1.278516356,"passed":false},{"actual":4.789617486,"check":"regression segment denominator year 2","expected":4.799461038,"passed":false},{"actual":1.0,"check":"partial repair probe 1","expected":1.0,"passed":true},{"actual":0.002739726,"check":"partial repair probe 2","expected":0.002739726,"passed":true},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":0.246575342,"check":"boundary control 2","expected":0.246575342,"passed":true},{"actual":0.917808219,"check":"normal control 1","expected":0.917808219,"passed":true},{"actual":0.31147541,"check":"normal control 2","expected":0.31147541,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression segment denominator year 1\", \"actual\": 1.275956284, \"expected\": 1.278516356, \"passed\": false}, {\"check\": \"regression segment denominator year 2\", \"actual\": 4.789617486, \"expected\": 4.799461038, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": 0.002739726, \"expected\": 0.002739726, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 0.246575342, \"expected\": 0.246575342, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.917808219, \"expected\": 0.917808219, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.31147541, \"expected\": 0.31147541, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.731,"exit_code":0,"observations":[{"actual":1.278516356,"check":"regression segment denominator year 1","expected":1.278516356,"passed":true},{"actual":4.799461038,"check":"regression segment denominator year 2","expected":4.799461038,"passed":true},{"actual":1.0,"check":"partial repair probe 1","expected":1.0,"passed":true},{"actual":0.002739726,"check":"partial repair probe 2","expected":0.002739726,"passed":true},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":0.246575342,"check":"boundary control 2","expected":0.246575342,"passed":true},{"actual":0.917808219,"check":"normal control 1","expected":0.917808219,"passed":true},{"actual":0.31147541,"check":"normal control 2","expected":0.31147541,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression segment denominator year 1\", \"actual\": 1.278516356, \"expected\": 1.278516356, \"passed\": true}, {\"check\": \"regression segment denominator year 2\", \"actual\": 4.799461038, \"expected\": 4.799461038, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": 0.002739726, \"expected\": 0.002739726, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 0.246575342, \"expected\": 0.246575342, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.917808219, \"expected\": 0.917808219, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.31147541, \"expected\": 0.31147541, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}