{"abstract":"Holidays are never honored, only weekends.","category":"Bond day-count conventions","checks":8,"contract":"Inputs a date [y,m,d], a convention code and a list of holiday dates. Saturdays, Sundays and holidays are non-business days. F rolls forward, P rolls back, MF rolls forward unless that changes the month in which case it rolls back, MP rolls back unless that changes the month in which case it rolls forward, U leaves the date unadjusted; other codes return \"unknown convention\". Return the adjusted [y,m,d].","contract_signature":"d, conv, holidays","evaluation_group":"w2-bond_day_count_conventions-business-day-adjustment","failed_approach":"Converting holidays to ISO strings still compares strings against dates.","family":"w2-bond_day_count_conventions-business-day-adjustment-holiday-membership-type","id":"FA-61001","implementations":{"attempt":{"sha256":"899a64dae7e56b7de80c55440ef0e515f3e154c8c9bf06841109f1f96876f5a9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(d, conv, holidays):\n    D = datetime.date(*d)\n    H = {datetime.date(*h).isoformat() for h in holidays}\n    def bad(x):\n        return x.weekday() >= 5 or x in H\n    def roll(x, step):\n        while bad(x):\n            x += datetime.timedelta(days=step)\n        return x\n    if conv == 'F':\n        r = roll(D, 1)\n    elif conv == 'MF':\n        r = roll(D, 1)\n        if r.month != D.month:\n            r = roll(D, -1)\n    elif conv == 'P':\n        r = roll(D, -1)\n    elif conv == 'MP':\n        r = roll(D, -1)\n        if r.month != D.month:\n            r = roll(D, 1)\n    elif conv == 'U':\n        r = D\n    else:\n        return 'unknown convention'\n    return [r.year, r.month, r.day]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression holiday membership type 1', [[2022, 7, 31], 'P', [[2022, 8, 2], [2022, 7, 29], [2022, 7, 31]]], [2022, 7, 28]], ['regression holiday membership type 2', [[2030, 9, 29], 'MP', [[2030, 9, 29], [2030, 9, 27], [2030, 10, 1]]], [2030, 9, 26]], ['partial repair probe 1', [[2024, 12, 31], 'MF', [[2024, 12, 28], [2024, 12, 31], [2025, 1, 2]]], [2024, 12, 30]], ['partial repair probe 2', [[2026, 12, 31], 'MF', [[2026, 12, 31]]], [2026, 12, 30]], ['boundary control 1', [[2024, 6, 1], 'MP', []], [2024, 6, 3]], ['boundary control 2', [[2024, 12, 28], 'F', []], [2024, 12, 30]], ['normal control 1', [[2030, 12, 31], 'MP', [[2031, 1, 4], [2031, 1, 4]]], [2030, 12, 31]], ['normal control 2', [[2023, 8, 29], 'P', [[2023, 8, 26]]], [2023, 8, 29]]], [['regression holiday membership type 1', [[2024, 12, 31], 'MF', [[2024, 12, 31], [2024, 12, 31], [2024, 12, 29]]], [2024, 12, 30]], ['regression holiday membership type 2', [[2023, 6, 3], 'F', [[2023, 6, 6], [2023, 6, 5]]], [2023, 6, 7]], ['partial repair probe 1', [[2023, 3, 30], 'P', [[2023, 3, 30], [2023, 4, 2]]], [2023, 3, 29]], ['partial repair probe 2', [[2026, 11, 14], 'MP', [[2026, 11, 13]]], [2026, 11, 12]], ['boundary control 1', [[2024, 12, 28], 'F', []], [2024, 12, 30]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2019, 4, 29], 'F', []], [2019, 4, 29]], ['normal control 2', [[2023, 2, 28], 'F', [[2023, 3, 2], [2023, 2, 25], [2023, 2, 25]]], [2023, 2, 28]]], [['regression holiday membership type 1', [[2029, 4, 30], 'MF', [[2029, 4, 28], [2029, 4, 30], [2029, 5, 2]]], [2029, 4, 27]], ['regression holiday membership type 2', [[2021, 5, 31], 'MF', [[2021, 5, 28], [2021, 6, 1], [2021, 5, 31]]], [2021, 5, 27]], ['partial repair probe 1', [[2028, 12, 1], 'MP', [[2028, 12, 2], [2028, 12, 5], [2028, 12, 1]]], [2028, 12, 4]], ['partial repair probe 2', [[2023, 3, 1], 'MF', [[2023, 3, 1], [2023, 3, 5]]], [2023, 3, 2]], ['boundary control 1', [[2024, 6, 1], 'MP', []], [2024, 6, 3]], ['boundary control 2', [[2024, 3, 30], 'MF', []], [2024, 3, 29]], ['normal control 1', [[2026, 5, 31], 'F', []], [2026, 6, 1]], ['normal control 2', [[2022, 1, 1], 'X', [[2022, 1, 4], [2022, 1, 2], [2022, 1, 3]]], 'unknown convention']], [['regression holiday membership type 1', [[2030, 1, 30], 'MF', [[2030, 1, 30], [2030, 2, 3]]], [2030, 1, 31]], ['regression holiday membership type 2', [[2026, 3, 24], 'MF', [[2026, 3, 24]]], [2026, 3, 25]], ['partial repair probe 1', [[2025, 10, 9], 'P', [[2025, 10, 9], [2025, 10, 7]]], [2025, 10, 8]], ['partial repair probe 2', [[2020, 8, 31], 'MF', [[2020, 8, 31], [2020, 8, 28], [2020, 9, 3]]], [2020, 8, 27]], ['boundary control 1', [[2024, 12, 28], 'F', []], [2024, 12, 30]], ['boundary control 2', [[2024, 3, 30], 'MF', []], [2024, 3, 29]], ['normal control 1', [[2024, 3, 20], 'X', [[2024, 3, 21]]], 'unknown convention'], ['normal control 2', [[2021, 1, 2], 'P', [[2021, 1, 5]]], [2021, 1, 1]]], [['regression holiday membership type 1', [[2027, 6, 30], 'MP', [[2027, 7, 3], [2027, 6, 27], [2027, 6, 30]]], [2027, 6, 29]], ['regression holiday membership type 2', [[2026, 6, 6], 'F', [[2026, 6, 9], [2026, 6, 8], [2026, 6, 10]]], [2026, 6, 11]], ['partial repair probe 1', [[2026, 2, 27], 'MP', [[2026, 2, 27], [2026, 2, 27]]], [2026, 2, 26]], ['partial repair probe 2', [[2024, 11, 10], 'F', [[2024, 11, 8], [2024, 11, 13], [2024, 11, 11]]], [2024, 11, 12]], ['boundary control 1', [[2024, 12, 28], 'F', []], [2024, 12, 30]], ['boundary control 2', [[2024, 6, 1], 'MP', []], [2024, 6, 3]], ['normal control 1', [[2021, 7, 31], 'X', [[2021, 7, 30]]], 'unknown convention'], ['normal control 2', [[2029, 10, 31], 'X', [[2029, 11, 3], [2029, 11, 3]]], 'unknown convention']]]\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":"92e2809ff82d307f4ec884e143e7796cbb28c76d5ff0ed562bf1286b0a00f5b3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(d, conv, holidays):\n    D = datetime.date(*d)\n    H = [h for h in holidays]\n    def bad(x):\n        return x.weekday() >= 5 or x in H\n    def roll(x, step):\n        while bad(x):\n            x += datetime.timedelta(days=step)\n        return x\n    if conv == 'F':\n        r = roll(D, 1)\n    elif conv == 'MF':\n        r = roll(D, 1)\n        if r.month != D.month:\n            r = roll(D, -1)\n    elif conv == 'P':\n        r = roll(D, -1)\n    elif conv == 'MP':\n        r = roll(D, -1)\n        if r.month != D.month:\n            r = roll(D, 1)\n    elif conv == 'U':\n        r = D\n    else:\n        return 'unknown convention'\n    return [r.year, r.month, r.day]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression holiday membership type 1', [[2022, 7, 31], 'P', [[2022, 8, 2], [2022, 7, 29], [2022, 7, 31]]], [2022, 7, 28]], ['regression holiday membership type 2', [[2030, 9, 29], 'MP', [[2030, 9, 29], [2030, 9, 27], [2030, 10, 1]]], [2030, 9, 26]], ['partial repair probe 1', [[2024, 12, 31], 'MF', [[2024, 12, 28], [2024, 12, 31], [2025, 1, 2]]], [2024, 12, 30]], ['partial repair probe 2', [[2026, 12, 31], 'MF', [[2026, 12, 31]]], [2026, 12, 30]], ['boundary control 1', [[2024, 6, 1], 'MP', []], [2024, 6, 3]], ['boundary control 2', [[2024, 12, 28], 'F', []], [2024, 12, 30]], ['normal control 1', [[2030, 12, 31], 'MP', [[2031, 1, 4], [2031, 1, 4]]], [2030, 12, 31]], ['normal control 2', [[2023, 8, 29], 'P', [[2023, 8, 26]]], [2023, 8, 29]]], [['regression holiday membership type 1', [[2024, 12, 31], 'MF', [[2024, 12, 31], [2024, 12, 31], [2024, 12, 29]]], [2024, 12, 30]], ['regression holiday membership type 2', [[2023, 6, 3], 'F', [[2023, 6, 6], [2023, 6, 5]]], [2023, 6, 7]], ['partial repair probe 1', [[2023, 3, 30], 'P', [[2023, 3, 30], [2023, 4, 2]]], [2023, 3, 29]], ['partial repair probe 2', [[2026, 11, 14], 'MP', [[2026, 11, 13]]], [2026, 11, 12]], ['boundary control 1', [[2024, 12, 28], 'F', []], [2024, 12, 30]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2019, 4, 29], 'F', []], [2019, 4, 29]], ['normal control 2', [[2023, 2, 28], 'F', [[2023, 3, 2], [2023, 2, 25], [2023, 2, 25]]], [2023, 2, 28]]], [['regression holiday membership type 1', [[2029, 4, 30], 'MF', [[2029, 4, 28], [2029, 4, 30], [2029, 5, 2]]], [2029, 4, 27]], ['regression holiday membership type 2', [[2021, 5, 31], 'MF', [[2021, 5, 28], [2021, 6, 1], [2021, 5, 31]]], [2021, 5, 27]], ['partial repair probe 1', [[2028, 12, 1], 'MP', [[2028, 12, 2], [2028, 12, 5], [2028, 12, 1]]], [2028, 12, 4]], ['partial repair probe 2', [[2023, 3, 1], 'MF', [[2023, 3, 1], [2023, 3, 5]]], [2023, 3, 2]], ['boundary control 1', [[2024, 6, 1], 'MP', []], [2024, 6, 3]], ['boundary control 2', [[2024, 3, 30], 'MF', []], [2024, 3, 29]], ['normal control 1', [[2026, 5, 31], 'F', []], [2026, 6, 1]], ['normal control 2', [[2022, 1, 1], 'X', [[2022, 1, 4], [2022, 1, 2], [2022, 1, 3]]], 'unknown convention']], [['regression holiday membership type 1', [[2030, 1, 30], 'MF', [[2030, 1, 30], [2030, 2, 3]]], [2030, 1, 31]], ['regression holiday membership type 2', [[2026, 3, 24], 'MF', [[2026, 3, 24]]], [2026, 3, 25]], ['partial repair probe 1', [[2025, 10, 9], 'P', [[2025, 10, 9], [2025, 10, 7]]], [2025, 10, 8]], ['partial repair probe 2', [[2020, 8, 31], 'MF', [[2020, 8, 31], [2020, 8, 28], [2020, 9, 3]]], [2020, 8, 27]], ['boundary control 1', [[2024, 12, 28], 'F', []], [2024, 12, 30]], ['boundary control 2', [[2024, 3, 30], 'MF', []], [2024, 3, 29]], ['normal control 1', [[2024, 3, 20], 'X', [[2024, 3, 21]]], 'unknown convention'], ['normal control 2', [[2021, 1, 2], 'P', [[2021, 1, 5]]], [2021, 1, 1]]], [['regression holiday membership type 1', [[2027, 6, 30], 'MP', [[2027, 7, 3], [2027, 6, 27], [2027, 6, 30]]], [2027, 6, 29]], ['regression holiday membership type 2', [[2026, 6, 6], 'F', [[2026, 6, 9], [2026, 6, 8], [2026, 6, 10]]], [2026, 6, 11]], ['partial repair probe 1', [[2026, 2, 27], 'MP', [[2026, 2, 27], [2026, 2, 27]]], [2026, 2, 26]], ['partial repair probe 2', [[2024, 11, 10], 'F', [[2024, 11, 8], [2024, 11, 13], [2024, 11, 11]]], [2024, 11, 12]], ['boundary control 1', [[2024, 12, 28], 'F', []], [2024, 12, 30]], ['boundary control 2', [[2024, 6, 1], 'MP', []], [2024, 6, 3]], ['normal control 1', [[2021, 7, 31], 'X', [[2021, 7, 30]]], 'unknown convention'], ['normal control 2', [[2029, 10, 31], 'X', [[2029, 11, 3], [2029, 11, 3]]], 'unknown convention']]]\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-business-day-adjustment-holiday-membership-type","generated_at":"2026-09-29T14:46:50.956572+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 holiday collection keeps [y,m,d] lists, so membership tests against dates never match.","sha256":"c43f0fcf81449ae7247d0d30a3bcee832e054797c10b16ca4f4d921352f038cd","title":"Business day adjustment conventions: holiday lists are compared against date objects · 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":43.681,"exit_code":1,"observations":[{"actual":[2022,7,29],"check":"regression holiday membership type 1","expected":[2022,7,28],"passed":false},{"actual":[2030,9,27],"check":"regression holiday membership type 2","expected":[2030,9,26],"passed":false},{"actual":[2024,12,31],"check":"partial repair probe 1","expected":[2024,12,30],"passed":false},{"actual":[2026,12,31],"check":"partial repair probe 2","expected":[2026,12,30],"passed":false},{"actual":[2024,6,3],"check":"boundary control 1","expected":[2024,6,3],"passed":true},{"actual":[2024,12,30],"check":"boundary control 2","expected":[2024,12,30],"passed":true},{"actual":[2030,12,31],"check":"normal control 1","expected":[2030,12,31],"passed":true},{"actual":[2023,8,29],"check":"normal control 2","expected":[2023,8,29],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression holiday membership type 1\", \"actual\": [2022, 7, 29], \"expected\": [2022, 7, 28], \"passed\": false}, {\"check\": \"regression holiday membership type 2\", \"actual\": [2030, 9, 27], \"expected\": [2030, 9, 26], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [2024, 12, 31], \"expected\": [2024, 12, 30], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [2026, 12, 31], \"expected\": [2026, 12, 30], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [2024, 6, 3], \"expected\": [2024, 6, 3], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [2024, 12, 30], \"expected\": [2024, 12, 30], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [2030, 12, 31], \"expected\": [2030, 12, 31], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [2023, 8, 29], \"expected\": [2023, 8, 29], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.724,"exit_code":1,"observations":[{"actual":[2022,7,29],"check":"regression holiday membership type 1","expected":[2022,7,28],"passed":false},{"actual":[2030,9,27],"check":"regression holiday membership type 2","expected":[2030,9,26],"passed":false},{"actual":[2024,12,31],"check":"partial repair probe 1","expected":[2024,12,30],"passed":false},{"actual":[2026,12,31],"check":"partial repair probe 2","expected":[2026,12,30],"passed":false},{"actual":[2024,6,3],"check":"boundary control 1","expected":[2024,6,3],"passed":true},{"actual":[2024,12,30],"check":"boundary control 2","expected":[2024,12,30],"passed":true},{"actual":[2030,12,31],"check":"normal control 1","expected":[2030,12,31],"passed":true},{"actual":[2023,8,29],"check":"normal control 2","expected":[2023,8,29],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression holiday membership type 1\", \"actual\": [2022, 7, 29], \"expected\": [2022, 7, 28], \"passed\": false}, {\"check\": \"regression holiday membership type 2\", \"actual\": [2030, 9, 27], \"expected\": [2030, 9, 26], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [2024, 12, 31], \"expected\": [2024, 12, 30], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [2026, 12, 31], \"expected\": [2026, 12, 30], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [2024, 6, 3], \"expected\": [2024, 6, 3], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [2024, 12, 30], \"expected\": [2024, 12, 30], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [2030, 12, 31], \"expected\": [2030, 12, 31], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [2023, 8, 29], \"expected\": [2023, 8, 29], \"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."}}