{"abstract":"Settlements land on currency holidays.","category":"Bond day-count conventions","checks":8,"contract":"Inputs a trade date (a business day), a lag n and two holiday lists. A business day is a weekday that is a holiday in neither calendar. Settlement is the n-th business day strictly after trade (trade date for n=0). Return [y,m,d].","contract_signature":"trade, n, hol_a, hol_b","evaluation_group":"w2-bond_day_count_conventions-settlement-lag","failed_approach":"Rolling past second-calendar holidays only at the end still counts them inside the lag.","family":"w2-bond_day_count_conventions-settlement-lag-second-calendar","id":"FA-61206","implementations":{"attempt":{"sha256":"474dcc1d19752ff556892d3d33bd876f5e875a58ad40efff2a2c8b7c2ca68f46","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nN = 1\nobservations = []\ndef solve(trade, n, hol_a, hol_b):\n    T = datetime.date(*trade)\n    HA = {datetime.date(*h) for h in hol_a}\n    HB = {datetime.date(*h) for h in hol_b}\n    def biz(x):\n        return x.weekday() < 5 and x not in HA and x not in HB\n    x = T\n    k = 0\n    while k < n:\n        x += datetime.timedelta(days=1)\n        if x.weekday() < 5 and x not in HA:\n            k += 1\n    while n and not biz(x):\n        x += datetime.timedelta(days=1)\n    return [x.year, x.month, x.day]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression second calendar 1', [[2023, 10, 30], 1, [[2023, 11, 8], [2023, 11, 1]], [[2023, 10, 31]]], [2023, 11, 2]], ['regression second calendar 2', [[2028, 4, 17], 5, [], [[2028, 4, 24]]], [2028, 4, 25]], ['partial repair probe 1', [[2022, 5, 16], 3, [[2022, 5, 22], [2022, 5, 17]], [[2022, 5, 19], [2022, 5, 25]]], [2022, 5, 23]], ['partial repair probe 2', [[2019, 4, 1], 2, [[2019, 4, 9], [2019, 4, 2]], [[2019, 4, 3]]], [2019, 4, 5]], ['boundary control 1', [[2024, 5, 3], 0, [], []], [2024, 5, 3]], ['boundary control 2', [[2024, 5, 6], 1, [[2024, 5, 7]], []], [2024, 5, 8]], ['normal control 1', [[2026, 10, 5], 3, [[2026, 10, 9]], []], [2026, 10, 8]], ['normal control 2', [[2028, 6, 29], 0, [], []], [2028, 6, 29]]], [['regression second calendar 1', [[2028, 7, 31], 5, [[2028, 8, 3]], [[2028, 8, 3], [2028, 8, 1]]], [2028, 8, 9]], ['regression second calendar 2', [[2024, 7, 19], 5, [[2024, 7, 21]], [[2024, 7, 23], [2024, 7, 20]]], [2024, 7, 29]], ['partial repair probe 1', [[2020, 1, 28], 5, [[2020, 2, 5]], [[2020, 2, 1], [2020, 1, 30]]], [2020, 2, 6]], ['partial repair probe 2', [[2025, 3, 28], 5, [[2025, 3, 31]], [[2025, 4, 2]]], [2025, 4, 8]], ['boundary control 1', [[2024, 5, 3], 2, [], []], [2024, 5, 7]], ['boundary control 2', [[2024, 5, 6], 1, [[2024, 5, 7]], []], [2024, 5, 8]], ['normal control 1', [[2030, 7, 10], 1, [[2030, 7, 11], [2030, 7, 16]], [[2030, 7, 11], [2030, 7, 15]]], [2030, 7, 12]], ['normal control 2', [[2020, 10, 26], 0, [], [[2020, 10, 30], [2020, 11, 2]]], [2020, 10, 26]]], [['regression second calendar 1', [[2022, 6, 30], 2, [[2022, 7, 6]], [[2022, 7, 4]]], [2022, 7, 5]], ['regression second calendar 2', [[2023, 10, 3], 5, [], [[2023, 10, 10]]], [2023, 10, 11]], ['partial repair probe 1', [[2030, 2, 28], 5, [[2030, 3, 9], [2030, 3, 2]], [[2030, 3, 8], [2030, 3, 4]]], [2030, 3, 11]], ['partial repair probe 2', [[2021, 3, 29], 3, [], [[2021, 3, 31], [2021, 4, 6]]], [2021, 4, 2]], ['boundary control 1', [[2024, 5, 6], 1, [[2024, 5, 7]], []], [2024, 5, 8]], ['boundary control 2', [[2024, 5, 3], 2, [], []], [2024, 5, 7]], ['normal control 1', [[2023, 11, 28], 2, [[2023, 12, 7]], [[2023, 12, 6]]], [2023, 11, 30]], ['normal control 2', [[2024, 7, 1], 0, [[2024, 7, 4], [2024, 7, 10]], [[2024, 7, 10], [2024, 7, 2]]], [2024, 7, 1]]], [['regression second calendar 1', [[2024, 3, 11], 5, [[2024, 3, 20], [2024, 3, 19]], [[2024, 3, 20], [2024, 3, 14]]], [2024, 3, 21]], ['regression second calendar 2', [[2027, 4, 28], 5, [[2027, 5, 2], [2027, 5, 3]], [[2027, 5, 3], [2027, 5, 4]]], [2027, 5, 7]], ['partial repair probe 1', [[2023, 7, 18], 5, [], [[2023, 7, 22], [2023, 7, 24]]], [2023, 7, 26]], ['partial repair probe 2', [[2025, 9, 1], 5, [[2025, 9, 4]], [[2025, 9, 5]]], [2025, 9, 10]], ['boundary control 1', [[2024, 5, 3], 2, [], []], [2024, 5, 7]], ['boundary control 2', [[2024, 5, 3], 0, [], []], [2024, 5, 3]], ['normal control 1', [[2027, 11, 15], 2, [], [[2027, 11, 18]]], [2027, 11, 17]], ['normal control 2', [[2020, 6, 11], 1, [[2020, 6, 17], [2020, 6, 12]], [[2020, 6, 13], [2020, 6, 14]]], [2020, 6, 15]]], [['regression second calendar 1', [[2030, 6, 3], 2, [[2030, 6, 12]], [[2030, 6, 5]]], [2030, 6, 6]], ['regression second calendar 2', [[2019, 7, 22], 5, [[2019, 7, 31]], [[2019, 7, 29]]], [2019, 7, 30]], ['partial repair probe 1', [[2023, 2, 27], 2, [], [[2023, 2, 28], [2023, 3, 8]]], [2023, 3, 2]], ['partial repair probe 2', [[2023, 8, 1], 2, [[2023, 8, 7], [2023, 8, 6]], [[2023, 8, 9], [2023, 8, 2]]], [2023, 8, 4]], ['boundary control 1', [[2024, 5, 6], 1, [[2024, 5, 7]], []], [2024, 5, 8]], ['boundary control 2', [[2024, 5, 3], 2, [], []], [2024, 5, 7]], ['normal control 1', [[2020, 9, 30], 3, [[2020, 10, 7]], [[2020, 10, 8], [2020, 10, 3]]], [2020, 10, 5]], ['normal control 2', [[2025, 7, 14], 1, [[2025, 7, 18], [2025, 7, 16]], [[2025, 7, 19]]], [2025, 7, 15]]]]\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":"f75305dc7b150780e3665fea1233813c4ca72375ebad1162faeeb0ea27ae86eb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nN = 1\nobservations = []\ndef solve(trade, n, hol_a, hol_b):\n    T = datetime.date(*trade)\n    HA = {datetime.date(*h) for h in hol_a}\n    HB = {datetime.date(*h) for h in hol_b}\n    def biz(x):\n        return x.weekday() < 5 and x not in HA\n    x = T\n    k = 0\n    while k < n:\n        x += datetime.timedelta(days=1)\n        if biz(x):\n            k += 1\n    return [x.year, x.month, x.day]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression second calendar 1', [[2023, 10, 30], 1, [[2023, 11, 8], [2023, 11, 1]], [[2023, 10, 31]]], [2023, 11, 2]], ['regression second calendar 2', [[2028, 4, 17], 5, [], [[2028, 4, 24]]], [2028, 4, 25]], ['partial repair probe 1', [[2022, 5, 16], 3, [[2022, 5, 22], [2022, 5, 17]], [[2022, 5, 19], [2022, 5, 25]]], [2022, 5, 23]], ['partial repair probe 2', [[2019, 4, 1], 2, [[2019, 4, 9], [2019, 4, 2]], [[2019, 4, 3]]], [2019, 4, 5]], ['boundary control 1', [[2024, 5, 3], 0, [], []], [2024, 5, 3]], ['boundary control 2', [[2024, 5, 6], 1, [[2024, 5, 7]], []], [2024, 5, 8]], ['normal control 1', [[2026, 10, 5], 3, [[2026, 10, 9]], []], [2026, 10, 8]], ['normal control 2', [[2028, 6, 29], 0, [], []], [2028, 6, 29]]], [['regression second calendar 1', [[2028, 7, 31], 5, [[2028, 8, 3]], [[2028, 8, 3], [2028, 8, 1]]], [2028, 8, 9]], ['regression second calendar 2', [[2024, 7, 19], 5, [[2024, 7, 21]], [[2024, 7, 23], [2024, 7, 20]]], [2024, 7, 29]], ['partial repair probe 1', [[2020, 1, 28], 5, [[2020, 2, 5]], [[2020, 2, 1], [2020, 1, 30]]], [2020, 2, 6]], ['partial repair probe 2', [[2025, 3, 28], 5, [[2025, 3, 31]], [[2025, 4, 2]]], [2025, 4, 8]], ['boundary control 1', [[2024, 5, 3], 2, [], []], [2024, 5, 7]], ['boundary control 2', [[2024, 5, 6], 1, [[2024, 5, 7]], []], [2024, 5, 8]], ['normal control 1', [[2030, 7, 10], 1, [[2030, 7, 11], [2030, 7, 16]], [[2030, 7, 11], [2030, 7, 15]]], [2030, 7, 12]], ['normal control 2', [[2020, 10, 26], 0, [], [[2020, 10, 30], [2020, 11, 2]]], [2020, 10, 26]]], [['regression second calendar 1', [[2022, 6, 30], 2, [[2022, 7, 6]], [[2022, 7, 4]]], [2022, 7, 5]], ['regression second calendar 2', [[2023, 10, 3], 5, [], [[2023, 10, 10]]], [2023, 10, 11]], ['partial repair probe 1', [[2030, 2, 28], 5, [[2030, 3, 9], [2030, 3, 2]], [[2030, 3, 8], [2030, 3, 4]]], [2030, 3, 11]], ['partial repair probe 2', [[2021, 3, 29], 3, [], [[2021, 3, 31], [2021, 4, 6]]], [2021, 4, 2]], ['boundary control 1', [[2024, 5, 6], 1, [[2024, 5, 7]], []], [2024, 5, 8]], ['boundary control 2', [[2024, 5, 3], 2, [], []], [2024, 5, 7]], ['normal control 1', [[2023, 11, 28], 2, [[2023, 12, 7]], [[2023, 12, 6]]], [2023, 11, 30]], ['normal control 2', [[2024, 7, 1], 0, [[2024, 7, 4], [2024, 7, 10]], [[2024, 7, 10], [2024, 7, 2]]], [2024, 7, 1]]], [['regression second calendar 1', [[2024, 3, 11], 5, [[2024, 3, 20], [2024, 3, 19]], [[2024, 3, 20], [2024, 3, 14]]], [2024, 3, 21]], ['regression second calendar 2', [[2027, 4, 28], 5, [[2027, 5, 2], [2027, 5, 3]], [[2027, 5, 3], [2027, 5, 4]]], [2027, 5, 7]], ['partial repair probe 1', [[2023, 7, 18], 5, [], [[2023, 7, 22], [2023, 7, 24]]], [2023, 7, 26]], ['partial repair probe 2', [[2025, 9, 1], 5, [[2025, 9, 4]], [[2025, 9, 5]]], [2025, 9, 10]], ['boundary control 1', [[2024, 5, 3], 2, [], []], [2024, 5, 7]], ['boundary control 2', [[2024, 5, 3], 0, [], []], [2024, 5, 3]], ['normal control 1', [[2027, 11, 15], 2, [], [[2027, 11, 18]]], [2027, 11, 17]], ['normal control 2', [[2020, 6, 11], 1, [[2020, 6, 17], [2020, 6, 12]], [[2020, 6, 13], [2020, 6, 14]]], [2020, 6, 15]]], [['regression second calendar 1', [[2030, 6, 3], 2, [[2030, 6, 12]], [[2030, 6, 5]]], [2030, 6, 6]], ['regression second calendar 2', [[2019, 7, 22], 5, [[2019, 7, 31]], [[2019, 7, 29]]], [2019, 7, 30]], ['partial repair probe 1', [[2023, 2, 27], 2, [], [[2023, 2, 28], [2023, 3, 8]]], [2023, 3, 2]], ['partial repair probe 2', [[2023, 8, 1], 2, [[2023, 8, 7], [2023, 8, 6]], [[2023, 8, 9], [2023, 8, 2]]], [2023, 8, 4]], ['boundary control 1', [[2024, 5, 6], 1, [[2024, 5, 7]], []], [2024, 5, 8]], ['boundary control 2', [[2024, 5, 3], 2, [], []], [2024, 5, 7]], ['normal control 1', [[2020, 9, 30], 3, [[2020, 10, 7]], [[2020, 10, 8], [2020, 10, 3]]], [2020, 10, 5]], ['normal control 2', [[2025, 7, 14], 1, [[2025, 7, 18], [2025, 7, 16]], [[2025, 7, 19]]], [2025, 7, 15]]]]\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-settlement-lag-second-calendar","generated_at":"2026-09-29T14:46:53.095393+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 business day predicate checks only the first holiday list.","sha256":"47e46fd724bd9a248937e5d98a5c3dd4c48850ba3e60334af26b9e4a4e268892","title":"Settlement date from a business-day lag across two calendars: only the security market calendar is honored · 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.159,"exit_code":1,"observations":[{"actual":[2023,11,2],"check":"regression second calendar 1","expected":[2023,11,2],"passed":true},{"actual":[2028,4,25],"check":"regression second calendar 2","expected":[2028,4,25],"passed":true},{"actual":[2022,5,20],"check":"partial repair probe 1","expected":[2022,5,23],"passed":false},{"actual":[2019,4,4],"check":"partial repair probe 2","expected":[2019,4,5],"passed":false},{"actual":[2024,5,3],"check":"boundary control 1","expected":[2024,5,3],"passed":true},{"actual":[2024,5,8],"check":"boundary control 2","expected":[2024,5,8],"passed":true},{"actual":[2026,10,8],"check":"normal control 1","expected":[2026,10,8],"passed":true},{"actual":[2028,6,29],"check":"normal control 2","expected":[2028,6,29],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression second calendar 1\", \"actual\": [2023, 11, 2], \"expected\": [2023, 11, 2], \"passed\": true}, {\"check\": \"regression second calendar 2\", \"actual\": [2028, 4, 25], \"expected\": [2028, 4, 25], \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": [2022, 5, 20], \"expected\": [2022, 5, 23], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [2019, 4, 4], \"expected\": [2019, 4, 5], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [2024, 5, 3], \"expected\": [2024, 5, 3], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [2024, 5, 8], \"expected\": [2024, 5, 8], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [2026, 10, 8], \"expected\": [2026, 10, 8], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [2028, 6, 29], \"expected\": [2028, 6, 29], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.468,"exit_code":1,"observations":[{"actual":[2023,10,31],"check":"regression second calendar 1","expected":[2023,11,2],"passed":false},{"actual":[2028,4,24],"check":"regression second calendar 2","expected":[2028,4,25],"passed":false},{"actual":[2022,5,20],"check":"partial repair probe 1","expected":[2022,5,23],"passed":false},{"actual":[2019,4,4],"check":"partial repair probe 2","expected":[2019,4,5],"passed":false},{"actual":[2024,5,3],"check":"boundary control 1","expected":[2024,5,3],"passed":true},{"actual":[2024,5,8],"check":"boundary control 2","expected":[2024,5,8],"passed":true},{"actual":[2026,10,8],"check":"normal control 1","expected":[2026,10,8],"passed":true},{"actual":[2028,6,29],"check":"normal control 2","expected":[2028,6,29],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression second calendar 1\", \"actual\": [2023, 10, 31], \"expected\": [2023, 11, 2], \"passed\": false}, {\"check\": \"regression second calendar 2\", \"actual\": [2028, 4, 24], \"expected\": [2028, 4, 25], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [2022, 5, 20], \"expected\": [2022, 5, 23], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [2019, 4, 4], \"expected\": [2019, 4, 5], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [2024, 5, 3], \"expected\": [2024, 5, 3], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [2024, 5, 8], \"expected\": [2024, 5, 8], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [2026, 10, 8], \"expected\": [2026, 10, 8], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [2028, 6, 29], \"expected\": [2028, 6, 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."}}