{"abstract":"Pieces in 1900 or 2100 are divided by 366.","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":"Excluding all century years breaks the year 2000, which is a leap year.","family":"w2-bond_day_count_conventions-act-act-isda-gregorian-century-rule","id":"FA-60916","implementations":{"attempt":{"sha256":"f7c6c2d814d04cc79ac8ab8ec3cc8747a0e86974c907ae842987975abc7fac36","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\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 gregorian century rule 1', [[1900, 12, 12], [1902, 9, 11]], 1.747945205], ['regression gregorian century rule 2', [[2100, 8, 7], [2101, 12, 23]], 1.378082192], ['partial repair probe 1', [[1998, 2, 12], [2003, 1, 12]], 4.915068493], ['partial repair probe 2', [[1997, 7, 29], [2000, 4, 3]], 2.681495621], ['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', [[2061, 4, 23], [2062, 11, 8]], 1.545205479], ['normal control 2', [[1965, 4, 28], [1968, 2, 22]], 2.821528558]], [['regression gregorian century rule 1', [[1897, 6, 13], [1901, 8, 19]], 4.183561644], ['regression gregorian century rule 2', [[1900, 4, 25], [1901, 1, 27]], 0.75890411], ['partial repair probe 1', [[2000, 2, 29], [2002, 8, 10]], 2.444277266], ['partial repair probe 2', [[1997, 3, 20], [2001, 12, 29]], 4.778082192], ['boundary control 1', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['normal control 1', [[1982, 10, 1], [1983, 8, 2]], 0.835616438], ['normal control 2', [[1918, 6, 30], [1919, 7, 5]], 1.01369863]], [['regression gregorian century rule 1', [[1899, 7, 30], [1900, 6, 17]], 0.882191781], ['regression gregorian century rule 2', [[2100, 12, 19], [2101, 2, 1]], 0.120547945], ['partial repair probe 1', [[1997, 9, 30], [2002, 8, 23]], 4.895890411], ['partial repair probe 2', [[1997, 5, 12], [2000, 7, 5]], 3.149292612], ['boundary control 1', [[2023, 7, 1], [2024, 7, 1]], 1.001377349], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[2013, 5, 17], [2013, 4, 26]], 'end before start'], ['normal control 2', [[2054, 4, 24], [2054, 11, 1]], 0.523287671]], [['regression gregorian century rule 1', [[1899, 12, 30], [1900, 12, 25]], 0.98630137], ['regression gregorian century rule 2', [[1896, 10, 28], [1900, 5, 19]], 3.55567782], ['partial repair probe 1', [[1997, 4, 13], [2000, 11, 7]], 3.570274721], ['partial repair probe 2', [[2000, 8, 26], [2003, 12, 27]], 3.336028146], ['boundary control 1', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[1970, 8, 5], [1974, 7, 27]], 3.975342466], ['normal control 2', [[1903, 8, 26], [1909, 7, 28]], 5.920547945]], [['regression gregorian century rule 1', [[1898, 8, 12], [1900, 12, 29]], 2.380821918], ['regression gregorian century rule 2', [[2100, 9, 30], [2106, 3, 21]], 5.471232877], ['partial repair probe 1', [[1998, 2, 27], [2002, 8, 30]], 4.504109589], ['partial repair probe 2', [[1999, 1, 19], [2004, 3, 23]], 5.174728647], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[1940, 8, 16], [1943, 2, 14]], 2.497597126], ['normal control 2', [[1986, 3, 5], [1986, 11, 19]], 0.709589041]]]\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":"44fe59aa40a6ce1d306282d528c46e932988c7ffb3d31b2a297ce14d951020b9","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\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 gregorian century rule 1', [[1900, 12, 12], [1902, 9, 11]], 1.747945205], ['regression gregorian century rule 2', [[2100, 8, 7], [2101, 12, 23]], 1.378082192], ['partial repair probe 1', [[1998, 2, 12], [2003, 1, 12]], 4.915068493], ['partial repair probe 2', [[1997, 7, 29], [2000, 4, 3]], 2.681495621], ['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', [[2061, 4, 23], [2062, 11, 8]], 1.545205479], ['normal control 2', [[1965, 4, 28], [1968, 2, 22]], 2.821528558]], [['regression gregorian century rule 1', [[1897, 6, 13], [1901, 8, 19]], 4.183561644], ['regression gregorian century rule 2', [[1900, 4, 25], [1901, 1, 27]], 0.75890411], ['partial repair probe 1', [[2000, 2, 29], [2002, 8, 10]], 2.444277266], ['partial repair probe 2', [[1997, 3, 20], [2001, 12, 29]], 4.778082192], ['boundary control 1', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['normal control 1', [[1982, 10, 1], [1983, 8, 2]], 0.835616438], ['normal control 2', [[1918, 6, 30], [1919, 7, 5]], 1.01369863]], [['regression gregorian century rule 1', [[1899, 7, 30], [1900, 6, 17]], 0.882191781], ['regression gregorian century rule 2', [[2100, 12, 19], [2101, 2, 1]], 0.120547945], ['partial repair probe 1', [[1997, 9, 30], [2002, 8, 23]], 4.895890411], ['partial repair probe 2', [[1997, 5, 12], [2000, 7, 5]], 3.149292612], ['boundary control 1', [[2023, 7, 1], [2024, 7, 1]], 1.001377349], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[2013, 5, 17], [2013, 4, 26]], 'end before start'], ['normal control 2', [[2054, 4, 24], [2054, 11, 1]], 0.523287671]], [['regression gregorian century rule 1', [[1899, 12, 30], [1900, 12, 25]], 0.98630137], ['regression gregorian century rule 2', [[1896, 10, 28], [1900, 5, 19]], 3.55567782], ['partial repair probe 1', [[1997, 4, 13], [2000, 11, 7]], 3.570274721], ['partial repair probe 2', [[2000, 8, 26], [2003, 12, 27]], 3.336028146], ['boundary control 1', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[1970, 8, 5], [1974, 7, 27]], 3.975342466], ['normal control 2', [[1903, 8, 26], [1909, 7, 28]], 5.920547945]], [['regression gregorian century rule 1', [[1898, 8, 12], [1900, 12, 29]], 2.380821918], ['regression gregorian century rule 2', [[2100, 9, 30], [2106, 3, 21]], 5.471232877], ['partial repair probe 1', [[1998, 2, 27], [2002, 8, 30]], 4.504109589], ['partial repair probe 2', [[1999, 1, 19], [2004, 3, 23]], 5.174728647], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[1940, 8, 16], [1943, 2, 14]], 2.497597126], ['normal control 2', [[1986, 3, 5], [1986, 11, 19]], 0.709589041]]]\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":"a055fa60a2be860bec4e38b2cff2f35d3ba2c6cffac5d7e3a52c6e0d52242f08","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 gregorian century rule 1', [[1900, 12, 12], [1902, 9, 11]], 1.747945205], ['regression gregorian century rule 2', [[2100, 8, 7], [2101, 12, 23]], 1.378082192], ['partial repair probe 1', [[1998, 2, 12], [2003, 1, 12]], 4.915068493], ['partial repair probe 2', [[1997, 7, 29], [2000, 4, 3]], 2.681495621], ['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', [[2061, 4, 23], [2062, 11, 8]], 1.545205479], ['normal control 2', [[1965, 4, 28], [1968, 2, 22]], 2.821528558]], [['regression gregorian century rule 1', [[1897, 6, 13], [1901, 8, 19]], 4.183561644], ['regression gregorian century rule 2', [[1900, 4, 25], [1901, 1, 27]], 0.75890411], ['partial repair probe 1', [[2000, 2, 29], [2002, 8, 10]], 2.444277266], ['partial repair probe 2', [[1997, 3, 20], [2001, 12, 29]], 4.778082192], ['boundary control 1', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['normal control 1', [[1982, 10, 1], [1983, 8, 2]], 0.835616438], ['normal control 2', [[1918, 6, 30], [1919, 7, 5]], 1.01369863]], [['regression gregorian century rule 1', [[1899, 7, 30], [1900, 6, 17]], 0.882191781], ['regression gregorian century rule 2', [[2100, 12, 19], [2101, 2, 1]], 0.120547945], ['partial repair probe 1', [[1997, 9, 30], [2002, 8, 23]], 4.895890411], ['partial repair probe 2', [[1997, 5, 12], [2000, 7, 5]], 3.149292612], ['boundary control 1', [[2023, 7, 1], [2024, 7, 1]], 1.001377349], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[2013, 5, 17], [2013, 4, 26]], 'end before start'], ['normal control 2', [[2054, 4, 24], [2054, 11, 1]], 0.523287671]], [['regression gregorian century rule 1', [[1899, 12, 30], [1900, 12, 25]], 0.98630137], ['regression gregorian century rule 2', [[1896, 10, 28], [1900, 5, 19]], 3.55567782], ['partial repair probe 1', [[1997, 4, 13], [2000, 11, 7]], 3.570274721], ['partial repair probe 2', [[2000, 8, 26], [2003, 12, 27]], 3.336028146], ['boundary control 1', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['boundary control 2', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[1970, 8, 5], [1974, 7, 27]], 3.975342466], ['normal control 2', [[1903, 8, 26], [1909, 7, 28]], 5.920547945]], [['regression gregorian century rule 1', [[1898, 8, 12], [1900, 12, 29]], 2.380821918], ['regression gregorian century rule 2', [[2100, 9, 30], [2106, 3, 21]], 5.471232877], ['partial repair probe 1', [[1998, 2, 27], [2002, 8, 30]], 4.504109589], ['partial repair probe 2', [[1999, 1, 19], [2004, 3, 23]], 5.174728647], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[1940, 8, 16], [1943, 2, 14]], 2.497597126], ['normal control 2', [[1986, 3, 5], [1986, 11, 19]], 0.709589041]]]\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-gregorian-century-rule","generated_at":"2026-09-29T14:46:50.030303+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":"Apply the full Gregorian rule including the 100 and 400 exceptions.","root_cause":"The leap test only checks divisibility by four.","sha256":"b10e58b7a6dfba41afee3f10c9aaec25531878180ac468c691614dbf625c9e76","title":"Act/Act ISDA year fraction: century years are all treated as leap years · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.684,"exit_code":1,"observations":[{"actual":1.747945205,"check":"regression gregorian century rule 1","expected":1.747945205,"passed":true},{"actual":1.378082192,"check":"regression gregorian century rule 2","expected":1.378082192,"passed":true},{"actual":4.917808219,"check":"partial repair probe 1","expected":4.915068493,"passed":false},{"actual":2.682191781,"check":"partial repair probe 2","expected":2.681495621,"passed":false},{"actual":1.0,"check":"boundary control 1","expected":1.0,"passed":true},{"actual":0.0,"check":"boundary control 2","expected":0.0,"passed":true},{"actual":1.545205479,"check":"normal control 1","expected":1.545205479,"passed":true},{"actual":2.821528558,"check":"normal control 2","expected":2.821528558,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression gregorian century rule 1\", \"actual\": 1.747945205, \"expected\": 1.747945205, \"passed\": true}, {\"check\": \"regression gregorian century rule 2\", \"actual\": 1.378082192, \"expected\": 1.378082192, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 4.917808219, \"expected\": 4.915068493, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 2.682191781, \"expected\": 2.681495621, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.545205479, \"expected\": 1.545205479, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 2.821528558, \"expected\": 2.821528558, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.208,"exit_code":1,"observations":[{"actual":1.747795494,"check":"regression gregorian century rule 1","expected":1.747945205,"passed":false},{"actual":1.37698181,"check":"regression gregorian century rule 2","expected":1.378082192,"passed":false},{"actual":4.915068493,"check":"partial repair probe 1","expected":4.915068493,"passed":true},{"actual":2.681495621,"check":"partial repair probe 2","expected":2.681495621,"passed":true},{"actual":1.0,"check":"boundary control 1","expected":1.0,"passed":true},{"actual":0.0,"check":"boundary control 2","expected":0.0,"passed":true},{"actual":1.545205479,"check":"normal control 1","expected":1.545205479,"passed":true},{"actual":2.821528558,"check":"normal control 2","expected":2.821528558,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression gregorian century rule 1\", \"actual\": 1.747795494, \"expected\": 1.747945205, \"passed\": false}, {\"check\": \"regression gregorian century rule 2\", \"actual\": 1.37698181, \"expected\": 1.378082192, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 4.915068493, \"expected\": 4.915068493, \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": 2.681495621, \"expected\": 2.681495621, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.545205479, \"expected\": 1.545205479, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 2.821528558, \"expected\": 2.821528558, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.66,"exit_code":0,"observations":[{"actual":1.747945205,"check":"regression gregorian century rule 1","expected":1.747945205,"passed":true},{"actual":1.378082192,"check":"regression gregorian century rule 2","expected":1.378082192,"passed":true},{"actual":4.915068493,"check":"partial repair probe 1","expected":4.915068493,"passed":true},{"actual":2.681495621,"check":"partial repair probe 2","expected":2.681495621,"passed":true},{"actual":1.0,"check":"boundary control 1","expected":1.0,"passed":true},{"actual":0.0,"check":"boundary control 2","expected":0.0,"passed":true},{"actual":1.545205479,"check":"normal control 1","expected":1.545205479,"passed":true},{"actual":2.821528558,"check":"normal control 2","expected":2.821528558,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression gregorian century rule 1\", \"actual\": 1.747945205, \"expected\": 1.747945205, \"passed\": true}, {\"check\": \"regression gregorian century rule 2\", \"actual\": 1.378082192, \"expected\": 1.378082192, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 4.915068493, \"expected\": 4.915068493, \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": 2.681495621, \"expected\": 2.681495621, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.545205479, \"expected\": 1.545205479, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 2.821528558, \"expected\": 2.821528558, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}