{"abstract":"Some surcharges are one cent higher than stipulated.","category":"Tax bracket computation","checks":8,"contract":"solve(income_tax, joint): stipulated surcharge on income tax, in integer cents. The exemption limit is 1813000 (doubled for joint assessment). At or below it the surcharge is 0; above it the surcharge is the lesser of 5.5% of the income tax and 11.9% of the excess over the limit (a gliding zone), rounded down to cents.","evaluation_group":"w2-tax_bracket_computation-surcharge-exemption-limit-glide","failed_approach":"Rounding up to the next cent over-charges every fractional surcharge.","family":"w2-tax_bracket_computation-surcharge-exemption-limit-glide-round-down-cents","id":"FA-62811","implementations":{"attempt":{"sha256":"8d4997995005609abf2bebedf5c877507d728f46c30704ccb923efa10b70bf90","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(income_tax, joint):\n    thr = 1813000 * (2 if joint else 1)\n    if income_tax <= thr: return 0\n    soli = min(income_tax * Fraction(55, 1000), (income_tax - thr) * Fraction(119, 1000))\n    return -int(-soli // 1)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression round-down-cents 1', (1983210, False), 20254),\n  ('regression round-down-cents 2', (3256603, False), 171788), ('partial repair guard 1', (1813009, False), 1),\n  ('partial repair guard 2', (3626001, False), 199430), ('control: at limit', (1813000, False), 0),\n  ('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),\n  ('control: joint glide', (3700000, True), 8806)],\n [('regression round-down-cents 1', (1891730, False), 9368), ('regression round-down-cents 2', (2031073, False), 25950),\n  ('partial repair guard 1', (1983210, False), 20254), ('partial repair guard 2', (1813001, False), 0),\n  ('control: joint glide', (3700000, True), 8806), ('control: joint below', (3000000, True), 0),\n  ('control: glide edge', (3300000, False), 176953), ('control: at limit', (1813000, False), 0)],\n [('regression round-down-cents 1', (2429991, False), 73421),\n  ('regression round-down-cents 2', (2042226, False), 27277), ('partial repair guard 1', (3626001, True), 0),\n  ('partial repair guard 2', (4499538, True), 103951), ('control: at limit', (1813000, False), 0),\n  ('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),\n  ('control: joint glide', (3700000, True), 8806)],\n [('regression round-down-cents 1', (2561678, False), 89092),\n  ('regression round-down-cents 2', (4398816, False), 241934), ('partial repair guard 1', (3835420, False), 210948),\n  ('partial repair guard 2', (3256603, False), 171788), ('control: joint glide', (3700000, True), 8806),\n  ('control: joint below', (3000000, True), 0), ('control: glide edge', (3300000, False), 176953),\n  ('control: at limit', (1813000, False), 0)],\n [('regression round-down-cents 1', (3091013, False), 152083),\n  ('regression round-down-cents 2', (5134546, True), 179516), ('partial repair guard 1', (3974588, False), 218602),\n  ('partial repair guard 2', (2115665, False), 36017), ('control: at limit', (1813000, False), 0),\n  ('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),\n  ('control: joint glide', (3700000, True), 8806)]]\nfor label, args, expected in cases[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":"849581421ed6f4fa772b8a5b8821e327927ab08dbf75d80c68db2436c38e4873","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(income_tax, joint):\n    thr = 1813000 * (2 if joint else 1)\n    if income_tax <= thr: return 0\n    soli = min(income_tax * Fraction(55, 1000), (income_tax - thr) * Fraction(119, 1000))\n    return int(soli + Fraction(1, 2))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression round-down-cents 1', (1983210, False), 20254),\n  ('regression round-down-cents 2', (3256603, False), 171788), ('partial repair guard 1', (1813009, False), 1),\n  ('partial repair guard 2', (3626001, False), 199430), ('control: at limit', (1813000, False), 0),\n  ('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),\n  ('control: joint glide', (3700000, True), 8806)],\n [('regression round-down-cents 1', (1891730, False), 9368), ('regression round-down-cents 2', (2031073, False), 25950),\n  ('partial repair guard 1', (1983210, False), 20254), ('partial repair guard 2', (1813001, False), 0),\n  ('control: joint glide', (3700000, True), 8806), ('control: joint below', (3000000, True), 0),\n  ('control: glide edge', (3300000, False), 176953), ('control: at limit', (1813000, False), 0)],\n [('regression round-down-cents 1', (2429991, False), 73421),\n  ('regression round-down-cents 2', (2042226, False), 27277), ('partial repair guard 1', (3626001, True), 0),\n  ('partial repair guard 2', (4499538, True), 103951), ('control: at limit', (1813000, False), 0),\n  ('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),\n  ('control: joint glide', (3700000, True), 8806)],\n [('regression round-down-cents 1', (2561678, False), 89092),\n  ('regression round-down-cents 2', (4398816, False), 241934), ('partial repair guard 1', (3835420, False), 210948),\n  ('partial repair guard 2', (3256603, False), 171788), ('control: joint glide', (3700000, True), 8806),\n  ('control: joint below', (3000000, True), 0), ('control: glide edge', (3300000, False), 176953),\n  ('control: at limit', (1813000, False), 0)],\n [('regression round-down-cents 1', (3091013, False), 152083),\n  ('regression round-down-cents 2', (5134546, True), 179516), ('partial repair guard 1', (3974588, False), 218602),\n  ('partial repair guard 2', (2115665, False), 36017), ('control: at limit', (1813000, False), 0),\n  ('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),\n  ('control: joint glide', (3700000, True), 8806)]]\nfor label, args, expected in cases[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"},"fixed":{"sha256":"5ec1e5c8c0f0320e09507fd04a07ccded288c10adb566e0d09dfdac17cb849b6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(income_tax, joint):\n    thr = 1813000 * (2 if joint else 1)\n    if income_tax <= thr: return 0\n    soli = min(income_tax * Fraction(55, 1000), (income_tax - thr) * Fraction(119, 1000))\n    return int(soli)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression round-down-cents 1', (1983210, False), 20254),\n  ('regression round-down-cents 2', (3256603, False), 171788), ('partial repair guard 1', (1813009, False), 1),\n  ('partial repair guard 2', (3626001, False), 199430), ('control: at limit', (1813000, False), 0),\n  ('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),\n  ('control: joint glide', (3700000, True), 8806)],\n [('regression round-down-cents 1', (1891730, False), 9368), ('regression round-down-cents 2', (2031073, False), 25950),\n  ('partial repair guard 1', (1983210, False), 20254), ('partial repair guard 2', (1813001, False), 0),\n  ('control: joint glide', (3700000, True), 8806), ('control: joint below', (3000000, True), 0),\n  ('control: glide edge', (3300000, False), 176953), ('control: at limit', (1813000, False), 0)],\n [('regression round-down-cents 1', (2429991, False), 73421),\n  ('regression round-down-cents 2', (2042226, False), 27277), ('partial repair guard 1', (3626001, True), 0),\n  ('partial repair guard 2', (4499538, True), 103951), ('control: at limit', (1813000, False), 0),\n  ('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),\n  ('control: joint glide', (3700000, True), 8806)],\n [('regression round-down-cents 1', (2561678, False), 89092),\n  ('regression round-down-cents 2', (4398816, False), 241934), ('partial repair guard 1', (3835420, False), 210948),\n  ('partial repair guard 2', (3256603, False), 171788), ('control: joint glide', (3700000, True), 8806),\n  ('control: joint below', (3000000, True), 0), ('control: glide edge', (3300000, False), 176953),\n  ('control: at limit', (1813000, False), 0)],\n [('regression round-down-cents 1', (3091013, False), 152083),\n  ('regression round-down-cents 2', (5134546, True), 179516), ('partial repair guard 1', (3974588, False), 218602),\n  ('partial repair guard 2', (2115665, False), 36017), ('control: at limit', (1813000, False), 0),\n  ('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),\n  ('control: joint glide', (3700000, True), 8806)]]\nfor label, args, expected in cases[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, bounded teaching model with a stipulated toy contract; it makes no claim of conformance to any real regulation, standard, or institution's rules. 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-tax_bracket_computation-surcharge-exemption-limit-glide-round-down-cents","generated_at":"2026-09-29T14:47:08.111949+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Tax computations hinge on which slice, threshold, ordering and rounding rule applies at each step; a misplaced boundary silently misstates liabilities.","repair":"Round the surcharge down to whole cents.","root_cause":"The exact surcharge is rounded half-up.","sha256":"bb362b668c7fd4c9f07e4073b5353c93050834ae027430cc55f0f130c04fdef0","title":"The surcharge is rounded to the nearest cent instead of down · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":48.393,"exit_code":1,"observations":[{"actual":20255,"check":"regression round-down-cents 1","expected":20254,"passed":false},{"actual":171789,"check":"regression round-down-cents 2","expected":171788,"passed":false},{"actual":2,"check":"partial repair guard 1","expected":1,"passed":false},{"actual":199431,"check":"partial repair guard 2","expected":199430,"passed":false},{"actual":0,"check":"control: at limit","expected":0,"passed":true},{"actual":10353,"check":"control: gliding zone","expected":10353,"passed":true},{"actual":275000,"check":"control: full rate","expected":275000,"passed":true},{"actual":8806,"check":"control: joint glide","expected":8806,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression round-down-cents 1\", \"actual\": 20255, \"expected\": 20254, \"passed\": false}, {\"check\": \"regression round-down-cents 2\", \"actual\": 171789, \"expected\": 171788, \"passed\": false}, {\"check\": \"partial repair guard 1\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 199431, \"expected\": 199430, \"passed\": false}, {\"check\": \"control: at limit\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: gliding zone\", \"actual\": 10353, \"expected\": 10353, \"passed\": true}, {\"check\": \"control: full rate\", \"actual\": 275000, \"expected\": 275000, \"passed\": true}, {\"check\": \"control: joint glide\", \"actual\": 8806, \"expected\": 8806, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.814,"exit_code":1,"observations":[{"actual":20255,"check":"regression round-down-cents 1","expected":20254,"passed":false},{"actual":171789,"check":"regression round-down-cents 2","expected":171788,"passed":false},{"actual":1,"check":"partial repair guard 1","expected":1,"passed":true},{"actual":199430,"check":"partial repair guard 2","expected":199430,"passed":true},{"actual":0,"check":"control: at limit","expected":0,"passed":true},{"actual":10353,"check":"control: gliding zone","expected":10353,"passed":true},{"actual":275000,"check":"control: full rate","expected":275000,"passed":true},{"actual":8806,"check":"control: joint glide","expected":8806,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression round-down-cents 1\", \"actual\": 20255, \"expected\": 20254, \"passed\": false}, {\"check\": \"regression round-down-cents 2\", \"actual\": 171789, \"expected\": 171788, \"passed\": false}, {\"check\": \"partial repair guard 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": 199430, \"expected\": 199430, \"passed\": true}, {\"check\": \"control: at limit\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: gliding zone\", \"actual\": 10353, \"expected\": 10353, \"passed\": true}, {\"check\": \"control: full rate\", \"actual\": 275000, \"expected\": 275000, \"passed\": true}, {\"check\": \"control: joint glide\", \"actual\": 8806, \"expected\": 8806, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.924,"exit_code":0,"observations":[{"actual":20254,"check":"regression round-down-cents 1","expected":20254,"passed":true},{"actual":171788,"check":"regression round-down-cents 2","expected":171788,"passed":true},{"actual":1,"check":"partial repair guard 1","expected":1,"passed":true},{"actual":199430,"check":"partial repair guard 2","expected":199430,"passed":true},{"actual":0,"check":"control: at limit","expected":0,"passed":true},{"actual":10353,"check":"control: gliding zone","expected":10353,"passed":true},{"actual":275000,"check":"control: full rate","expected":275000,"passed":true},{"actual":8806,"check":"control: joint glide","expected":8806,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression round-down-cents 1\", \"actual\": 20254, \"expected\": 20254, \"passed\": true}, {\"check\": \"regression round-down-cents 2\", \"actual\": 171788, \"expected\": 171788, \"passed\": true}, {\"check\": \"partial repair guard 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": 199430, \"expected\": 199430, \"passed\": true}, {\"check\": \"control: at limit\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: gliding zone\", \"actual\": 10353, \"expected\": 10353, \"passed\": true}, {\"check\": \"control: full rate\", \"actual\": 275000, \"expected\": 275000, \"passed\": true}, {\"check\": \"control: joint glide\", \"actual\": 8806, \"expected\": 8806, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}