{"abstract":"Multi-year spans ignore the leap status of middle years.","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.","contract_signature":"a, b","evaluation_group":"w2-bond_day_count_conventions-act-act-isda","failed_approach":"Splitting off the last year too still lumps the middle years together.","family":"w2-bond_day_count_conventions-act-act-isda-two-piece-split","id":"FA-60921","implementations":{"attempt":{"sha256":"f4dc5e612ac815c554e2af07743adc869e8852dccc903cc20bb9feb2ac16931b","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    if cur < B:\n        nxt = min(B, datetime.date(cur.year + 1, 1, 1))\n        last = max(nxt, datetime.date(B.year, 1, 1))\n        total += Fraction((nxt - cur).days, 366 if leap(cur.year) else 365)\n        total += Fraction((last - nxt).days, 365)\n        total += Fraction((B - last).days, 366 if leap(B.year) else 365)\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 two piece split 1', [[1900, 11, 16], [1906, 7, 12]], 5.652054795], ['regression two piece split 2', [[2067, 10, 30], [2073, 10, 12]], 5.950684932], ['partial repair probe 1', [[2006, 1, 20], [2009, 12, 4]], 3.871232877], ['partial repair probe 2', [[2026, 5, 1], [2030, 9, 4]], 4.345205479], ['boundary control 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 2', [[2023, 7, 1], [2024, 7, 1]], 1.001377349], ['normal control 1', [[2032, 9, 29], [2032, 11, 13]], 0.12295082], ['normal control 2', [[1958, 3, 20], [1958, 9, 16]], 0.493150685]], [['regression two piece split 1', [[2064, 2, 20], [2069, 2, 24]], 5.011333184], ['regression two piece split 2', [[1903, 8, 31], [1909, 7, 11]], 5.860273973], ['partial repair probe 1', [[1961, 6, 22], [1965, 4, 25]], 3.84109589], ['partial repair probe 2', [[2083, 8, 31], [2085, 1, 31]], 1.419178082], ['boundary control 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[2072, 5, 2], [2072, 6, 27]], 0.153005464], ['normal control 2', [[1900, 6, 5], [1901, 5, 18]], 0.950684932]], [['regression two piece split 1', [[2033, 11, 30], [2038, 6, 7]], 4.517808219], ['regression two piece split 2', [[2086, 8, 22], [2091, 12, 28]], 5.350684932], ['partial repair probe 1', [[2089, 6, 8], [2093, 7, 27]], 4.134246575], ['partial repair probe 2', [[1927, 12, 5], [1932, 3, 1]], 4.237907029], ['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', [[1927, 8, 31], [1927, 10, 12]], 0.115068493], ['normal control 2', [[2019, 3, 6], [2020, 1, 4]], 0.832854256]], [['regression two piece split 1', [[1991, 1, 7], [1994, 7, 16]], 3.520547945], ['regression two piece split 2', [[2027, 10, 26], [2032, 3, 4]], 4.355692791], ['partial repair probe 1', [[1901, 12, 13], [1907, 11, 6]], 5.898630137], ['partial repair probe 2', [[1941, 4, 30], [1945, 5, 25]], 4.068493151], ['boundary control 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2043, 3, 4], [2043, 12, 25]], 0.810958904], ['normal control 2', [[2073, 9, 14], [2074, 2, 11]], 0.410958904]], [['regression two piece split 1', [[1912, 10, 16], [1917, 2, 2]], 4.298053747], ['regression two piece split 2', [[2077, 3, 22], [2081, 7, 11]], 4.304109589], ['partial repair probe 1', [[1982, 10, 31], [1985, 12, 16]], 3.126027397], ['partial repair probe 2', [[2101, 5, 31], [2106, 10, 18]], 5.383561644], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2023, 7, 1], [2024, 7, 1]], 1.001377349], ['normal control 1', [[1955, 11, 18], [1955, 10, 22]], 'end before start'], ['normal control 2', [[2068, 3, 1], [2070, 1, 8]], 1.855243656]]]\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":"ade506f7b4206e5a36cb089fa0650bf700f56f23559d9ea1dbab409aed3505bd","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    if 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        total += Fraction((B - nxt).days, 366 if leap(B.year) else 365)\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 two piece split 1', [[1900, 11, 16], [1906, 7, 12]], 5.652054795], ['regression two piece split 2', [[2067, 10, 30], [2073, 10, 12]], 5.950684932], ['partial repair probe 1', [[2006, 1, 20], [2009, 12, 4]], 3.871232877], ['partial repair probe 2', [[2026, 5, 1], [2030, 9, 4]], 4.345205479], ['boundary control 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 2', [[2023, 7, 1], [2024, 7, 1]], 1.001377349], ['normal control 1', [[2032, 9, 29], [2032, 11, 13]], 0.12295082], ['normal control 2', [[1958, 3, 20], [1958, 9, 16]], 0.493150685]], [['regression two piece split 1', [[2064, 2, 20], [2069, 2, 24]], 5.011333184], ['regression two piece split 2', [[1903, 8, 31], [1909, 7, 11]], 5.860273973], ['partial repair probe 1', [[1961, 6, 22], [1965, 4, 25]], 3.84109589], ['partial repair probe 2', [[2083, 8, 31], [2085, 1, 31]], 1.419178082], ['boundary control 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[2072, 5, 2], [2072, 6, 27]], 0.153005464], ['normal control 2', [[1900, 6, 5], [1901, 5, 18]], 0.950684932]], [['regression two piece split 1', [[2033, 11, 30], [2038, 6, 7]], 4.517808219], ['regression two piece split 2', [[2086, 8, 22], [2091, 12, 28]], 5.350684932], ['partial repair probe 1', [[2089, 6, 8], [2093, 7, 27]], 4.134246575], ['partial repair probe 2', [[1927, 12, 5], [1932, 3, 1]], 4.237907029], ['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', [[1927, 8, 31], [1927, 10, 12]], 0.115068493], ['normal control 2', [[2019, 3, 6], [2020, 1, 4]], 0.832854256]], [['regression two piece split 1', [[1991, 1, 7], [1994, 7, 16]], 3.520547945], ['regression two piece split 2', [[2027, 10, 26], [2032, 3, 4]], 4.355692791], ['partial repair probe 1', [[1901, 12, 13], [1907, 11, 6]], 5.898630137], ['partial repair probe 2', [[1941, 4, 30], [1945, 5, 25]], 4.068493151], ['boundary control 1', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2043, 3, 4], [2043, 12, 25]], 0.810958904], ['normal control 2', [[2073, 9, 14], [2074, 2, 11]], 0.410958904]], [['regression two piece split 1', [[1912, 10, 16], [1917, 2, 2]], 4.298053747], ['regression two piece split 2', [[2077, 3, 22], [2081, 7, 11]], 4.304109589], ['partial repair probe 1', [[1982, 10, 31], [1985, 12, 16]], 3.126027397], ['partial repair probe 2', [[2101, 5, 31], [2106, 10, 18]], 5.383561644], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2023, 7, 1], [2024, 7, 1]], 1.001377349], ['normal control 1', [[1955, 11, 18], [1955, 10, 22]], 'end before start'], ['normal control 2', [[2068, 3, 1], [2070, 1, 8]], 1.855243656]]]\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-two-piece-split","generated_at":"2026-09-29T14:46:50.123815+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 loop was simplified to a first-year piece plus one remainder piece.","sha256":"715366ee0de04cd1dfbfd16bf3dae3de0b7754e4d3248965ed2e7a8755a15ed3","title":"Act/Act ISDA year fraction: only the first year is split out and the remainder uses the end year basis · 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.674,"exit_code":1,"observations":[{"actual":5.654794521,"check":"regression two piece split 1","expected":5.652054795,"passed":false},{"actual":5.956164384,"check":"regression two piece split 2","expected":5.950684932,"passed":false},{"actual":3.873972603,"check":"partial repair probe 1","expected":3.871232877,"passed":false},{"actual":4.347945205,"check":"partial repair probe 2","expected":4.345205479,"passed":false},{"actual":1.0,"check":"boundary control 1","expected":1.0,"passed":true},{"actual":1.001377349,"check":"boundary control 2","expected":1.001377349,"passed":true},{"actual":0.12295082,"check":"normal control 1","expected":0.12295082,"passed":true},{"actual":0.493150685,"check":"normal control 2","expected":0.493150685,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression two piece split 1\", \"actual\": 5.654794521, \"expected\": 5.652054795, \"passed\": false}, {\"check\": \"regression two piece split 2\", \"actual\": 5.956164384, \"expected\": 5.950684932, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 3.873972603, \"expected\": 3.871232877, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 4.347945205, \"expected\": 4.345205479, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.001377349, \"expected\": 1.001377349, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.12295082, \"expected\": 0.12295082, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.493150685, \"expected\": 0.493150685, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.089,"exit_code":1,"observations":[{"actual":5.654794521,"check":"regression two piece split 1","expected":5.652054795,"passed":false},{"actual":5.956164384,"check":"regression two piece split 2","expected":5.950684932,"passed":false},{"actual":3.873972603,"check":"partial repair probe 1","expected":3.871232877,"passed":false},{"actual":4.347945205,"check":"partial repair probe 2","expected":4.345205479,"passed":false},{"actual":1.0,"check":"boundary control 1","expected":1.0,"passed":true},{"actual":1.001377349,"check":"boundary control 2","expected":1.001377349,"passed":true},{"actual":0.12295082,"check":"normal control 1","expected":0.12295082,"passed":true},{"actual":0.493150685,"check":"normal control 2","expected":0.493150685,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression two piece split 1\", \"actual\": 5.654794521, \"expected\": 5.652054795, \"passed\": false}, {\"check\": \"regression two piece split 2\", \"actual\": 5.956164384, \"expected\": 5.950684932, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 3.873972603, \"expected\": 3.871232877, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 4.347945205, \"expected\": 4.345205479, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.001377349, \"expected\": 1.001377349, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.12295082, \"expected\": 0.12295082, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.493150685, \"expected\": 0.493150685, \"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."}}