{"abstract":"Payments scheduled on a Saturday are made on the Saturday.","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":"Checking only for Saturday then lets Sunday payments through.","family":"w2-bond_day_count_conventions-business-day-adjustment-weekend-test","id":"FA-60981","implementations":{"attempt":{"sha256":"b43ab91f3773ebb25f9ecab45854d0295b917203840826219e4829757675d171","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) 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 weekend test 1', [[2023, 12, 30], 'MF', []], [2023, 12, 29]], ['regression weekend test 2', [[2024, 3, 30], 'MF', []], [2024, 3, 29]], ['partial repair probe 1', [[2026, 5, 31], 'F', [[2026, 6, 1]]], [2026, 6, 2]], ['partial repair probe 2', [[2029, 9, 1], 'MF', [[2029, 9, 3], [2029, 9, 1]]], [2029, 9, 4]], ['boundary control 1', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2024, 12, 31], 'F', []], [2024, 12, 31]], ['normal control 2', [[2028, 4, 30], 'U', []], [2028, 4, 30]]], [['regression weekend test 1', [[2023, 7, 1], 'MF', [[2023, 7, 3]]], [2023, 7, 4]], ['regression weekend test 2', [[2022, 7, 30], 'P', [[2022, 8, 3], [2022, 7, 29]]], [2022, 7, 28]], ['partial repair probe 1', [[2024, 3, 30], 'MF', [[2024, 3, 27], [2024, 3, 30]]], [2024, 3, 29]], ['partial repair probe 2', [[2024, 12, 29], 'MF', [[2024, 12, 31]]], [2024, 12, 30]], ['boundary control 1', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2024, 10, 23], 'MP', [[2024, 10, 23], [2024, 10, 22], [2024, 10, 22]]], [2024, 10, 21]], ['normal control 2', [[2025, 2, 4], 'P', [[2025, 2, 2], [2025, 2, 1], [2025, 2, 2]]], [2025, 2, 4]]], [['regression weekend test 1', [[2020, 2, 1], 'MF', [[2020, 2, 3]]], [2020, 2, 4]], ['regression weekend test 2', [[2029, 6, 30], 'P', []], [2029, 6, 29]], ['partial repair probe 1', [[2022, 1, 2], 'MF', []], [2022, 1, 3]], ['partial repair probe 2', [[2028, 1, 30], 'MF', []], [2028, 1, 31]], ['boundary control 1', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2027, 12, 1], 'U', []], [2027, 12, 1]], ['normal control 2', [[2023, 1, 19], 'MF', [[2023, 1, 22], [2023, 1, 21], [2023, 1, 16]]], [2023, 1, 19]]], [['regression weekend test 1', [[2021, 5, 31], 'P', [[2021, 5, 31], [2021, 6, 4], [2021, 6, 1]]], [2021, 5, 28]], ['regression weekend test 2', [[2028, 12, 31], 'MF', []], [2028, 12, 29]], ['partial repair probe 1', [[2026, 11, 22], 'F', [[2026, 11, 25]]], [2026, 11, 23]], ['partial repair probe 2', [[2029, 12, 30], 'MF', []], [2029, 12, 31]], ['boundary control 1', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2029, 10, 31], 'MP', []], [2029, 10, 31]], ['normal control 2', [[2024, 1, 3], 'MF', []], [2024, 1, 3]]], [['regression weekend test 1', [[2028, 7, 8], 'MF', [[2028, 7, 11]]], [2028, 7, 10]], ['regression weekend test 2', [[2020, 8, 9], 'MP', [[2020, 8, 9]]], [2020, 8, 7]], ['partial repair probe 1', [[2024, 12, 29], 'MF', [[2024, 12, 31]]], [2024, 12, 30]], ['partial repair probe 2', [[2028, 4, 30], 'F', [[2028, 4, 28]]], [2028, 5, 1]], ['boundary control 1', [[2024, 5, 15], 'X', []], 'unknown convention'], ['boundary control 2', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['normal control 1', [[2030, 4, 30], 'MP', [[2030, 4, 28]]], [2030, 4, 30]], ['normal control 2', [[2020, 1, 2], 'U', []], [2020, 1, 2]]]]\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":"6660b6e17aa2156d305e21ac87489f2d96ebf17901d7b15eea94e3dd001bcf45","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) 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 weekend test 1', [[2023, 12, 30], 'MF', []], [2023, 12, 29]], ['regression weekend test 2', [[2024, 3, 30], 'MF', []], [2024, 3, 29]], ['partial repair probe 1', [[2026, 5, 31], 'F', [[2026, 6, 1]]], [2026, 6, 2]], ['partial repair probe 2', [[2029, 9, 1], 'MF', [[2029, 9, 3], [2029, 9, 1]]], [2029, 9, 4]], ['boundary control 1', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2024, 12, 31], 'F', []], [2024, 12, 31]], ['normal control 2', [[2028, 4, 30], 'U', []], [2028, 4, 30]]], [['regression weekend test 1', [[2023, 7, 1], 'MF', [[2023, 7, 3]]], [2023, 7, 4]], ['regression weekend test 2', [[2022, 7, 30], 'P', [[2022, 8, 3], [2022, 7, 29]]], [2022, 7, 28]], ['partial repair probe 1', [[2024, 3, 30], 'MF', [[2024, 3, 27], [2024, 3, 30]]], [2024, 3, 29]], ['partial repair probe 2', [[2024, 12, 29], 'MF', [[2024, 12, 31]]], [2024, 12, 30]], ['boundary control 1', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2024, 10, 23], 'MP', [[2024, 10, 23], [2024, 10, 22], [2024, 10, 22]]], [2024, 10, 21]], ['normal control 2', [[2025, 2, 4], 'P', [[2025, 2, 2], [2025, 2, 1], [2025, 2, 2]]], [2025, 2, 4]]], [['regression weekend test 1', [[2020, 2, 1], 'MF', [[2020, 2, 3]]], [2020, 2, 4]], ['regression weekend test 2', [[2029, 6, 30], 'P', []], [2029, 6, 29]], ['partial repair probe 1', [[2022, 1, 2], 'MF', []], [2022, 1, 3]], ['partial repair probe 2', [[2028, 1, 30], 'MF', []], [2028, 1, 31]], ['boundary control 1', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2027, 12, 1], 'U', []], [2027, 12, 1]], ['normal control 2', [[2023, 1, 19], 'MF', [[2023, 1, 22], [2023, 1, 21], [2023, 1, 16]]], [2023, 1, 19]]], [['regression weekend test 1', [[2021, 5, 31], 'P', [[2021, 5, 31], [2021, 6, 4], [2021, 6, 1]]], [2021, 5, 28]], ['regression weekend test 2', [[2028, 12, 31], 'MF', []], [2028, 12, 29]], ['partial repair probe 1', [[2026, 11, 22], 'F', [[2026, 11, 25]]], [2026, 11, 23]], ['partial repair probe 2', [[2029, 12, 30], 'MF', []], [2029, 12, 31]], ['boundary control 1', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['boundary control 2', [[2024, 5, 15], 'X', []], 'unknown convention'], ['normal control 1', [[2029, 10, 31], 'MP', []], [2029, 10, 31]], ['normal control 2', [[2024, 1, 3], 'MF', []], [2024, 1, 3]]], [['regression weekend test 1', [[2028, 7, 8], 'MF', [[2028, 7, 11]]], [2028, 7, 10]], ['regression weekend test 2', [[2020, 8, 9], 'MP', [[2020, 8, 9]]], [2020, 8, 7]], ['partial repair probe 1', [[2024, 12, 29], 'MF', [[2024, 12, 31]]], [2024, 12, 30]], ['partial repair probe 2', [[2028, 4, 30], 'F', [[2028, 4, 28]]], [2028, 5, 1]], ['boundary control 1', [[2024, 5, 15], 'X', []], 'unknown convention'], ['boundary control 2', [[2024, 5, 15], 'F', [[2024, 5, 15]]], [2024, 5, 16]], ['normal control 1', [[2030, 4, 30], 'MP', [[2030, 4, 28]]], [2030, 4, 30]], ['normal control 2', [[2020, 1, 2], 'U', []], [2020, 1, 2]]]]\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-weekend-test","generated_at":"2026-09-29T14:46:50.675576+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 weekend predicate checks weekday() > 5, which only matches Sunday.","sha256":"0fa32e6d52e60337ff0717880c602910ae6a012c3272ce6f64ec16527097c6d4","title":"Business day adjustment conventions: Saturdays are treated as business days · 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":49.027,"exit_code":1,"observations":[{"actual":[2023,12,31],"check":"regression weekend test 1","expected":[2023,12,29],"passed":false},{"actual":[2024,3,31],"check":"regression weekend test 2","expected":[2024,3,29],"passed":false},{"actual":[2026,5,31],"check":"partial repair probe 1","expected":[2026,6,2],"passed":false},{"actual":[2029,9,2],"check":"partial repair probe 2","expected":[2029,9,4],"passed":false},{"actual":[2024,5,16],"check":"boundary control 1","expected":[2024,5,16],"passed":true},{"actual":"unknown convention","check":"boundary control 2","expected":"unknown convention","passed":true},{"actual":[2024,12,31],"check":"normal control 1","expected":[2024,12,31],"passed":true},{"actual":[2028,4,30],"check":"normal control 2","expected":[2028,4,30],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression weekend test 1\", \"actual\": [2023, 12, 31], \"expected\": [2023, 12, 29], \"passed\": false}, {\"check\": \"regression weekend test 2\", \"actual\": [2024, 3, 31], \"expected\": [2024, 3, 29], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [2026, 5, 31], \"expected\": [2026, 6, 2], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [2029, 9, 2], \"expected\": [2029, 9, 4], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [2024, 5, 16], \"expected\": [2024, 5, 16], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": \"unknown convention\", \"expected\": \"unknown convention\", \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [2024, 12, 31], \"expected\": [2024, 12, 31], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [2028, 4, 30], \"expected\": [2028, 4, 30], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.752,"exit_code":1,"observations":[{"actual":[2023,12,30],"check":"regression weekend test 1","expected":[2023,12,29],"passed":false},{"actual":[2024,3,30],"check":"regression weekend test 2","expected":[2024,3,29],"passed":false},{"actual":[2026,6,2],"check":"partial repair probe 1","expected":[2026,6,2],"passed":true},{"actual":[2029,9,4],"check":"partial repair probe 2","expected":[2029,9,4],"passed":true},{"actual":[2024,5,16],"check":"boundary control 1","expected":[2024,5,16],"passed":true},{"actual":"unknown convention","check":"boundary control 2","expected":"unknown convention","passed":true},{"actual":[2024,12,31],"check":"normal control 1","expected":[2024,12,31],"passed":true},{"actual":[2028,4,30],"check":"normal control 2","expected":[2028,4,30],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression weekend test 1\", \"actual\": [2023, 12, 30], \"expected\": [2023, 12, 29], \"passed\": false}, {\"check\": \"regression weekend test 2\", \"actual\": [2024, 3, 30], \"expected\": [2024, 3, 29], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [2026, 6, 2], \"expected\": [2026, 6, 2], \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": [2029, 9, 4], \"expected\": [2029, 9, 4], \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": [2024, 5, 16], \"expected\": [2024, 5, 16], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": \"unknown convention\", \"expected\": \"unknown convention\", \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [2024, 12, 31], \"expected\": [2024, 12, 31], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [2028, 4, 30], \"expected\": [2028, 4, 30], \"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."}}