{"abstract":"Callers passing dates in the wrong order get a positive fraction instead of an error value.","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":"Returning 0.0 hides the reversed input as an empty accrual.","family":"w2-bond_day_count_conventions-act-act-isda-reversed-interval-handling","id":"FA-60931","implementations":{"attempt":{"sha256":"cad8fc0fef77633805d2c4f0b7c60de28c8cfdb105d82b0fa2e4622ab5c522d0","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 0.0\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 reversed interval handling 1', [[2045, 10, 29], [2045, 10, 26]], 'end before start'], ['regression reversed interval handling 2', [[2093, 7, 30], [2093, 6, 25]], 'end before start'], ['partial repair probe 1', [[1925, 1, 13], [1924, 12, 14]], 'end before start'], ['partial repair probe 2', [[1922, 10, 16], [1922, 10, 9]], 'end before start'], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['normal control 1', [[1926, 2, 28], [1927, 1, 25]], 0.906849315], ['normal control 2', [[1960, 4, 12], [1961, 5, 15]], 1.088434763]], [['regression reversed interval handling 1', [[1916, 6, 29], [1916, 6, 19]], 'end before start'], ['regression reversed interval handling 2', [[2060, 7, 28], [2060, 6, 19]], 'end before start'], ['partial repair probe 1', [[2056, 2, 28], [2056, 1, 30]], 'end before start'], ['partial repair probe 2', [[1920, 8, 13], [1920, 7, 14]], 'end before start'], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[2061, 10, 31], [2062, 1, 9]], 0.191780822], ['normal control 2', [[2091, 5, 1], [2094, 3, 23]], 2.893150685]], [['regression reversed interval handling 1', [[2006, 3, 31], [2006, 2, 22]], 'end before start'], ['regression reversed interval handling 2', [[2045, 8, 19], [2045, 7, 31]], 'end before start'], ['partial repair probe 1', [[2006, 12, 29], [2006, 11, 27]], 'end before start'], ['partial repair probe 2', [[1950, 4, 8], [1950, 3, 6]], 'end before start'], ['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', [[2094, 3, 31], [2096, 2, 10]], 1.865454001], ['normal control 2', [[2061, 8, 20], [2067, 4, 16]], 5.654794521]], [['regression reversed interval handling 1', [[2094, 7, 1], [2094, 6, 30]], 'end before start'], ['regression reversed interval handling 2', [[2051, 10, 26], [2051, 9, 25]], 'end before start'], ['partial repair probe 1', [[2036, 10, 28], [2036, 9, 26]], 'end before start'], ['partial repair probe 2', [[1935, 6, 19], [1935, 6, 17]], 'end before start'], ['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', [[1910, 1, 6], [1914, 6, 27]], 4.471232877], ['normal control 2', [[2074, 6, 24], [2074, 7, 3]], 0.024657534]], [['regression reversed interval handling 1', [[2053, 9, 30], [2053, 9, 9]], 'end before start'], ['regression reversed interval handling 2', [[1939, 3, 31], [1939, 3, 29]], 'end before start'], ['partial repair probe 1', [[1939, 10, 1], [1939, 9, 3]], 'end before start'], ['partial repair probe 2', [[2067, 10, 31], [2067, 9, 22]], 'end before start'], ['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', [[1911, 4, 24], [1914, 11, 14]], 3.55890411], ['normal control 2', [[1976, 4, 7], [1977, 1, 18]], 0.78154802]]]\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":"e1e1126c1c6fa88d0db3e56fcec7a932602ddec661c77d492cbfbabc4d0a678d","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        A, B = B, A\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 reversed interval handling 1', [[2045, 10, 29], [2045, 10, 26]], 'end before start'], ['regression reversed interval handling 2', [[2093, 7, 30], [2093, 6, 25]], 'end before start'], ['partial repair probe 1', [[1925, 1, 13], [1924, 12, 14]], 'end before start'], ['partial repair probe 2', [[1922, 10, 16], [1922, 10, 9]], 'end before start'], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['normal control 1', [[1926, 2, 28], [1927, 1, 25]], 0.906849315], ['normal control 2', [[1960, 4, 12], [1961, 5, 15]], 1.088434763]], [['regression reversed interval handling 1', [[1916, 6, 29], [1916, 6, 19]], 'end before start'], ['regression reversed interval handling 2', [[2060, 7, 28], [2060, 6, 19]], 'end before start'], ['partial repair probe 1', [[2056, 2, 28], [2056, 1, 30]], 'end before start'], ['partial repair probe 2', [[1920, 8, 13], [1920, 7, 14]], 'end before start'], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[2061, 10, 31], [2062, 1, 9]], 0.191780822], ['normal control 2', [[2091, 5, 1], [2094, 3, 23]], 2.893150685]], [['regression reversed interval handling 1', [[2006, 3, 31], [2006, 2, 22]], 'end before start'], ['regression reversed interval handling 2', [[2045, 8, 19], [2045, 7, 31]], 'end before start'], ['partial repair probe 1', [[2006, 12, 29], [2006, 11, 27]], 'end before start'], ['partial repair probe 2', [[1950, 4, 8], [1950, 3, 6]], 'end before start'], ['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', [[2094, 3, 31], [2096, 2, 10]], 1.865454001], ['normal control 2', [[2061, 8, 20], [2067, 4, 16]], 5.654794521]], [['regression reversed interval handling 1', [[2094, 7, 1], [2094, 6, 30]], 'end before start'], ['regression reversed interval handling 2', [[2051, 10, 26], [2051, 9, 25]], 'end before start'], ['partial repair probe 1', [[2036, 10, 28], [2036, 9, 26]], 'end before start'], ['partial repair probe 2', [[1935, 6, 19], [1935, 6, 17]], 'end before start'], ['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', [[1910, 1, 6], [1914, 6, 27]], 4.471232877], ['normal control 2', [[2074, 6, 24], [2074, 7, 3]], 0.024657534]], [['regression reversed interval handling 1', [[2053, 9, 30], [2053, 9, 9]], 'end before start'], ['regression reversed interval handling 2', [[1939, 3, 31], [1939, 3, 29]], 'end before start'], ['partial repair probe 1', [[1939, 10, 1], [1939, 9, 3]], 'end before start'], ['partial repair probe 2', [[2067, 10, 31], [2067, 9, 22]], 'end before start'], ['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', [[1911, 4, 24], [1914, 11, 14]], 3.55890411], ['normal control 2', [[1976, 4, 7], [1977, 1, 18]], 0.78154802]]]\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":"2bc05af00fd505a4459ad9492a1b1189ea401e012cc442e144bb38722b2b527e","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 reversed interval handling 1', [[2045, 10, 29], [2045, 10, 26]], 'end before start'], ['regression reversed interval handling 2', [[2093, 7, 30], [2093, 6, 25]], 'end before start'], ['partial repair probe 1', [[1925, 1, 13], [1924, 12, 14]], 'end before start'], ['partial repair probe 2', [[1922, 10, 16], [1922, 10, 9]], 'end before start'], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['boundary control 2', [[2024, 1, 1], [2025, 1, 1]], 1.0], ['normal control 1', [[1926, 2, 28], [1927, 1, 25]], 0.906849315], ['normal control 2', [[1960, 4, 12], [1961, 5, 15]], 1.088434763]], [['regression reversed interval handling 1', [[1916, 6, 29], [1916, 6, 19]], 'end before start'], ['regression reversed interval handling 2', [[2060, 7, 28], [2060, 6, 19]], 'end before start'], ['partial repair probe 1', [[2056, 2, 28], [2056, 1, 30]], 'end before start'], ['partial repair probe 2', [[1920, 8, 13], [1920, 7, 14]], 'end before start'], ['boundary control 1', [[2099, 12, 1], [2100, 3, 1]], 0.246575342], ['boundary control 2', [[2023, 12, 31], [2024, 1, 1]], 0.002739726], ['normal control 1', [[2061, 10, 31], [2062, 1, 9]], 0.191780822], ['normal control 2', [[2091, 5, 1], [2094, 3, 23]], 2.893150685]], [['regression reversed interval handling 1', [[2006, 3, 31], [2006, 2, 22]], 'end before start'], ['regression reversed interval handling 2', [[2045, 8, 19], [2045, 7, 31]], 'end before start'], ['partial repair probe 1', [[2006, 12, 29], [2006, 11, 27]], 'end before start'], ['partial repair probe 2', [[1950, 4, 8], [1950, 3, 6]], 'end before start'], ['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', [[2094, 3, 31], [2096, 2, 10]], 1.865454001], ['normal control 2', [[2061, 8, 20], [2067, 4, 16]], 5.654794521]], [['regression reversed interval handling 1', [[2094, 7, 1], [2094, 6, 30]], 'end before start'], ['regression reversed interval handling 2', [[2051, 10, 26], [2051, 9, 25]], 'end before start'], ['partial repair probe 1', [[2036, 10, 28], [2036, 9, 26]], 'end before start'], ['partial repair probe 2', [[1935, 6, 19], [1935, 6, 17]], 'end before start'], ['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', [[1910, 1, 6], [1914, 6, 27]], 4.471232877], ['normal control 2', [[2074, 6, 24], [2074, 7, 3]], 0.024657534]], [['regression reversed interval handling 1', [[2053, 9, 30], [2053, 9, 9]], 'end before start'], ['regression reversed interval handling 2', [[1939, 3, 31], [1939, 3, 29]], 'end before start'], ['partial repair probe 1', [[1939, 10, 1], [1939, 9, 3]], 'end before start'], ['partial repair probe 2', [[2067, 10, 31], [2067, 9, 22]], 'end before start'], ['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', [[1911, 4, 24], [1914, 11, 14]], 3.55890411], ['normal control 2', [[1976, 4, 7], [1977, 1, 18]], 0.78154802]]]\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-reversed-interval-handling","generated_at":"2026-09-29T14:46:50.254900+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":"Return \"end before start\" when the end precedes the start.","root_cause":"The guard swaps the dates instead of reporting the reversed input.","sha256":"a72c61bbd2f529a6199f4660f03b316cc359792050d12ef6060aa865aef74526","title":"Act/Act ISDA year fraction: a reversed interval is silently swapped · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.07,"exit_code":1,"observations":[{"actual":0.0,"check":"regression reversed interval handling 1","expected":"end before start","passed":false},{"actual":0.0,"check":"regression reversed interval handling 2","expected":"end before start","passed":false},{"actual":0.0,"check":"partial repair probe 1","expected":"end before start","passed":false},{"actual":0.0,"check":"partial repair probe 2","expected":"end before start","passed":false},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":1.0,"check":"boundary control 2","expected":1.0,"passed":true},{"actual":0.906849315,"check":"normal control 1","expected":0.906849315,"passed":true},{"actual":1.088434763,"check":"normal control 2","expected":1.088434763,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression reversed interval handling 1\", \"actual\": 0.0, \"expected\": \"end before start\", \"passed\": false}, {\"check\": \"regression reversed interval handling 2\", \"actual\": 0.0, \"expected\": \"end before start\", \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 0.0, \"expected\": \"end before start\", \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 0.0, \"expected\": \"end before start\", \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.906849315, \"expected\": 0.906849315, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 1.088434763, \"expected\": 1.088434763, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.883,"exit_code":1,"observations":[{"actual":0.008219178,"check":"regression reversed interval handling 1","expected":"end before start","passed":false},{"actual":0.095890411,"check":"regression reversed interval handling 2","expected":"end before start","passed":false},{"actual":0.08205704,"check":"partial repair probe 1","expected":"end before start","passed":false},{"actual":0.019178082,"check":"partial repair probe 2","expected":"end before start","passed":false},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":1.0,"check":"boundary control 2","expected":1.0,"passed":true},{"actual":0.906849315,"check":"normal control 1","expected":0.906849315,"passed":true},{"actual":1.088434763,"check":"normal control 2","expected":1.088434763,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression reversed interval handling 1\", \"actual\": 0.008219178, \"expected\": \"end before start\", \"passed\": false}, {\"check\": \"regression reversed interval handling 2\", \"actual\": 0.095890411, \"expected\": \"end before start\", \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 0.08205704, \"expected\": \"end before start\", \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 0.019178082, \"expected\": \"end before start\", \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.906849315, \"expected\": 0.906849315, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 1.088434763, \"expected\": 1.088434763, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.553,"exit_code":0,"observations":[{"actual":"end before start","check":"regression reversed interval handling 1","expected":"end before start","passed":true},{"actual":"end before start","check":"regression reversed interval handling 2","expected":"end before start","passed":true},{"actual":"end before start","check":"partial repair probe 1","expected":"end before start","passed":true},{"actual":"end before start","check":"partial repair probe 2","expected":"end before start","passed":true},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":1.0,"check":"boundary control 2","expected":1.0,"passed":true},{"actual":0.906849315,"check":"normal control 1","expected":0.906849315,"passed":true},{"actual":1.088434763,"check":"normal control 2","expected":1.088434763,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression reversed interval handling 1\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"regression reversed interval handling 2\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.906849315, \"expected\": 0.906849315, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 1.088434763, \"expected\": 1.088434763, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}