{"abstract":"Unadjusted-accrual swaps accrue on adjusted dates and vice versa.","category":"Bond day-count conventions","checks":8,"contract":"Inputs an unadjusted schedule (first element is the accrual start), holidays and a flag. Business days are weekdays not in holidays; adjustment is modified following. For each period the payment date is the adjusted end date; accrual days use adjusted start and end if the flag is set, otherwise the unadjusted dates. Return [[payment date, accrual days], ...].","evaluation_group":"w2-bond_day_count_conventions-adjusted-accrual-periods","failed_approach":"Adjusting only the accrual end date when the flag is set leaves the start unadjusted.","family":"w2-bond_day_count_conventions-adjusted-accrual-periods-accrual-adjustment-flag","id":"FA-61261","implementations":{"attempt":{"sha256":"8c3d9345d027bf27eff5789fc8fff5ed0657d46f4284656b7afe48c082a21932","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nN = 1\nobservations = []\ndef solve(dates, holidays, adjust_accrual):\n    H = {datetime.date(*h) for h in holidays}\n    def biz(x):\n        return x.weekday() < 5 and x not in H\n    def fwd(x):\n        while not biz(x):\n            x += datetime.timedelta(days=1)\n        return x\n    def bwd(x):\n        while not biz(x):\n            x -= datetime.timedelta(days=1)\n        return x\n    def mf(x):\n        f = fwd(x)\n        return f if f.month == x.month else bwd(x)\n    out = []\n    for i in range(1, len(dates)):\n        s = datetime.date(*dates[i - 1])\n        e = datetime.date(*dates[i])\n        pay = mf(e)\n        if adjust_accrual:\n            e = mf(e)\n        out.append([[pay.year, pay.month, pay.day], (e - s).days])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression accrual adjustment flag 1', [[[2027, 5, 30], [2027, 6, 30], [2027, 7, 30], [2027, 8, 30], [2027, 9, 30]], [[2027, 9, 30]], True], [[[2027, 6, 30], 30], [[2027, 7, 30], 30], [[2027, 8, 30], 31], [[2027, 9, 29], 30]]], ['regression accrual adjustment flag 2', [[[2029, 7, 31], [2029, 8, 31], [2029, 9, 30], [2029, 10, 31]], [[2029, 9, 30]], False], [[[2029, 8, 31], 31], [[2029, 9, 28], 30], [[2029, 10, 31], 31]]], ['partial repair probe 1', [[[2027, 8, 15], [2027, 11, 15]], [[2027, 8, 17], [2027, 11, 15]], True], [[[2027, 11, 16], 92]]], ['partial repair probe 2', [[[2030, 2, 3], [2030, 3, 3]], [[2030, 3, 3]], True], [[[2030, 3, 4], 28]]], ['normal control 1', [[[2022, 2, 17], [2022, 8, 17]], [], True], [[[2022, 8, 17], 181]]], ['normal control 2', [[[2022, 9, 20], [2023, 3, 20], [2023, 9, 20], [2024, 3, 20], [2024, 9, 20]], [[2024, 3, 22]], True], [[[2023, 3, 20], 181], [[2023, 9, 20], 184], [[2024, 3, 20], 182], [[2024, 9, 20], 184]]], ['normal control 3', [[[2029, 2, 28], [2029, 3, 28]], [], False], [[[2029, 3, 28], 28]]], ['normal control 4', [[[2024, 9, 5], [2025, 3, 5], [2025, 9, 5]], [], False], [[[2025, 3, 5], 181], [[2025, 9, 5], 184]]]], [['regression accrual adjustment flag 1', [[[2019, 9, 30], [2019, 10, 30], [2019, 11, 30], [2019, 12, 30]], [[2019, 12, 2], [2020, 1, 1]], False], [[[2019, 10, 30], 30], [[2019, 11, 29], 31], [[2019, 12, 30], 30]]], ['regression accrual adjustment flag 2', [[[2020, 11, 30], [2021, 2, 28], [2021, 5, 30]], [[2021, 3, 1]], True], [[[2021, 2, 26], 88], [[2021, 5, 31], 94]]], ['partial repair probe 1', [[[2026, 1, 5], [2026, 4, 5]], [[2026, 1, 5]], True], [[[2026, 4, 6], 90]]], ['partial repair probe 2', [[[2029, 7, 29], [2030, 1, 29]], [[2030, 1, 29]], True], [[[2030, 1, 30], 184]]], ['normal control 1', [[[2026, 5, 25], [2026, 8, 25], [2026, 11, 25], [2027, 2, 25]], [[2026, 8, 26], [2026, 11, 26]], False], [[[2026, 8, 25], 92], [[2026, 11, 25], 92], [[2027, 2, 25], 92]]], ['normal control 2', [[[2026, 9, 30], [2026, 12, 30], [2027, 3, 30], [2027, 6, 30], [2027, 9, 30]], [[2027, 4, 1]], True], [[[2026, 12, 30], 91], [[2027, 3, 30], 90], [[2027, 6, 30], 92], [[2027, 9, 30], 92]]], ['normal control 3', [[[2025, 10, 30], [2026, 4, 30]], [], True], [[[2026, 4, 30], 182]]], ['normal control 4', [[[2025, 12, 31], [2026, 3, 31], [2026, 6, 30], [2026, 9, 30]], [[2026, 4, 2], [2026, 7, 1]], False], [[[2026, 3, 31], 90], [[2026, 6, 30], 91], [[2026, 9, 30], 92]]]], [['regression accrual adjustment flag 1', [[[2027, 4, 30], [2027, 10, 30], [2028, 4, 30], [2028, 10, 30], [2029, 4, 30]], [[2027, 4, 30]], True], [[[2027, 10, 29], 183], [[2028, 4, 28], 182], [[2028, 10, 30], 185], [[2029, 4, 30], 182]]], ['regression accrual adjustment flag 2', [[[2023, 2, 28], [2023, 5, 28], [2023, 8, 28], [2023, 11, 28]], [[2023, 5, 30]], True], [[[2023, 5, 29], 90], [[2023, 8, 28], 91], [[2023, 11, 28], 92]]], ['partial repair probe 1', [[[2024, 5, 31], [2024, 11, 30]], [[2024, 5, 31], [2024, 12, 1]], True], [[[2024, 11, 29], 183]]], ['partial repair probe 2', [[[2029, 3, 31], [2029, 6, 30]], [[2029, 7, 1]], True], [[[2029, 6, 29], 91]]], ['normal control 1', [[[2029, 8, 28], [2030, 2, 28], [2030, 8, 28], [2031, 2, 28], [2031, 8, 28]], [[2029, 8, 30], [2030, 8, 30], [2031, 8, 30]], False], [[[2030, 2, 28], 184], [[2030, 8, 28], 181], [[2031, 2, 28], 184], [[2031, 8, 28], 181]]], ['normal control 2', [[[2023, 3, 1], [2023, 9, 1]], [[2023, 3, 2]], True], [[[2023, 9, 1], 184]]], ['normal control 3', [[[2022, 3, 16], [2022, 6, 16], [2022, 9, 16], [2022, 12, 16], [2023, 3, 16]], [[2022, 9, 18], [2023, 3, 17]], False], [[[2022, 6, 16], 92], [[2022, 9, 16], 92], [[2022, 12, 16], 91], [[2023, 3, 16], 90]]], ['normal control 4', [[[2029, 12, 22], [2030, 6, 22]], [], False], [[[2030, 6, 24], 182]]]], [['regression accrual adjustment flag 1', [[[2023, 10, 11], [2024, 4, 11], [2024, 10, 11], [2025, 4, 11]], [[2023, 10, 13], [2024, 4, 12], [2024, 10, 11]], True], [[[2024, 4, 11], 183], [[2024, 10, 14], 186], [[2025, 4, 11], 179]]], ['regression accrual adjustment flag 2', [[[2030, 9, 28], [2030, 12, 28], [2031, 3, 28]], [[2031, 3, 28]], True], [[[2030, 12, 30], 91], [[2031, 3, 31], 91]]], ['partial repair probe 1', [[[2021, 9, 30], [2021, 10, 30]], [[2021, 9, 30]], True], [[[2021, 10, 29], 30]]], ['partial repair probe 2', [[[2029, 3, 31], [2029, 6, 30]], [[2029, 3, 31], [2029, 7, 1]], True], [[[2029, 6, 29], 91]]], ['normal control 1', [[[2019, 2, 27], [2019, 5, 27]], [[2019, 5, 29]], False], [[[2019, 5, 27], 89]]], ['normal control 2', [[[2020, 6, 1], [2020, 12, 1], [2021, 6, 1], [2021, 12, 1]], [], False], [[[2020, 12, 1], 183], [[2021, 6, 1], 182], [[2021, 12, 1], 183]]], ['normal control 3', [[[2020, 12, 1], [2021, 3, 1], [2021, 6, 1]], [[2021, 3, 2]], True], [[[2021, 3, 1], 90], [[2021, 6, 1], 92]]], ['normal control 4', [[[2020, 3, 18], [2020, 6, 18], [2020, 9, 18]], [], True], [[[2020, 6, 18], 92], [[2020, 9, 18], 92]]]], [['regression accrual adjustment flag 1', [[[2029, 5, 28], [2029, 6, 28]], [[2029, 5, 29], [2029, 6, 28]], True], [[[2029, 6, 29], 32]]], ['regression accrual adjustment flag 2', [[[2019, 6, 22], [2019, 12, 22], [2020, 6, 22], [2020, 12, 22], [2021, 6, 22]], [[2019, 12, 24]], False], [[[2019, 12, 23], 183], [[2020, 6, 22], 183], [[2020, 12, 22], 183], [[2021, 6, 22], 182]]], ['partial repair probe 1', [[[2019, 8, 31], [2019, 11, 30]], [[2019, 9, 1], [2019, 12, 1]], True], [[[2019, 11, 29], 91]]], ['partial repair probe 2', [[[2026, 1, 31], [2026, 4, 30]], [[2026, 4, 30]], True], [[[2026, 4, 29], 89]]], ['normal control 1', [[[2024, 12, 31], [2025, 3, 31]], [], False], [[[2025, 3, 31], 90]]], ['normal control 2', [[[2022, 9, 30], [2023, 3, 30]], [[2022, 10, 1]], False], [[[2023, 3, 30], 181]]], ['normal control 3', [[[2020, 11, 30], [2020, 12, 30]], [[2021, 1, 1]], False], [[[2020, 12, 30], 30]]], ['normal control 4', [[[2021, 9, 28], [2021, 12, 28], [2022, 3, 28], [2022, 6, 28], [2022, 9, 28]], [[2022, 9, 29]], False], [[[2021, 12, 28], 91], [[2022, 3, 28], 90], [[2022, 6, 28], 92], [[2022, 9, 28], 92]]]]]\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":"8dd62ed933a091123018eb8664f76166d249b345d55c557748c24d9f1b655f99","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nN = 1\nobservations = []\ndef solve(dates, holidays, adjust_accrual):\n    H = {datetime.date(*h) for h in holidays}\n    def biz(x):\n        return x.weekday() < 5 and x not in H\n    def fwd(x):\n        while not biz(x):\n            x += datetime.timedelta(days=1)\n        return x\n    def bwd(x):\n        while not biz(x):\n            x -= datetime.timedelta(days=1)\n        return x\n    def mf(x):\n        f = fwd(x)\n        return f if f.month == x.month else bwd(x)\n    out = []\n    for i in range(1, len(dates)):\n        s = datetime.date(*dates[i - 1])\n        e = datetime.date(*dates[i])\n        pay = mf(e)\n        if not adjust_accrual:\n            s, e = mf(s), mf(e)\n        out.append([[pay.year, pay.month, pay.day], (e - s).days])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression accrual adjustment flag 1', [[[2027, 5, 30], [2027, 6, 30], [2027, 7, 30], [2027, 8, 30], [2027, 9, 30]], [[2027, 9, 30]], True], [[[2027, 6, 30], 30], [[2027, 7, 30], 30], [[2027, 8, 30], 31], [[2027, 9, 29], 30]]], ['regression accrual adjustment flag 2', [[[2029, 7, 31], [2029, 8, 31], [2029, 9, 30], [2029, 10, 31]], [[2029, 9, 30]], False], [[[2029, 8, 31], 31], [[2029, 9, 28], 30], [[2029, 10, 31], 31]]], ['partial repair probe 1', [[[2027, 8, 15], [2027, 11, 15]], [[2027, 8, 17], [2027, 11, 15]], True], [[[2027, 11, 16], 92]]], ['partial repair probe 2', [[[2030, 2, 3], [2030, 3, 3]], [[2030, 3, 3]], True], [[[2030, 3, 4], 28]]], ['normal control 1', [[[2022, 2, 17], [2022, 8, 17]], [], True], [[[2022, 8, 17], 181]]], ['normal control 2', [[[2022, 9, 20], [2023, 3, 20], [2023, 9, 20], [2024, 3, 20], [2024, 9, 20]], [[2024, 3, 22]], True], [[[2023, 3, 20], 181], [[2023, 9, 20], 184], [[2024, 3, 20], 182], [[2024, 9, 20], 184]]], ['normal control 3', [[[2029, 2, 28], [2029, 3, 28]], [], False], [[[2029, 3, 28], 28]]], ['normal control 4', [[[2024, 9, 5], [2025, 3, 5], [2025, 9, 5]], [], False], [[[2025, 3, 5], 181], [[2025, 9, 5], 184]]]], [['regression accrual adjustment flag 1', [[[2019, 9, 30], [2019, 10, 30], [2019, 11, 30], [2019, 12, 30]], [[2019, 12, 2], [2020, 1, 1]], False], [[[2019, 10, 30], 30], [[2019, 11, 29], 31], [[2019, 12, 30], 30]]], ['regression accrual adjustment flag 2', [[[2020, 11, 30], [2021, 2, 28], [2021, 5, 30]], [[2021, 3, 1]], True], [[[2021, 2, 26], 88], [[2021, 5, 31], 94]]], ['partial repair probe 1', [[[2026, 1, 5], [2026, 4, 5]], [[2026, 1, 5]], True], [[[2026, 4, 6], 90]]], ['partial repair probe 2', [[[2029, 7, 29], [2030, 1, 29]], [[2030, 1, 29]], True], [[[2030, 1, 30], 184]]], ['normal control 1', [[[2026, 5, 25], [2026, 8, 25], [2026, 11, 25], [2027, 2, 25]], [[2026, 8, 26], [2026, 11, 26]], False], [[[2026, 8, 25], 92], [[2026, 11, 25], 92], [[2027, 2, 25], 92]]], ['normal control 2', [[[2026, 9, 30], [2026, 12, 30], [2027, 3, 30], [2027, 6, 30], [2027, 9, 30]], [[2027, 4, 1]], True], [[[2026, 12, 30], 91], [[2027, 3, 30], 90], [[2027, 6, 30], 92], [[2027, 9, 30], 92]]], ['normal control 3', [[[2025, 10, 30], [2026, 4, 30]], [], True], [[[2026, 4, 30], 182]]], ['normal control 4', [[[2025, 12, 31], [2026, 3, 31], [2026, 6, 30], [2026, 9, 30]], [[2026, 4, 2], [2026, 7, 1]], False], [[[2026, 3, 31], 90], [[2026, 6, 30], 91], [[2026, 9, 30], 92]]]], [['regression accrual adjustment flag 1', [[[2027, 4, 30], [2027, 10, 30], [2028, 4, 30], [2028, 10, 30], [2029, 4, 30]], [[2027, 4, 30]], True], [[[2027, 10, 29], 183], [[2028, 4, 28], 182], [[2028, 10, 30], 185], [[2029, 4, 30], 182]]], ['regression accrual adjustment flag 2', [[[2023, 2, 28], [2023, 5, 28], [2023, 8, 28], [2023, 11, 28]], [[2023, 5, 30]], True], [[[2023, 5, 29], 90], [[2023, 8, 28], 91], [[2023, 11, 28], 92]]], ['partial repair probe 1', [[[2024, 5, 31], [2024, 11, 30]], [[2024, 5, 31], [2024, 12, 1]], True], [[[2024, 11, 29], 183]]], ['partial repair probe 2', [[[2029, 3, 31], [2029, 6, 30]], [[2029, 7, 1]], True], [[[2029, 6, 29], 91]]], ['normal control 1', [[[2029, 8, 28], [2030, 2, 28], [2030, 8, 28], [2031, 2, 28], [2031, 8, 28]], [[2029, 8, 30], [2030, 8, 30], [2031, 8, 30]], False], [[[2030, 2, 28], 184], [[2030, 8, 28], 181], [[2031, 2, 28], 184], [[2031, 8, 28], 181]]], ['normal control 2', [[[2023, 3, 1], [2023, 9, 1]], [[2023, 3, 2]], True], [[[2023, 9, 1], 184]]], ['normal control 3', [[[2022, 3, 16], [2022, 6, 16], [2022, 9, 16], [2022, 12, 16], [2023, 3, 16]], [[2022, 9, 18], [2023, 3, 17]], False], [[[2022, 6, 16], 92], [[2022, 9, 16], 92], [[2022, 12, 16], 91], [[2023, 3, 16], 90]]], ['normal control 4', [[[2029, 12, 22], [2030, 6, 22]], [], False], [[[2030, 6, 24], 182]]]], [['regression accrual adjustment flag 1', [[[2023, 10, 11], [2024, 4, 11], [2024, 10, 11], [2025, 4, 11]], [[2023, 10, 13], [2024, 4, 12], [2024, 10, 11]], True], [[[2024, 4, 11], 183], [[2024, 10, 14], 186], [[2025, 4, 11], 179]]], ['regression accrual adjustment flag 2', [[[2030, 9, 28], [2030, 12, 28], [2031, 3, 28]], [[2031, 3, 28]], True], [[[2030, 12, 30], 91], [[2031, 3, 31], 91]]], ['partial repair probe 1', [[[2021, 9, 30], [2021, 10, 30]], [[2021, 9, 30]], True], [[[2021, 10, 29], 30]]], ['partial repair probe 2', [[[2029, 3, 31], [2029, 6, 30]], [[2029, 3, 31], [2029, 7, 1]], True], [[[2029, 6, 29], 91]]], ['normal control 1', [[[2019, 2, 27], [2019, 5, 27]], [[2019, 5, 29]], False], [[[2019, 5, 27], 89]]], ['normal control 2', [[[2020, 6, 1], [2020, 12, 1], [2021, 6, 1], [2021, 12, 1]], [], False], [[[2020, 12, 1], 183], [[2021, 6, 1], 182], [[2021, 12, 1], 183]]], ['normal control 3', [[[2020, 12, 1], [2021, 3, 1], [2021, 6, 1]], [[2021, 3, 2]], True], [[[2021, 3, 1], 90], [[2021, 6, 1], 92]]], ['normal control 4', [[[2020, 3, 18], [2020, 6, 18], [2020, 9, 18]], [], True], [[[2020, 6, 18], 92], [[2020, 9, 18], 92]]]], [['regression accrual adjustment flag 1', [[[2029, 5, 28], [2029, 6, 28]], [[2029, 5, 29], [2029, 6, 28]], True], [[[2029, 6, 29], 32]]], ['regression accrual adjustment flag 2', [[[2019, 6, 22], [2019, 12, 22], [2020, 6, 22], [2020, 12, 22], [2021, 6, 22]], [[2019, 12, 24]], False], [[[2019, 12, 23], 183], [[2020, 6, 22], 183], [[2020, 12, 22], 183], [[2021, 6, 22], 182]]], ['partial repair probe 1', [[[2019, 8, 31], [2019, 11, 30]], [[2019, 9, 1], [2019, 12, 1]], True], [[[2019, 11, 29], 91]]], ['partial repair probe 2', [[[2026, 1, 31], [2026, 4, 30]], [[2026, 4, 30]], True], [[[2026, 4, 29], 89]]], ['normal control 1', [[[2024, 12, 31], [2025, 3, 31]], [], False], [[[2025, 3, 31], 90]]], ['normal control 2', [[[2022, 9, 30], [2023, 3, 30]], [[2022, 10, 1]], False], [[[2023, 3, 30], 181]]], ['normal control 3', [[[2020, 11, 30], [2020, 12, 30]], [[2021, 1, 1]], False], [[[2020, 12, 30], 30]]], ['normal control 4', [[[2021, 9, 28], [2021, 12, 28], [2022, 3, 28], [2022, 6, 28], [2022, 9, 28]], [[2022, 9, 29]], False], [[[2021, 12, 28], 91], [[2022, 3, 28], 90], [[2022, 6, 28], 92], [[2022, 9, 28], 92]]]]]\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":"f786be7fff49e1039eb5bf3667ab227a781c35e96f971b40f4cf5a8198fe180d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nN = 1\nobservations = []\ndef solve(dates, holidays, adjust_accrual):\n    H = {datetime.date(*h) for h in holidays}\n    def biz(x):\n        return x.weekday() < 5 and x not in H\n    def fwd(x):\n        while not biz(x):\n            x += datetime.timedelta(days=1)\n        return x\n    def bwd(x):\n        while not biz(x):\n            x -= datetime.timedelta(days=1)\n        return x\n    def mf(x):\n        f = fwd(x)\n        return f if f.month == x.month else bwd(x)\n    out = []\n    for i in range(1, len(dates)):\n        s = datetime.date(*dates[i - 1])\n        e = datetime.date(*dates[i])\n        pay = mf(e)\n        if adjust_accrual:\n            s, e = mf(s), mf(e)\n        out.append([[pay.year, pay.month, pay.day], (e - s).days])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression accrual adjustment flag 1', [[[2027, 5, 30], [2027, 6, 30], [2027, 7, 30], [2027, 8, 30], [2027, 9, 30]], [[2027, 9, 30]], True], [[[2027, 6, 30], 30], [[2027, 7, 30], 30], [[2027, 8, 30], 31], [[2027, 9, 29], 30]]], ['regression accrual adjustment flag 2', [[[2029, 7, 31], [2029, 8, 31], [2029, 9, 30], [2029, 10, 31]], [[2029, 9, 30]], False], [[[2029, 8, 31], 31], [[2029, 9, 28], 30], [[2029, 10, 31], 31]]], ['partial repair probe 1', [[[2027, 8, 15], [2027, 11, 15]], [[2027, 8, 17], [2027, 11, 15]], True], [[[2027, 11, 16], 92]]], ['partial repair probe 2', [[[2030, 2, 3], [2030, 3, 3]], [[2030, 3, 3]], True], [[[2030, 3, 4], 28]]], ['normal control 1', [[[2022, 2, 17], [2022, 8, 17]], [], True], [[[2022, 8, 17], 181]]], ['normal control 2', [[[2022, 9, 20], [2023, 3, 20], [2023, 9, 20], [2024, 3, 20], [2024, 9, 20]], [[2024, 3, 22]], True], [[[2023, 3, 20], 181], [[2023, 9, 20], 184], [[2024, 3, 20], 182], [[2024, 9, 20], 184]]], ['normal control 3', [[[2029, 2, 28], [2029, 3, 28]], [], False], [[[2029, 3, 28], 28]]], ['normal control 4', [[[2024, 9, 5], [2025, 3, 5], [2025, 9, 5]], [], False], [[[2025, 3, 5], 181], [[2025, 9, 5], 184]]]], [['regression accrual adjustment flag 1', [[[2019, 9, 30], [2019, 10, 30], [2019, 11, 30], [2019, 12, 30]], [[2019, 12, 2], [2020, 1, 1]], False], [[[2019, 10, 30], 30], [[2019, 11, 29], 31], [[2019, 12, 30], 30]]], ['regression accrual adjustment flag 2', [[[2020, 11, 30], [2021, 2, 28], [2021, 5, 30]], [[2021, 3, 1]], True], [[[2021, 2, 26], 88], [[2021, 5, 31], 94]]], ['partial repair probe 1', [[[2026, 1, 5], [2026, 4, 5]], [[2026, 1, 5]], True], [[[2026, 4, 6], 90]]], ['partial repair probe 2', [[[2029, 7, 29], [2030, 1, 29]], [[2030, 1, 29]], True], [[[2030, 1, 30], 184]]], ['normal control 1', [[[2026, 5, 25], [2026, 8, 25], [2026, 11, 25], [2027, 2, 25]], [[2026, 8, 26], [2026, 11, 26]], False], [[[2026, 8, 25], 92], [[2026, 11, 25], 92], [[2027, 2, 25], 92]]], ['normal control 2', [[[2026, 9, 30], [2026, 12, 30], [2027, 3, 30], [2027, 6, 30], [2027, 9, 30]], [[2027, 4, 1]], True], [[[2026, 12, 30], 91], [[2027, 3, 30], 90], [[2027, 6, 30], 92], [[2027, 9, 30], 92]]], ['normal control 3', [[[2025, 10, 30], [2026, 4, 30]], [], True], [[[2026, 4, 30], 182]]], ['normal control 4', [[[2025, 12, 31], [2026, 3, 31], [2026, 6, 30], [2026, 9, 30]], [[2026, 4, 2], [2026, 7, 1]], False], [[[2026, 3, 31], 90], [[2026, 6, 30], 91], [[2026, 9, 30], 92]]]], [['regression accrual adjustment flag 1', [[[2027, 4, 30], [2027, 10, 30], [2028, 4, 30], [2028, 10, 30], [2029, 4, 30]], [[2027, 4, 30]], True], [[[2027, 10, 29], 183], [[2028, 4, 28], 182], [[2028, 10, 30], 185], [[2029, 4, 30], 182]]], ['regression accrual adjustment flag 2', [[[2023, 2, 28], [2023, 5, 28], [2023, 8, 28], [2023, 11, 28]], [[2023, 5, 30]], True], [[[2023, 5, 29], 90], [[2023, 8, 28], 91], [[2023, 11, 28], 92]]], ['partial repair probe 1', [[[2024, 5, 31], [2024, 11, 30]], [[2024, 5, 31], [2024, 12, 1]], True], [[[2024, 11, 29], 183]]], ['partial repair probe 2', [[[2029, 3, 31], [2029, 6, 30]], [[2029, 7, 1]], True], [[[2029, 6, 29], 91]]], ['normal control 1', [[[2029, 8, 28], [2030, 2, 28], [2030, 8, 28], [2031, 2, 28], [2031, 8, 28]], [[2029, 8, 30], [2030, 8, 30], [2031, 8, 30]], False], [[[2030, 2, 28], 184], [[2030, 8, 28], 181], [[2031, 2, 28], 184], [[2031, 8, 28], 181]]], ['normal control 2', [[[2023, 3, 1], [2023, 9, 1]], [[2023, 3, 2]], True], [[[2023, 9, 1], 184]]], ['normal control 3', [[[2022, 3, 16], [2022, 6, 16], [2022, 9, 16], [2022, 12, 16], [2023, 3, 16]], [[2022, 9, 18], [2023, 3, 17]], False], [[[2022, 6, 16], 92], [[2022, 9, 16], 92], [[2022, 12, 16], 91], [[2023, 3, 16], 90]]], ['normal control 4', [[[2029, 12, 22], [2030, 6, 22]], [], False], [[[2030, 6, 24], 182]]]], [['regression accrual adjustment flag 1', [[[2023, 10, 11], [2024, 4, 11], [2024, 10, 11], [2025, 4, 11]], [[2023, 10, 13], [2024, 4, 12], [2024, 10, 11]], True], [[[2024, 4, 11], 183], [[2024, 10, 14], 186], [[2025, 4, 11], 179]]], ['regression accrual adjustment flag 2', [[[2030, 9, 28], [2030, 12, 28], [2031, 3, 28]], [[2031, 3, 28]], True], [[[2030, 12, 30], 91], [[2031, 3, 31], 91]]], ['partial repair probe 1', [[[2021, 9, 30], [2021, 10, 30]], [[2021, 9, 30]], True], [[[2021, 10, 29], 30]]], ['partial repair probe 2', [[[2029, 3, 31], [2029, 6, 30]], [[2029, 3, 31], [2029, 7, 1]], True], [[[2029, 6, 29], 91]]], ['normal control 1', [[[2019, 2, 27], [2019, 5, 27]], [[2019, 5, 29]], False], [[[2019, 5, 27], 89]]], ['normal control 2', [[[2020, 6, 1], [2020, 12, 1], [2021, 6, 1], [2021, 12, 1]], [], False], [[[2020, 12, 1], 183], [[2021, 6, 1], 182], [[2021, 12, 1], 183]]], ['normal control 3', [[[2020, 12, 1], [2021, 3, 1], [2021, 6, 1]], [[2021, 3, 2]], True], [[[2021, 3, 1], 90], [[2021, 6, 1], 92]]], ['normal control 4', [[[2020, 3, 18], [2020, 6, 18], [2020, 9, 18]], [], True], [[[2020, 6, 18], 92], [[2020, 9, 18], 92]]]], [['regression accrual adjustment flag 1', [[[2029, 5, 28], [2029, 6, 28]], [[2029, 5, 29], [2029, 6, 28]], True], [[[2029, 6, 29], 32]]], ['regression accrual adjustment flag 2', [[[2019, 6, 22], [2019, 12, 22], [2020, 6, 22], [2020, 12, 22], [2021, 6, 22]], [[2019, 12, 24]], False], [[[2019, 12, 23], 183], [[2020, 6, 22], 183], [[2020, 12, 22], 183], [[2021, 6, 22], 182]]], ['partial repair probe 1', [[[2019, 8, 31], [2019, 11, 30]], [[2019, 9, 1], [2019, 12, 1]], True], [[[2019, 11, 29], 91]]], ['partial repair probe 2', [[[2026, 1, 31], [2026, 4, 30]], [[2026, 4, 30]], True], [[[2026, 4, 29], 89]]], ['normal control 1', [[[2024, 12, 31], [2025, 3, 31]], [], False], [[[2025, 3, 31], 90]]], ['normal control 2', [[[2022, 9, 30], [2023, 3, 30]], [[2022, 10, 1]], False], [[[2023, 3, 30], 181]]], ['normal control 3', [[[2020, 11, 30], [2020, 12, 30]], [[2021, 1, 1]], False], [[[2020, 12, 30], 30]]], ['normal control 4', [[[2021, 9, 28], [2021, 12, 28], [2022, 3, 28], [2022, 6, 28], [2022, 9, 28]], [[2022, 9, 29]], False], [[[2021, 12, 28], 91], [[2022, 3, 28], 90], [[2022, 6, 28], 92], [[2022, 9, 28], 92]]]]]\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-adjusted-accrual-periods-accrual-adjustment-flag","generated_at":"2026-09-29T14:46:53.549922+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":"Adjust accrual dates only when the flag is set.","root_cause":"The flag test is negated.","sha256":"d8131e85d6b03b22e3af0bb18e9c0cbef270ab2ddbd54116e47c49aaa92f9635","title":"Adjusted versus unadjusted accrual periods: the accrual adjustment flag is inverted · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.211,"exit_code":1,"observations":[{"actual":[[[2027,6,30],31],[[2027,7,30],30],[[2027,8,30],31],[[2027,9,29],30]],"check":"regression accrual adjustment flag 1","expected":[[[2027,6,30],30],[[2027,7,30],30],[[2027,8,30],31],[[2027,9,29],30]],"passed":false},{"actual":[[[2029,8,31],31],[[2029,9,28],30],[[2029,10,31],31]],"check":"regression accrual adjustment flag 2","expected":[[[2029,8,31],31],[[2029,9,28],30],[[2029,10,31],31]],"passed":true},{"actual":[[[2027,11,16],93]],"check":"partial repair probe 1","expected":[[[2027,11,16],92]],"passed":false},{"actual":[[[2030,3,4],29]],"check":"partial repair probe 2","expected":[[[2030,3,4],28]],"passed":false},{"actual":[[[2022,8,17],181]],"check":"normal control 1","expected":[[[2022,8,17],181]],"passed":true},{"actual":[[[2023,3,20],181],[[2023,9,20],184],[[2024,3,20],182],[[2024,9,20],184]],"check":"normal control 2","expected":[[[2023,3,20],181],[[2023,9,20],184],[[2024,3,20],182],[[2024,9,20],184]],"passed":true},{"actual":[[[2029,3,28],28]],"check":"normal control 3","expected":[[[2029,3,28],28]],"passed":true},{"actual":[[[2025,3,5],181],[[2025,9,5],184]],"check":"normal control 4","expected":[[[2025,3,5],181],[[2025,9,5],184]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression accrual adjustment flag 1\", \"actual\": [[[2027, 6, 30], 31], [[2027, 7, 30], 30], [[2027, 8, 30], 31], [[2027, 9, 29], 30]], \"expected\": [[[2027, 6, 30], 30], [[2027, 7, 30], 30], [[2027, 8, 30], 31], [[2027, 9, 29], 30]], \"passed\": false}, {\"check\": \"regression accrual adjustment flag 2\", \"actual\": [[[2029, 8, 31], 31], [[2029, 9, 28], 30], [[2029, 10, 31], 31]], \"expected\": [[[2029, 8, 31], 31], [[2029, 9, 28], 30], [[2029, 10, 31], 31]], \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": [[[2027, 11, 16], 93]], \"expected\": [[[2027, 11, 16], 92]], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [[[2030, 3, 4], 29]], \"expected\": [[[2030, 3, 4], 28]], \"passed\": false}, {\"check\": \"normal control 1\", \"actual\": [[[2022, 8, 17], 181]], \"expected\": [[[2022, 8, 17], 181]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [[[2023, 3, 20], 181], [[2023, 9, 20], 184], [[2024, 3, 20], 182], [[2024, 9, 20], 184]], \"expected\": [[[2023, 3, 20], 181], [[2023, 9, 20], 184], [[2024, 3, 20], 182], [[2024, 9, 20], 184]], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [[[2029, 3, 28], 28]], \"expected\": [[[2029, 3, 28], 28]], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [[[2025, 3, 5], 181], [[2025, 9, 5], 184]], \"expected\": [[[2025, 3, 5], 181], [[2025, 9, 5], 184]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":51.232,"exit_code":1,"observations":[{"actual":[[[2027,6,30],31],[[2027,7,30],30],[[2027,8,30],31],[[2027,9,29],31]],"check":"regression accrual adjustment flag 1","expected":[[[2027,6,30],30],[[2027,7,30],30],[[2027,8,30],31],[[2027,9,29],30]],"passed":false},{"actual":[[[2029,8,31],31],[[2029,9,28],28],[[2029,10,31],33]],"check":"regression accrual adjustment flag 2","expected":[[[2029,8,31],31],[[2029,9,28],30],[[2029,10,31],31]],"passed":false},{"actual":[[[2027,11,16],92]],"check":"partial repair probe 1","expected":[[[2027,11,16],92]],"passed":true},{"actual":[[[2030,3,4],28]],"check":"partial repair probe 2","expected":[[[2030,3,4],28]],"passed":true},{"actual":[[[2022,8,17],181]],"check":"normal control 1","expected":[[[2022,8,17],181]],"passed":true},{"actual":[[[2023,3,20],181],[[2023,9,20],184],[[2024,3,20],182],[[2024,9,20],184]],"check":"normal control 2","expected":[[[2023,3,20],181],[[2023,9,20],184],[[2024,3,20],182],[[2024,9,20],184]],"passed":true},{"actual":[[[2029,3,28],28]],"check":"normal control 3","expected":[[[2029,3,28],28]],"passed":true},{"actual":[[[2025,3,5],181],[[2025,9,5],184]],"check":"normal control 4","expected":[[[2025,3,5],181],[[2025,9,5],184]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression accrual adjustment flag 1\", \"actual\": [[[2027, 6, 30], 31], [[2027, 7, 30], 30], [[2027, 8, 30], 31], [[2027, 9, 29], 31]], \"expected\": [[[2027, 6, 30], 30], [[2027, 7, 30], 30], [[2027, 8, 30], 31], [[2027, 9, 29], 30]], \"passed\": false}, {\"check\": \"regression accrual adjustment flag 2\", \"actual\": [[[2029, 8, 31], 31], [[2029, 9, 28], 28], [[2029, 10, 31], 33]], \"expected\": [[[2029, 8, 31], 31], [[2029, 9, 28], 30], [[2029, 10, 31], 31]], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [[[2027, 11, 16], 92]], \"expected\": [[[2027, 11, 16], 92]], \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": [[[2030, 3, 4], 28]], \"expected\": [[[2030, 3, 4], 28]], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [[[2022, 8, 17], 181]], \"expected\": [[[2022, 8, 17], 181]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [[[2023, 3, 20], 181], [[2023, 9, 20], 184], [[2024, 3, 20], 182], [[2024, 9, 20], 184]], \"expected\": [[[2023, 3, 20], 181], [[2023, 9, 20], 184], [[2024, 3, 20], 182], [[2024, 9, 20], 184]], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [[[2029, 3, 28], 28]], \"expected\": [[[2029, 3, 28], 28]], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [[[2025, 3, 5], 181], [[2025, 9, 5], 184]], \"expected\": [[[2025, 3, 5], 181], [[2025, 9, 5], 184]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.81,"exit_code":0,"observations":[{"actual":[[[2027,6,30],30],[[2027,7,30],30],[[2027,8,30],31],[[2027,9,29],30]],"check":"regression accrual adjustment flag 1","expected":[[[2027,6,30],30],[[2027,7,30],30],[[2027,8,30],31],[[2027,9,29],30]],"passed":true},{"actual":[[[2029,8,31],31],[[2029,9,28],30],[[2029,10,31],31]],"check":"regression accrual adjustment flag 2","expected":[[[2029,8,31],31],[[2029,9,28],30],[[2029,10,31],31]],"passed":true},{"actual":[[[2027,11,16],92]],"check":"partial repair probe 1","expected":[[[2027,11,16],92]],"passed":true},{"actual":[[[2030,3,4],28]],"check":"partial repair probe 2","expected":[[[2030,3,4],28]],"passed":true},{"actual":[[[2022,8,17],181]],"check":"normal control 1","expected":[[[2022,8,17],181]],"passed":true},{"actual":[[[2023,3,20],181],[[2023,9,20],184],[[2024,3,20],182],[[2024,9,20],184]],"check":"normal control 2","expected":[[[2023,3,20],181],[[2023,9,20],184],[[2024,3,20],182],[[2024,9,20],184]],"passed":true},{"actual":[[[2029,3,28],28]],"check":"normal control 3","expected":[[[2029,3,28],28]],"passed":true},{"actual":[[[2025,3,5],181],[[2025,9,5],184]],"check":"normal control 4","expected":[[[2025,3,5],181],[[2025,9,5],184]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression accrual adjustment flag 1\", \"actual\": [[[2027, 6, 30], 30], [[2027, 7, 30], 30], [[2027, 8, 30], 31], [[2027, 9, 29], 30]], \"expected\": [[[2027, 6, 30], 30], [[2027, 7, 30], 30], [[2027, 8, 30], 31], [[2027, 9, 29], 30]], \"passed\": true}, {\"check\": \"regression accrual adjustment flag 2\", \"actual\": [[[2029, 8, 31], 31], [[2029, 9, 28], 30], [[2029, 10, 31], 31]], \"expected\": [[[2029, 8, 31], 31], [[2029, 9, 28], 30], [[2029, 10, 31], 31]], \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": [[[2027, 11, 16], 92]], \"expected\": [[[2027, 11, 16], 92]], \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": [[[2030, 3, 4], 28]], \"expected\": [[[2030, 3, 4], 28]], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [[[2022, 8, 17], 181]], \"expected\": [[[2022, 8, 17], 181]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [[[2023, 3, 20], 181], [[2023, 9, 20], 184], [[2024, 3, 20], 182], [[2024, 9, 20], 184]], \"expected\": [[[2023, 3, 20], 181], [[2023, 9, 20], 184], [[2024, 3, 20], 182], [[2024, 9, 20], 184]], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [[[2029, 3, 28], 28]], \"expected\": [[[2029, 3, 28], 28]], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [[[2025, 3, 5], 181], [[2025, 9, 5], 184]], \"expected\": [[[2025, 3, 5], 181], [[2025, 9, 5], 184]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}