{"abstract":"Nonresident employees have social security and Medicare withheld on money they never earned.","category":"Payroll withholding rules","checks":8,"contract":"Input {wage, freq, nra, w4_year, visa, years_present}. Nonresident aliens add a per-period amount to wages for income-tax withholding only (2020+ forms: weekly 209.60, biweekly 419.20, semimonthly 454.20, monthly 908.30; older forms: 151.00, 302.00, 327.00, 654.00). FICA wages are the actual wages, or 0 for F and J visa holders present 5 years or fewer. Return [fit_wages, fica_wages].","evaluation_group":"w2-payroll-withholding-nonresident-alien-wage-add","failed_approach":"The attempt only fixes newer forms, still adding the amount to FICA wages for pre-2020 forms.","family":"w2-payroll-withholding-nonresident-alien-wage-add-fica-base-excludes-add-on","id":"FA-59311","implementations":{"attempt":{"sha256":"a9b41b1c7de7548f1a669df31e261c8511bfdd6fea9378931aab00d21d09f4ba","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    new = {'weekly': 20960, 'biweekly': 41920, 'semimonthly': 45420, 'monthly': 90830}\n    old = {'weekly': 15100, 'biweekly': 30200, 'semimonthly': 32700, 'monthly': 65400}\n    add = new[x['freq']] if x['w4_year'] >= 2020 else old[x['freq']]\n    fit = x['wage'] + (add if x['nra'] else 0)\n    exempt = x['visa'] in ('F', 'J') and x['years_present'] <= 5\n    fica = 0 if exempt else (fit if x['w4_year'] < 2020 else x['wage'])\n    return [fit, fica]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'wage': 210010, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 1}, [240210, 210010]), ('regression', {'wage': 252469, 'freq': 'weekly', 'nra': True, 'w4_year': 2021, 'visa': None, 'years_present': 8}, [273429, 252469]), ('partial-repair probe', {'wage': 141591, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': 'H', 'years_present': 4}, [171791, 141591]), ('partial-repair probe', {'wage': 21555, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 6}, [51755, 21555]), ('normal control', {'wage': 392169, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'F', 'years_present': 1}, [424869, 0]), ('normal control', {'wage': 245306, 'freq': 'weekly', 'nra': False, 'w4_year': 2020, 'visa': 'F', 'years_present': 6}, [245306, 245306]), ('normal control', {'wage': 314655, 'freq': 'monthly', 'nra': False, 'w4_year': 2024, 'visa': 'J', 'years_present': 1}, [314655, 0]), ('normal control', {'wage': 350530, 'freq': 'weekly', 'nra': False, 'w4_year': 2018, 'visa': None, 'years_present': 1}, [350530, 350530])], [('regression', {'wage': 141591, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': 'H', 'years_present': 4}, [171791, 141591]), ('regression', {'wage': 286154, 'freq': 'monthly', 'nra': True, 'w4_year': 2024, 'visa': 'H', 'years_present': 1}, [376984, 286154]), ('partial-repair probe', {'wage': 21555, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 6}, [51755, 21555]), ('partial-repair probe', {'wage': 89672, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 4}, [122372, 89672]), ('normal control', {'wage': 40274, 'freq': 'monthly', 'nra': True, 'w4_year': 2018, 'visa': 'F', 'years_present': 5}, [105674, 0]), ('normal control', {'wage': 179956, 'freq': 'monthly', 'nra': True, 'w4_year': 2021, 'visa': 'J', 'years_present': 5}, [270786, 0]), ('normal control', {'wage': 279817, 'freq': 'biweekly', 'nra': False, 'w4_year': 2019, 'visa': None, 'years_present': 8}, [279817, 279817]), ('normal control', {'wage': 352005, 'freq': 'semimonthly', 'nra': False, 'w4_year': 2018, 'visa': 'H', 'years_present': 5}, [352005, 352005])], [('regression', {'wage': 21555, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 6}, [51755, 21555]), ('regression', {'wage': 2124, 'freq': 'monthly', 'nra': True, 'w4_year': 2024, 'visa': 'H', 'years_present': 6}, [92954, 2124]), ('partial-repair probe', {'wage': 2221, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 5}, [34921, 2221]), ('partial-repair probe', {'wage': 244355, 'freq': 'monthly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 5}, [309755, 244355]), ('normal control', {'wage': 328051, 'freq': 'weekly', 'nra': False, 'w4_year': 2024, 'visa': None, 'years_present': 5}, [328051, 328051]), ('normal control', {'wage': 437685, 'freq': 'weekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 4}, [452785, 0]), ('normal control', {'wage': 434085, 'freq': 'weekly', 'nra': False, 'w4_year': 2020, 'visa': None, 'years_present': 6}, [434085, 434085]), ('normal control', {'wage': 178971, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': 'F', 'years_present': 1}, [209171, 0])], [('regression', {'wage': 89672, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 4}, [122372, 89672]), ('regression', {'wage': 210010, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 1}, [240210, 210010]), ('partial-repair probe', {'wage': 55206, 'freq': 'monthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 1}, [120606, 55206]), ('partial-repair probe', {'wage': 486395, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 1}, [519095, 486395]), ('normal control', {'wage': 135055, 'freq': 'monthly', 'nra': False, 'w4_year': 2020, 'visa': None, 'years_present': 8}, [135055, 135055]), ('normal control', {'wage': 146242, 'freq': 'monthly', 'nra': True, 'w4_year': 2021, 'visa': 'F', 'years_present': 4}, [237072, 0]), ('normal control', {'wage': 474591, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2021, 'visa': 'J', 'years_present': 4}, [520011, 0]), ('normal control', {'wage': 345401, 'freq': 'weekly', 'nra': False, 'w4_year': 2021, 'visa': 'J', 'years_present': 8}, [345401, 345401])], [('regression', {'wage': 2221, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 5}, [34921, 2221]), ('regression', {'wage': 436984, 'freq': 'biweekly', 'nra': True, 'w4_year': 2021, 'visa': 'J', 'years_present': 8}, [478904, 436984]), ('partial-repair probe', {'wage': 176371, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': None, 'years_present': 5}, [206571, 176371]), ('partial-repair probe', {'wage': 485186, 'freq': 'weekly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 8}, [500286, 485186]), ('normal control', {'wage': 356715, 'freq': 'weekly', 'nra': False, 'w4_year': 2024, 'visa': 'F', 'years_present': 6}, [356715, 356715]), ('normal control', {'wage': 62573, 'freq': 'monthly', 'nra': False, 'w4_year': 2018, 'visa': 'F', 'years_present': 6}, [62573, 62573]), ('normal control', {'wage': 54168, 'freq': 'weekly', 'nra': True, 'w4_year': 2018, 'visa': 'J', 'years_present': 4}, [69268, 0]), ('normal control', {'wage': 287286, 'freq': 'weekly', 'nra': False, 'w4_year': 2020, 'visa': 'F', 'years_present': 1}, [287286, 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":"290d827f3542c1cdc98a530bcc55e5ae6dea561e226451c8dc31e2c3be158fad","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    new = {'weekly': 20960, 'biweekly': 41920, 'semimonthly': 45420, 'monthly': 90830}\n    old = {'weekly': 15100, 'biweekly': 30200, 'semimonthly': 32700, 'monthly': 65400}\n    add = new[x['freq']] if x['w4_year'] >= 2020 else old[x['freq']]\n    fit = x['wage'] + (add if x['nra'] else 0)\n    exempt = x['visa'] in ('F', 'J') and x['years_present'] <= 5\n    fica = 0 if exempt else fit\n    return [fit, fica]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'wage': 210010, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 1}, [240210, 210010]), ('regression', {'wage': 252469, 'freq': 'weekly', 'nra': True, 'w4_year': 2021, 'visa': None, 'years_present': 8}, [273429, 252469]), ('partial-repair probe', {'wage': 141591, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': 'H', 'years_present': 4}, [171791, 141591]), ('partial-repair probe', {'wage': 21555, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 6}, [51755, 21555]), ('normal control', {'wage': 392169, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'F', 'years_present': 1}, [424869, 0]), ('normal control', {'wage': 245306, 'freq': 'weekly', 'nra': False, 'w4_year': 2020, 'visa': 'F', 'years_present': 6}, [245306, 245306]), ('normal control', {'wage': 314655, 'freq': 'monthly', 'nra': False, 'w4_year': 2024, 'visa': 'J', 'years_present': 1}, [314655, 0]), ('normal control', {'wage': 350530, 'freq': 'weekly', 'nra': False, 'w4_year': 2018, 'visa': None, 'years_present': 1}, [350530, 350530])], [('regression', {'wage': 141591, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': 'H', 'years_present': 4}, [171791, 141591]), ('regression', {'wage': 286154, 'freq': 'monthly', 'nra': True, 'w4_year': 2024, 'visa': 'H', 'years_present': 1}, [376984, 286154]), ('partial-repair probe', {'wage': 21555, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 6}, [51755, 21555]), ('partial-repair probe', {'wage': 89672, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 4}, [122372, 89672]), ('normal control', {'wage': 40274, 'freq': 'monthly', 'nra': True, 'w4_year': 2018, 'visa': 'F', 'years_present': 5}, [105674, 0]), ('normal control', {'wage': 179956, 'freq': 'monthly', 'nra': True, 'w4_year': 2021, 'visa': 'J', 'years_present': 5}, [270786, 0]), ('normal control', {'wage': 279817, 'freq': 'biweekly', 'nra': False, 'w4_year': 2019, 'visa': None, 'years_present': 8}, [279817, 279817]), ('normal control', {'wage': 352005, 'freq': 'semimonthly', 'nra': False, 'w4_year': 2018, 'visa': 'H', 'years_present': 5}, [352005, 352005])], [('regression', {'wage': 21555, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 6}, [51755, 21555]), ('regression', {'wage': 2124, 'freq': 'monthly', 'nra': True, 'w4_year': 2024, 'visa': 'H', 'years_present': 6}, [92954, 2124]), ('partial-repair probe', {'wage': 2221, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 5}, [34921, 2221]), ('partial-repair probe', {'wage': 244355, 'freq': 'monthly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 5}, [309755, 244355]), ('normal control', {'wage': 328051, 'freq': 'weekly', 'nra': False, 'w4_year': 2024, 'visa': None, 'years_present': 5}, [328051, 328051]), ('normal control', {'wage': 437685, 'freq': 'weekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 4}, [452785, 0]), ('normal control', {'wage': 434085, 'freq': 'weekly', 'nra': False, 'w4_year': 2020, 'visa': None, 'years_present': 6}, [434085, 434085]), ('normal control', {'wage': 178971, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': 'F', 'years_present': 1}, [209171, 0])], [('regression', {'wage': 89672, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 4}, [122372, 89672]), ('regression', {'wage': 210010, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 1}, [240210, 210010]), ('partial-repair probe', {'wage': 55206, 'freq': 'monthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 1}, [120606, 55206]), ('partial-repair probe', {'wage': 486395, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 1}, [519095, 486395]), ('normal control', {'wage': 135055, 'freq': 'monthly', 'nra': False, 'w4_year': 2020, 'visa': None, 'years_present': 8}, [135055, 135055]), ('normal control', {'wage': 146242, 'freq': 'monthly', 'nra': True, 'w4_year': 2021, 'visa': 'F', 'years_present': 4}, [237072, 0]), ('normal control', {'wage': 474591, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2021, 'visa': 'J', 'years_present': 4}, [520011, 0]), ('normal control', {'wage': 345401, 'freq': 'weekly', 'nra': False, 'w4_year': 2021, 'visa': 'J', 'years_present': 8}, [345401, 345401])], [('regression', {'wage': 2221, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 5}, [34921, 2221]), ('regression', {'wage': 436984, 'freq': 'biweekly', 'nra': True, 'w4_year': 2021, 'visa': 'J', 'years_present': 8}, [478904, 436984]), ('partial-repair probe', {'wage': 176371, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': None, 'years_present': 5}, [206571, 176371]), ('partial-repair probe', {'wage': 485186, 'freq': 'weekly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 8}, [500286, 485186]), ('normal control', {'wage': 356715, 'freq': 'weekly', 'nra': False, 'w4_year': 2024, 'visa': 'F', 'years_present': 6}, [356715, 356715]), ('normal control', {'wage': 62573, 'freq': 'monthly', 'nra': False, 'w4_year': 2018, 'visa': 'F', 'years_present': 6}, [62573, 62573]), ('normal control', {'wage': 54168, 'freq': 'weekly', 'nra': True, 'w4_year': 2018, 'visa': 'J', 'years_present': 4}, [69268, 0]), ('normal control', {'wage': 287286, 'freq': 'weekly', 'nra': False, 'w4_year': 2020, 'visa': 'F', 'years_present': 1}, [287286, 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"},"fixed":{"sha256":"d0ae6cc7c0d152c5736acf8ce0ecc8e8c6fb80ffe541ba03e9ea163f6f846cec","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    new = {'weekly': 20960, 'biweekly': 41920, 'semimonthly': 45420, 'monthly': 90830}\n    old = {'weekly': 15100, 'biweekly': 30200, 'semimonthly': 32700, 'monthly': 65400}\n    add = new[x['freq']] if x['w4_year'] >= 2020 else old[x['freq']]\n    fit = x['wage'] + (add if x['nra'] else 0)\n    exempt = x['visa'] in ('F', 'J') and x['years_present'] <= 5\n    fica = 0 if exempt else x['wage']\n    return [fit, fica]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression', {'wage': 210010, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 1}, [240210, 210010]), ('regression', {'wage': 252469, 'freq': 'weekly', 'nra': True, 'w4_year': 2021, 'visa': None, 'years_present': 8}, [273429, 252469]), ('partial-repair probe', {'wage': 141591, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': 'H', 'years_present': 4}, [171791, 141591]), ('partial-repair probe', {'wage': 21555, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 6}, [51755, 21555]), ('normal control', {'wage': 392169, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'F', 'years_present': 1}, [424869, 0]), ('normal control', {'wage': 245306, 'freq': 'weekly', 'nra': False, 'w4_year': 2020, 'visa': 'F', 'years_present': 6}, [245306, 245306]), ('normal control', {'wage': 314655, 'freq': 'monthly', 'nra': False, 'w4_year': 2024, 'visa': 'J', 'years_present': 1}, [314655, 0]), ('normal control', {'wage': 350530, 'freq': 'weekly', 'nra': False, 'w4_year': 2018, 'visa': None, 'years_present': 1}, [350530, 350530])], [('regression', {'wage': 141591, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': 'H', 'years_present': 4}, [171791, 141591]), ('regression', {'wage': 286154, 'freq': 'monthly', 'nra': True, 'w4_year': 2024, 'visa': 'H', 'years_present': 1}, [376984, 286154]), ('partial-repair probe', {'wage': 21555, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 6}, [51755, 21555]), ('partial-repair probe', {'wage': 89672, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 4}, [122372, 89672]), ('normal control', {'wage': 40274, 'freq': 'monthly', 'nra': True, 'w4_year': 2018, 'visa': 'F', 'years_present': 5}, [105674, 0]), ('normal control', {'wage': 179956, 'freq': 'monthly', 'nra': True, 'w4_year': 2021, 'visa': 'J', 'years_present': 5}, [270786, 0]), ('normal control', {'wage': 279817, 'freq': 'biweekly', 'nra': False, 'w4_year': 2019, 'visa': None, 'years_present': 8}, [279817, 279817]), ('normal control', {'wage': 352005, 'freq': 'semimonthly', 'nra': False, 'w4_year': 2018, 'visa': 'H', 'years_present': 5}, [352005, 352005])], [('regression', {'wage': 21555, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 6}, [51755, 21555]), ('regression', {'wage': 2124, 'freq': 'monthly', 'nra': True, 'w4_year': 2024, 'visa': 'H', 'years_present': 6}, [92954, 2124]), ('partial-repair probe', {'wage': 2221, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 5}, [34921, 2221]), ('partial-repair probe', {'wage': 244355, 'freq': 'monthly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 5}, [309755, 244355]), ('normal control', {'wage': 328051, 'freq': 'weekly', 'nra': False, 'w4_year': 2024, 'visa': None, 'years_present': 5}, [328051, 328051]), ('normal control', {'wage': 437685, 'freq': 'weekly', 'nra': True, 'w4_year': 2019, 'visa': 'J', 'years_present': 4}, [452785, 0]), ('normal control', {'wage': 434085, 'freq': 'weekly', 'nra': False, 'w4_year': 2020, 'visa': None, 'years_present': 6}, [434085, 434085]), ('normal control', {'wage': 178971, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': 'F', 'years_present': 1}, [209171, 0])], [('regression', {'wage': 89672, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 4}, [122372, 89672]), ('regression', {'wage': 210010, 'freq': 'biweekly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 1}, [240210, 210010]), ('partial-repair probe', {'wage': 55206, 'freq': 'monthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 1}, [120606, 55206]), ('partial-repair probe', {'wage': 486395, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 1}, [519095, 486395]), ('normal control', {'wage': 135055, 'freq': 'monthly', 'nra': False, 'w4_year': 2020, 'visa': None, 'years_present': 8}, [135055, 135055]), ('normal control', {'wage': 146242, 'freq': 'monthly', 'nra': True, 'w4_year': 2021, 'visa': 'F', 'years_present': 4}, [237072, 0]), ('normal control', {'wage': 474591, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2021, 'visa': 'J', 'years_present': 4}, [520011, 0]), ('normal control', {'wage': 345401, 'freq': 'weekly', 'nra': False, 'w4_year': 2021, 'visa': 'J', 'years_present': 8}, [345401, 345401])], [('regression', {'wage': 2221, 'freq': 'semimonthly', 'nra': True, 'w4_year': 2019, 'visa': 'H', 'years_present': 5}, [34921, 2221]), ('regression', {'wage': 436984, 'freq': 'biweekly', 'nra': True, 'w4_year': 2021, 'visa': 'J', 'years_present': 8}, [478904, 436984]), ('partial-repair probe', {'wage': 176371, 'freq': 'biweekly', 'nra': True, 'w4_year': 2018, 'visa': None, 'years_present': 5}, [206571, 176371]), ('partial-repair probe', {'wage': 485186, 'freq': 'weekly', 'nra': True, 'w4_year': 2019, 'visa': None, 'years_present': 8}, [500286, 485186]), ('normal control', {'wage': 356715, 'freq': 'weekly', 'nra': False, 'w4_year': 2024, 'visa': 'F', 'years_present': 6}, [356715, 356715]), ('normal control', {'wage': 62573, 'freq': 'monthly', 'nra': False, 'w4_year': 2018, 'visa': 'F', 'years_present': 6}, [62573, 62573]), ('normal control', {'wage': 54168, 'freq': 'weekly', 'nra': True, 'w4_year': 2018, 'visa': 'J', 'years_present': 4}, [69268, 0]), ('normal control', {'wage': 287286, 'freq': 'weekly', 'nra': False, 'w4_year': 2020, 'visa': 'F', 'years_present': 1}, [287286, 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-nonresident-alien-wage-add-fica-base-excludes-add-on","generated_at":"2026-09-29T14:46:35.029368+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"The nonresident add-on inflates only the income-tax base; student and scholar FICA exemptions are time-limited.","repair":"Restore the contract rule at the FICA base excludes add-on step: use `fica = 0 if exempt else x['wage']`.","root_cause":"The FICA wage base uses the income-tax wages that include the nonresident add-on.","sha256":"01814d7a7cf7a2664d31798cfacce0207ba423358742ed771a85bd37b2dd46ca","title":"Nonresident alien wage add-on: FICA base excludes add-on · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.56,"exit_code":1,"observations":[{"actual":[240210,240210],"check":"regression 0","expected":[240210,210010],"passed":false},{"actual":[273429,252469],"check":"regression 1","expected":[273429,252469],"passed":true},{"actual":[171791,171791],"check":"partial-repair probe 2","expected":[171791,141591],"passed":false},{"actual":[51755,51755],"check":"partial-repair probe 3","expected":[51755,21555],"passed":false},{"actual":[424869,0],"check":"normal control 4","expected":[424869,0],"passed":true},{"actual":[245306,245306],"check":"normal control 5","expected":[245306,245306],"passed":true},{"actual":[314655,0],"check":"normal control 6","expected":[314655,0],"passed":true},{"actual":[350530,350530],"check":"normal control 7","expected":[350530,350530],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [240210, 240210], \"expected\": [240210, 210010], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [273429, 252469], \"expected\": [273429, 252469], \"passed\": true}, {\"check\": \"partial-repair probe 2\", \"actual\": [171791, 171791], \"expected\": [171791, 141591], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [51755, 51755], \"expected\": [51755, 21555], \"passed\": false}, {\"check\": \"normal control 4\", \"actual\": [424869, 0], \"expected\": [424869, 0], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [245306, 245306], \"expected\": [245306, 245306], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [314655, 0], \"expected\": [314655, 0], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [350530, 350530], \"expected\": [350530, 350530], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.012,"exit_code":1,"observations":[{"actual":[240210,240210],"check":"regression 0","expected":[240210,210010],"passed":false},{"actual":[273429,273429],"check":"regression 1","expected":[273429,252469],"passed":false},{"actual":[171791,171791],"check":"partial-repair probe 2","expected":[171791,141591],"passed":false},{"actual":[51755,51755],"check":"partial-repair probe 3","expected":[51755,21555],"passed":false},{"actual":[424869,0],"check":"normal control 4","expected":[424869,0],"passed":true},{"actual":[245306,245306],"check":"normal control 5","expected":[245306,245306],"passed":true},{"actual":[314655,0],"check":"normal control 6","expected":[314655,0],"passed":true},{"actual":[350530,350530],"check":"normal control 7","expected":[350530,350530],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [240210, 240210], \"expected\": [240210, 210010], \"passed\": false}, {\"check\": \"regression 1\", \"actual\": [273429, 273429], \"expected\": [273429, 252469], \"passed\": false}, {\"check\": \"partial-repair probe 2\", \"actual\": [171791, 171791], \"expected\": [171791, 141591], \"passed\": false}, {\"check\": \"partial-repair probe 3\", \"actual\": [51755, 51755], \"expected\": [51755, 21555], \"passed\": false}, {\"check\": \"normal control 4\", \"actual\": [424869, 0], \"expected\": [424869, 0], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [245306, 245306], \"expected\": [245306, 245306], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [314655, 0], \"expected\": [314655, 0], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [350530, 350530], \"expected\": [350530, 350530], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.891,"exit_code":0,"observations":[{"actual":[240210,210010],"check":"regression 0","expected":[240210,210010],"passed":true},{"actual":[273429,252469],"check":"regression 1","expected":[273429,252469],"passed":true},{"actual":[171791,141591],"check":"partial-repair probe 2","expected":[171791,141591],"passed":true},{"actual":[51755,21555],"check":"partial-repair probe 3","expected":[51755,21555],"passed":true},{"actual":[424869,0],"check":"normal control 4","expected":[424869,0],"passed":true},{"actual":[245306,245306],"check":"normal control 5","expected":[245306,245306],"passed":true},{"actual":[314655,0],"check":"normal control 6","expected":[314655,0],"passed":true},{"actual":[350530,350530],"check":"normal control 7","expected":[350530,350530],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 0\", \"actual\": [240210, 210010], \"expected\": [240210, 210010], \"passed\": true}, {\"check\": \"regression 1\", \"actual\": [273429, 252469], \"expected\": [273429, 252469], \"passed\": true}, {\"check\": \"partial-repair probe 2\", \"actual\": [171791, 141591], \"expected\": [171791, 141591], \"passed\": true}, {\"check\": \"partial-repair probe 3\", \"actual\": [51755, 21555], \"expected\": [51755, 21555], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [424869, 0], \"expected\": [424869, 0], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [245306, 245306], \"expected\": [245306, 245306], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [314655, 0], \"expected\": [314655, 0], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [350530, 350530], \"expected\": [350530, 350530], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}