{"abstract":"In leap years a December 31 pay date is left out of the count.","category":"Payroll withholding rules","checks":9,"contract":"Input {anchor [y,m,d] (any pay date), step 7|14 days, year}. Pay dates are anchor + k*step for all integers k. Return [count of pay dates within Jan 1..Dec 31 of year inclusive, ISO date of the first one, whether the count exceeds the nominal periods (26 biweekly, 52 weekly)].","contract_signature":"x","evaluation_group":"w2-payroll-withholding-pay-date-count","failed_approach":"The attempt hard-codes December 30, dropping December 31 pay dates in every year.","family":"w2-payroll-withholding-pay-date-count-year-end-date","id":"FA-59231","implementations":{"attempt":{"sha256":"0ddd83cd2cac9166559db9e4fd7458235b5e9e7368517158224cec521c49348f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nN = 1\nobservations = []\ndef solve(x):\n    anchor = datetime.date(*x['anchor'])\n    lo = datetime.date(x['year'], 1, 1)\n    hi = datetime.date(x['year'], 12, 30)\n    off = (lo - anchor).days\n    k = -(-off // x['step'])\n    first = anchor + datetime.timedelta(days=k * x['step'])\n    count = (hi - first).days // x['step'] + 1\n    periods = 26 if x['step'] == 14 else 52\n    return [count, first.isoformat(), count > periods]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression (boundary)', {'anchor': [2020, 12, 31], 'step': 14, 'year': 2020}, [27, '2020-01-02', True]), ('regression', {'anchor': [2022, 8, 16], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('partial-repair probe (boundary)', {'anchor': [2026, 1, 1], 'step': 14, 'year': 2026}, [27, '2026-01-01', True]), ('partial-repair probe', {'anchor': [2021, 6, 20], 'step': 14, 'year': 2023}, [27, '2023-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2023, 8, 10], 'step': 14, 'year': 2024}, [26, '2024-01-11', False]), ('normal control', {'anchor': [2024, 3, 10], 'step': 14, 'year': 2024}, [26, '2024-01-14', False]), ('normal control', {'anchor': [2020, 3, 23], 'step': 14, 'year': 2020}, [26, '2020-01-13', False]), ('normal control', {'anchor': [2019, 7, 21], 'step': 7, 'year': 2020}, [52, '2020-01-05', False])], [('regression', {'anchor': [2022, 8, 16], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('regression', {'anchor': [2020, 3, 26], 'step': 14, 'year': 2020}, [27, '2020-01-02', True]), ('partial-repair probe', {'anchor': [2021, 6, 20], 'step': 14, 'year': 2023}, [27, '2023-01-01', True]), ('partial-repair probe', {'anchor': [2021, 1, 17], 'step': 14, 'year': 2023}, [27, '2023-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2021, 6, 11], 'step': 7, 'year': 2023}, [52, '2023-01-06', False]), ('normal control', {'anchor': [2025, 10, 16], 'step': 14, 'year': 2026}, [26, '2026-01-08', False]), ('normal control', {'anchor': [2024, 10, 14], 'step': 7, 'year': 2024}, [53, '2024-01-01', True]), ('normal control', {'anchor': [2018, 5, 7], 'step': 14, 'year': 2020}, [26, '2020-01-13', False])], [('regression', {'anchor': [2020, 3, 26], 'step': 14, 'year': 2020}, [27, '2020-01-02', True]), ('regression', {'anchor': [2023, 3, 28], 'step': 14, 'year': 2024}, [27, '2024-01-02', True]), ('partial-repair probe', {'anchor': [2022, 8, 16], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('partial-repair probe', {'anchor': [2025, 3, 13], 'step': 7, 'year': 2026}, [53, '2026-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2027, 5, 14], 'step': 14, 'year': 2026}, [26, '2026-01-09', False]), ('normal control', {'anchor': [2020, 3, 29], 'step': 7, 'year': 2020}, [52, '2020-01-05', False]), ('normal control', {'anchor': [2024, 2, 16], 'step': 14, 'year': 2023}, [26, '2023-01-06', False]), ('normal control', {'anchor': [2024, 2, 4], 'step': 14, 'year': 2023}, [26, '2023-01-08', False])], [('regression', {'anchor': [2023, 3, 28], 'step': 14, 'year': 2024}, [27, '2024-01-02', True]), ('regression', {'anchor': [2025, 10, 14], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('partial-repair probe', {'anchor': [2020, 3, 26], 'step': 14, 'year': 2020}, [27, '2020-01-02', True]), ('partial-repair probe', {'anchor': [2024, 10, 27], 'step': 7, 'year': 2023}, [53, '2023-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2024, 5, 1], 'step': 14, 'year': 2024}, [26, '2024-01-10', False]), ('normal control', {'anchor': [2021, 5, 10], 'step': 14, 'year': 2023}, [26, '2023-01-02', False]), ('normal control', {'anchor': [2027, 5, 22], 'step': 14, 'year': 2026}, [26, '2026-01-03', False]), ('normal control', {'anchor': [2024, 12, 7], 'step': 14, 'year': 2024}, [26, '2024-01-06', False])], [('regression', {'anchor': [2025, 10, 14], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('regression', {'anchor': [2020, 7, 16], 'step': 7, 'year': 2020}, [53, '2020-01-02', True]), ('partial-repair probe', {'anchor': [2023, 3, 28], 'step': 14, 'year': 2024}, [27, '2024-01-02', True]), ('partial-repair probe', {'anchor': [2021, 5, 2], 'step': 7, 'year': 2023}, [53, '2023-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2022, 9, 20], 'step': 14, 'year': 2023}, [26, '2023-01-10', False]), ('normal control', {'anchor': [2025, 8, 7], 'step': 7, 'year': 2025}, [52, '2025-01-02', False]), ('normal control', {'anchor': [2027, 11, 30], 'step': 14, 'year': 2026}, [26, '2026-01-13', False]), ('normal control', {'anchor': [2026, 7, 18], 'step': 14, 'year': 2025}, [26, '2025-01-04', False])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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":"dbe5608eecab479deaf5838874b41ce4bcfc7f33773df2540716eb9a7a1863b5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nN = 1\nobservations = []\ndef solve(x):\n    anchor = datetime.date(*x['anchor'])\n    lo = datetime.date(x['year'], 1, 1)\n    hi = lo + datetime.timedelta(days=364)\n    off = (lo - anchor).days\n    k = -(-off // x['step'])\n    first = anchor + datetime.timedelta(days=k * x['step'])\n    count = (hi - first).days // x['step'] + 1\n    periods = 26 if x['step'] == 14 else 52\n    return [count, first.isoformat(), count > periods]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression (boundary)', {'anchor': [2020, 12, 31], 'step': 14, 'year': 2020}, [27, '2020-01-02', True]), ('regression', {'anchor': [2022, 8, 16], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('partial-repair probe (boundary)', {'anchor': [2026, 1, 1], 'step': 14, 'year': 2026}, [27, '2026-01-01', True]), ('partial-repair probe', {'anchor': [2021, 6, 20], 'step': 14, 'year': 2023}, [27, '2023-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2023, 8, 10], 'step': 14, 'year': 2024}, [26, '2024-01-11', False]), ('normal control', {'anchor': [2024, 3, 10], 'step': 14, 'year': 2024}, [26, '2024-01-14', False]), ('normal control', {'anchor': [2020, 3, 23], 'step': 14, 'year': 2020}, [26, '2020-01-13', False]), ('normal control', {'anchor': [2019, 7, 21], 'step': 7, 'year': 2020}, [52, '2020-01-05', False])], [('regression', {'anchor': [2022, 8, 16], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('regression', {'anchor': [2020, 3, 26], 'step': 14, 'year': 2020}, [27, '2020-01-02', True]), ('partial-repair probe', {'anchor': [2021, 6, 20], 'step': 14, 'year': 2023}, [27, '2023-01-01', True]), ('partial-repair probe', {'anchor': [2021, 1, 17], 'step': 14, 'year': 2023}, [27, '2023-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2021, 6, 11], 'step': 7, 'year': 2023}, [52, '2023-01-06', False]), ('normal control', {'anchor': [2025, 10, 16], 'step': 14, 'year': 2026}, [26, '2026-01-08', False]), ('normal control', {'anchor': [2024, 10, 14], 'step': 7, 'year': 2024}, [53, '2024-01-01', True]), ('normal control', {'anchor': [2018, 5, 7], 'step': 14, 'year': 2020}, [26, '2020-01-13', False])], [('regression', {'anchor': [2020, 3, 26], 'step': 14, 'year': 2020}, [27, '2020-01-02', True]), ('regression', {'anchor': [2023, 3, 28], 'step': 14, 'year': 2024}, [27, '2024-01-02', True]), ('partial-repair probe', {'anchor': [2022, 8, 16], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('partial-repair probe', {'anchor': [2025, 3, 13], 'step': 7, 'year': 2026}, [53, '2026-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2027, 5, 14], 'step': 14, 'year': 2026}, [26, '2026-01-09', False]), ('normal control', {'anchor': [2020, 3, 29], 'step': 7, 'year': 2020}, [52, '2020-01-05', False]), ('normal control', {'anchor': [2024, 2, 16], 'step': 14, 'year': 2023}, [26, '2023-01-06', False]), ('normal control', {'anchor': [2024, 2, 4], 'step': 14, 'year': 2023}, [26, '2023-01-08', False])], [('regression', {'anchor': [2023, 3, 28], 'step': 14, 'year': 2024}, [27, '2024-01-02', True]), ('regression', {'anchor': [2025, 10, 14], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('partial-repair probe', {'anchor': [2020, 3, 26], 'step': 14, 'year': 2020}, [27, '2020-01-02', True]), ('partial-repair probe', {'anchor': [2024, 10, 27], 'step': 7, 'year': 2023}, [53, '2023-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2024, 5, 1], 'step': 14, 'year': 2024}, [26, '2024-01-10', False]), ('normal control', {'anchor': [2021, 5, 10], 'step': 14, 'year': 2023}, [26, '2023-01-02', False]), ('normal control', {'anchor': [2027, 5, 22], 'step': 14, 'year': 2026}, [26, '2026-01-03', False]), ('normal control', {'anchor': [2024, 12, 7], 'step': 14, 'year': 2024}, [26, '2024-01-06', False])], [('regression', {'anchor': [2025, 10, 14], 'step': 7, 'year': 2024}, [53, '2024-01-02', True]), ('regression', {'anchor': [2020, 7, 16], 'step': 7, 'year': 2020}, [53, '2020-01-02', True]), ('partial-repair probe', {'anchor': [2023, 3, 28], 'step': 14, 'year': 2024}, [27, '2024-01-02', True]), ('partial-repair probe', {'anchor': [2021, 5, 2], 'step': 7, 'year': 2023}, [53, '2023-01-01', True]), ('boundary control', {'anchor': [2024, 1, 5], 'step': 14, 'year': 2024}, [26, '2024-01-05', False]), ('normal control', {'anchor': [2022, 9, 20], 'step': 14, 'year': 2023}, [26, '2023-01-10', False]), ('normal control', {'anchor': [2025, 8, 7], 'step': 7, 'year': 2025}, [52, '2025-01-02', False]), ('normal control', {'anchor': [2027, 11, 30], 'step': 14, 'year': 2026}, [26, '2026-01-13', False]), ('normal control', {'anchor': [2026, 7, 18], 'step': 14, 'year': 2025}, [26, '2025-01-04', False])]]\nfor i, (label, args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (label, i), 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 teaching model of a stipulated payroll rule with toy thresholds and rates. It makes no claim of conformance to any tax authority, statute or jurisdiction and is not payroll software. 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-payroll-withholding-pay-date-count-year-end-date","generated_at":"2026-09-29T14:46:34.214726+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Annualization factors change in 27-pay-period years; missing or extra pay dates distort per-period withholding.","root_cause":"The year end is computed as 364 days after January 1, which is December 30 in leap years.","sha256":"0786c428437aaafa1fa046755a66a7b42259cf0a9b2a1af5bb509d8076d5d3df","title":"Pay dates in a calendar year: year end date · 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.175,"exit_code":1,"observations":[{"actual":[26,"2020-01-02",false],"check":"regression (boundary) 0","expected":[27,"2020-01-02",true],"passed":false},{"actual":[52,"2024-01-02",false],"check":"regression 1","expected":[53,"2024-01-02",true],"passed":false},{"actual":[26,"2026-01-01",false],"check":"partial-repair probe (boundary) 2","expected":[27,"2026-01-01",true],"passed":false},{"actual":[26,"2023-01-01",false],"check":"partial-repair probe 3","expected":[27,"2023-01-01",true],"passed":false},{"actual":[26,"2024-01-05",false],"check":"boundary control 4","expected":[26,"2024-01-05",false],"passed":true},{"actual":[26,"2024-01-11",false],"check":"normal control 5","expected":[26,"2024-01-11",false],"passed":true},{"actual":[26,"2024-01-14",false],"check":"normal control 6","expected":[26,"2024-01-14",false],"passed":true},{"actual":[26,"2020-01-13",false],"check":"normal control 7","expected":[26,"2020-01-13",false],"passed":true},{"actual":[52,"2020-01-05",false],"check":"normal control 8","expected":[52,"2020-01-05",false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression (boundary) 0\", \"actual\": [26, \"2020-01-02\", false], \"expected\": [27, \"2020-01-02\", true], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [52, \"2024-01-02\", false], \"expected\": [53, \"2024-01-02\", true], \"passed\": false}, {\"check\": \"partial-repair probe (boundary) 2\", \"actual\": [26, \"2026-01-01\", false], \"expected\": [27, \"2026-01-01\", true], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [26, \"2023-01-01\", false], \"expected\": [27, \"2023-01-01\", true], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [26, \"2024-01-05\", false], \"expected\": [26, \"2024-01-05\", false], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [26, \"2024-01-11\", false], \"expected\": [26, \"2024-01-11\", false], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [26, \"2024-01-14\", false], \"expected\": [26, \"2024-01-14\", false], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [26, \"2020-01-13\", false], \"expected\": [26, \"2020-01-13\", false], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [52, \"2020-01-05\", false], \"expected\": [52, \"2020-01-05\", false], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.694,"exit_code":1,"observations":[{"actual":[26,"2020-01-02",false],"check":"regression (boundary) 0","expected":[27,"2020-01-02",true],"passed":false},{"actual":[52,"2024-01-02",false],"check":"regression 1","expected":[53,"2024-01-02",true],"passed":false},{"actual":[27,"2026-01-01",true],"check":"partial-repair probe (boundary) 2","expected":[27,"2026-01-01",true],"passed":true},{"actual":[27,"2023-01-01",true],"check":"partial-repair probe 3","expected":[27,"2023-01-01",true],"passed":true},{"actual":[26,"2024-01-05",false],"check":"boundary control 4","expected":[26,"2024-01-05",false],"passed":true},{"actual":[26,"2024-01-11",false],"check":"normal control 5","expected":[26,"2024-01-11",false],"passed":true},{"actual":[26,"2024-01-14",false],"check":"normal control 6","expected":[26,"2024-01-14",false],"passed":true},{"actual":[26,"2020-01-13",false],"check":"normal control 7","expected":[26,"2020-01-13",false],"passed":true},{"actual":[52,"2020-01-05",false],"check":"normal control 8","expected":[52,"2020-01-05",false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression (boundary) 0\", \"actual\": [26, \"2020-01-02\", false], \"expected\": [27, \"2020-01-02\", true], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [52, \"2024-01-02\", false], \"expected\": [53, \"2024-01-02\", true], \"passed\": false}, {\"check\": \"partial-repair probe (boundary) 2\", \"actual\": [27, \"2026-01-01\", true], \"expected\": [27, \"2026-01-01\", true], \"passed\": true}, {\"check\": \"partial-repair probe 3\", \"actual\": [27, \"2023-01-01\", true], \"expected\": [27, \"2023-01-01\", true], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [26, \"2024-01-05\", false], \"expected\": [26, \"2024-01-05\", false], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [26, \"2024-01-11\", false], \"expected\": [26, \"2024-01-11\", false], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [26, \"2024-01-14\", false], \"expected\": [26, \"2024-01-14\", false], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [26, \"2020-01-13\", false], \"expected\": [26, \"2020-01-13\", false], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [52, \"2020-01-05\", false], \"expected\": [52, \"2020-01-05\", false], \"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."}}