{"abstract":"Employees whose income reaches a higher bracket are withheld far too much because lower brackets tax the whole income.","category":"Payroll withholding rules","checks":10,"contract":"Input {wage, freq, allow, status}. Annualize: wage*periods (weekly 52, biweekly 26, semimonthly 24, monthly 12); subtract 4,300.00 per allowance, floor 0. Marginal brackets over 4,000/15,000/50,000 dollars at 10/12/22% (married thresholds doubled). Annual tax (in cent-percent units) is divided by periods and rounded half-up to cents once.","contract_signature":"x","evaluation_group":"w2-payroll-withholding-annualized-percentage-method","failed_approach":"The attempt clips at one cent below the next threshold, leaving one cent per crossed bracket taxed at the lower rate.","family":"w2-payroll-withholding-annualized-percentage-method-bracket-slice-upper-bound","id":"FA-58886","implementations":{"attempt":{"sha256":"4deb4c97149611253692a199964d2c4d3c8fb68cf05d96ca864c8076ee52b411","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    periods = {'weekly': 52, 'biweekly': 26, 'semimonthly': 24, 'monthly': 12}[x['freq']]\n    annual = x['wage'] * periods\n    adjusted = max(0, annual - x['allow'] * 430000)\n    mult = 2 if x['status'] == 'married' else 1\n    brackets = [(400000 * mult, 10), (1500000 * mult, 12), (5000000 * mult, 22)]\n    tax = 0\n    for i, (lo, rate) in enumerate(brackets):\n        hi = brackets[i + 1][0] if i + 1 < len(brackets) else None\n        if adjusted > lo:\n            top = adjusted if hi is None else min(adjusted, hi - 1)\n            tax += (top - lo) * rate\n    wh = (tax * 2 + 100 * periods) // (200 * periods)\n    return wh\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('regression (boundary)', {'wage': 57693, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 5577), ('partial-repair probe', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('partial-repair probe', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 22359, 'freq': 'semimonthly', 'allow': 5, 'status': 'married'}, 0), ('normal control', {'wage': 89742, 'freq': 'monthly', 'allow': 1, 'status': 'married'}, 0), ('normal control', {'wage': 17607, 'freq': 'semimonthly', 'allow': 4, 'status': 'married'}, 0), ('normal control', {'wage': 6134, 'freq': 'semimonthly', 'allow': 0, 'status': 'single'}, 0)], [('regression', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('regression', {'wage': 998152, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 168152), ('partial-repair probe', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('partial-repair probe', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 52312, 'freq': 'semimonthly', 'allow': 5, 'status': 'single'}, 0), ('normal control', {'wage': 28087, 'freq': 'biweekly', 'allow': 1, 'status': 'single'}, 0), ('normal control', {'wage': 97334, 'freq': 'monthly', 'allow': 6, 'status': 'single'}, 0), ('normal control', {'wage': 18119, 'freq': 'weekly', 'allow': 3, 'status': 'married'}, 0)], [('regression', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('regression', {'wage': 992194, 'freq': 'weekly', 'allow': 3, 'status': 'married'}, 190902), ('partial-repair probe', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('partial-repair probe', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 10871, 'freq': 'weekly', 'allow': 6, 'status': 'single'}, 0), ('normal control', {'wage': 836, 'freq': 'semimonthly', 'allow': 1, 'status': 'single'}, 0), ('normal control', {'wage': 30453, 'freq': 'biweekly', 'allow': 2, 'status': 'married'}, 0), ('normal control', {'wage': 36754, 'freq': 'biweekly', 'allow': 1, 'status': 'single'}, 483)], [('regression', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('regression', {'wage': 1223812, 'freq': 'monthly', 'allow': 5, 'status': 'married'}, 134822), ('partial-repair probe', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('partial-repair probe', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 124657, 'freq': 'semimonthly', 'allow': 4, 'status': 'married'}, 1966), ('normal control', {'wage': 27188, 'freq': 'semimonthly', 'allow': 4, 'status': 'married'}, 0), ('normal control', {'wage': 157996, 'freq': 'semimonthly', 'allow': 4, 'status': 'married'}, 5300), ('normal control', {'wage': 143245, 'freq': 'biweekly', 'allow': 5, 'status': 'married'}, 2978)], [('regression', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('regression', {'wage': 475908, 'freq': 'monthly', 'allow': 6, 'status': 'single'}, 25476), ('partial-repair probe', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('partial-repair probe', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 23859, 'freq': 'semimonthly', 'allow': 2, 'status': 'married'}, 0), ('normal control', {'wage': 50426, 'freq': 'semimonthly', 'allow': 5, 'status': 'married'}, 0), ('normal control', {'wage': 128102, 'freq': 'monthly', 'allow': 5, 'status': 'married'}, 0), ('normal control', {'wage': 6608, 'freq': 'semimonthly', 'allow': 0, 'status': 'married'}, 0)]]\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":"ff344c9ce75e437a141d8a19dcfdf45349bbfb531fd667e039e80145f6111dff","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    periods = {'weekly': 52, 'biweekly': 26, 'semimonthly': 24, 'monthly': 12}[x['freq']]\n    annual = x['wage'] * periods\n    adjusted = max(0, annual - x['allow'] * 430000)\n    mult = 2 if x['status'] == 'married' else 1\n    brackets = [(400000 * mult, 10), (1500000 * mult, 12), (5000000 * mult, 22)]\n    tax = 0\n    for i, (lo, rate) in enumerate(brackets):\n        hi = brackets[i + 1][0] if i + 1 < len(brackets) else None\n        if adjusted > lo:\n            top = adjusted\n            tax += (top - lo) * rate\n    wh = (tax * 2 + 100 * periods) // (200 * periods)\n    return wh\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('regression (boundary)', {'wage': 57693, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 5577), ('partial-repair probe', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('partial-repair probe', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 22359, 'freq': 'semimonthly', 'allow': 5, 'status': 'married'}, 0), ('normal control', {'wage': 89742, 'freq': 'monthly', 'allow': 1, 'status': 'married'}, 0), ('normal control', {'wage': 17607, 'freq': 'semimonthly', 'allow': 4, 'status': 'married'}, 0), ('normal control', {'wage': 6134, 'freq': 'semimonthly', 'allow': 0, 'status': 'single'}, 0)], [('regression', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('regression', {'wage': 998152, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 168152), ('partial-repair probe', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('partial-repair probe', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 52312, 'freq': 'semimonthly', 'allow': 5, 'status': 'single'}, 0), ('normal control', {'wage': 28087, 'freq': 'biweekly', 'allow': 1, 'status': 'single'}, 0), ('normal control', {'wage': 97334, 'freq': 'monthly', 'allow': 6, 'status': 'single'}, 0), ('normal control', {'wage': 18119, 'freq': 'weekly', 'allow': 3, 'status': 'married'}, 0)], [('regression', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('regression', {'wage': 992194, 'freq': 'weekly', 'allow': 3, 'status': 'married'}, 190902), ('partial-repair probe', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('partial-repair probe', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 10871, 'freq': 'weekly', 'allow': 6, 'status': 'single'}, 0), ('normal control', {'wage': 836, 'freq': 'semimonthly', 'allow': 1, 'status': 'single'}, 0), ('normal control', {'wage': 30453, 'freq': 'biweekly', 'allow': 2, 'status': 'married'}, 0), ('normal control', {'wage': 36754, 'freq': 'biweekly', 'allow': 1, 'status': 'single'}, 483)], [('regression', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('regression', {'wage': 1223812, 'freq': 'monthly', 'allow': 5, 'status': 'married'}, 134822), ('partial-repair probe', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('partial-repair probe', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 124657, 'freq': 'semimonthly', 'allow': 4, 'status': 'married'}, 1966), ('normal control', {'wage': 27188, 'freq': 'semimonthly', 'allow': 4, 'status': 'married'}, 0), ('normal control', {'wage': 157996, 'freq': 'semimonthly', 'allow': 4, 'status': 'married'}, 5300), ('normal control', {'wage': 143245, 'freq': 'biweekly', 'allow': 5, 'status': 'married'}, 2978)], [('regression', {'wage': 460175, 'freq': 'biweekly', 'allow': 4, 'status': 'married'}, 42839), ('regression', {'wage': 475908, 'freq': 'monthly', 'allow': 6, 'status': 'single'}, 25476), ('partial-repair probe', {'wage': 223432, 'freq': 'monthly', 'allow': 0, 'status': 'single'}, 20979), ('partial-repair probe', {'wage': 497372, 'freq': 'semimonthly', 'allow': 2, 'status': 'single'}, 77789), ('boundary control', {'wage': 0, 'freq': 'weekly', 'allow': 0, 'status': 'single'}, 0), ('boundary control', {'wage': 125000, 'freq': 'semimonthly', 'allow': 1, 'status': 'married'}, 7375), ('normal control', {'wage': 23859, 'freq': 'semimonthly', 'allow': 2, 'status': 'married'}, 0), ('normal control', {'wage': 50426, 'freq': 'semimonthly', 'allow': 5, 'status': 'married'}, 0), ('normal control', {'wage': 128102, 'freq': 'monthly', 'allow': 5, 'status': 'married'}, 0), ('normal control', {'wage': 6608, 'freq': 'semimonthly', 'allow': 0, 'status': 'married'}, 0)]]\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-annualized-percentage-method-bracket-slice-upper-bound","generated_at":"2026-09-29T14:46:30.935401+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Percentage-method withholding depends on marginal bracket slices and on rounding only after de-annualizing.","root_cause":"Each bracket slice runs to the full adjusted income instead of stopping at the next bracket threshold.","sha256":"3f6c335dedefb5dd2a9fd638c2a0719d150c50edb973e2177c5c7c0731f574d4","title":"Annualized percentage-method withholding: bracket slice upper bound · 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":44.053,"exit_code":1,"observations":[{"actual":77788,"check":"regression 0","expected":77789,"passed":false},{"actual":5577,"check":"regression (boundary) 1","expected":5577,"passed":true},{"actual":42838,"check":"partial-repair probe 2","expected":42839,"passed":false},{"actual":20978,"check":"partial-repair probe 3","expected":20979,"passed":false},{"actual":0,"check":"boundary control 4","expected":0,"passed":true},{"actual":7375,"check":"boundary control 5","expected":7375,"passed":true},{"actual":0,"check":"normal control 6","expected":0,"passed":true},{"actual":0,"check":"normal control 7","expected":0,"passed":true},{"actual":0,"check":"normal control 8","expected":0,"passed":true},{"actual":0,"check":"normal control 9","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": 77788, \"expected\": 77789, \"passed\": false}, {\"check\": \"regression (boundary) 1\", \"actual\": 5577, \"expected\": 5577, \"passed\": true}, {\"check\": \"partial-repair probe 2\", \"actual\": 42838, \"expected\": 42839, \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": 20978, \"expected\": 20979, \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": 7375, \"expected\": 7375, \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 9\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.489,"exit_code":1,"observations":[{"actual":148077,"check":"regression 0","expected":77789,"passed":false},{"actual":8462,"check":"regression (boundary) 1","expected":5577,"passed":false},{"actual":71831,"check":"partial-repair probe 2","expected":42839,"passed":false},{"actual":30822,"check":"partial-repair probe 3","expected":20979,"passed":false},{"actual":0,"check":"boundary control 4","expected":0,"passed":true},{"actual":7375,"check":"boundary control 5","expected":7375,"passed":true},{"actual":0,"check":"normal control 6","expected":0,"passed":true},{"actual":0,"check":"normal control 7","expected":0,"passed":true},{"actual":0,"check":"normal control 8","expected":0,"passed":true},{"actual":0,"check":"normal control 9","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": 148077, \"expected\": 77789, \"passed\": false}, {\"check\": \"regression (boundary) 1\", \"actual\": 8462, \"expected\": 5577, \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": 71831, \"expected\": 42839, \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": 30822, \"expected\": 20979, \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": 7375, \"expected\": 7375, \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal control 9\", \"actual\": 0, \"expected\": 0, \"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."}}