{"abstract":"Very high earners are taxed on more than their income.","category":"Tax bracket computation","checks":7,"contract":"solve(income, pension): stipulated allowance taper in whole pounds. Adjusted net income ani = income - pension. The personal allowance 12570 is reduced by 1 for every 2 whole pounds of ani above 100000 (floor of half the excess), never below 0. Taxable = max(0, ani - allowance). Taxable income is taxed 20% up to 37700, 40% from 37700 to 125140, 45% above 125140. Return tax in integer pence.","contract_signature":"income, pension","evaluation_group":"w2-tax_bracket_computation-personal-allowance-taper","failed_approach":"Zeroing the allowance only above 150000 still leaves negative allowances between 125142 and 150000.","family":"w2-tax_bracket_computation-personal-allowance-taper-allowance-floor","id":"FA-62451","implementations":{"attempt":{"sha256":"0607bf8033ee2937eb54fd891840035d81c25ba96ca79e96aeba635078490217","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(income, pension):\n    ani = income - pension\n    allow = 12570\n    if ani > 100000: allow = 0 if ani >= 150000 else allow - (ani - 100000) // 2\n    taxable = max(0, ani - allow)\n    basic = min(taxable, 37700)\n    higher = max(0, min(taxable, 125140) - 37700)\n    additional = max(0, taxable - 125140)\n    return basic * 20 + higher * 40 + additional * 45\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression allowance-floor 1', (140000, 0), 4920300), ('regression allowance-floor 2', (200000, 0), 7620300),\n  ('partial repair guard 2', (125143, 0), 4251735), ('control: basic and higher', (50000, 0), 748600),\n  ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: pension restores allowance', (130000, 5000), 4243200),\n  ('control: allowance exhausted exactly', (125140, 0), 4251600)],\n [('regression allowance-floor 1', (125143, 0), 4251735), ('regression allowance-floor 2', (125142, 0), 4251690),\n  ('partial repair guard 2', (195853, 51587), 5112270), ('control: fully tapered', (200000, 0), 7620300),\n  ('control: allowance exhausted exactly', (125140, 0), 4251600), ('control: below allowance', (9000, 0), 0),\n  ('control: large pension', (160000, 60000), 2743200)],\n [('regression allowance-floor 1', (286985, 0), 11534625), ('regression allowance-floor 2', (196467, 5000), 7236315),\n  ('partial repair guard 1', (127056, 1), 4337775), ('partial repair guard 2', (129722, 1), 4457745),\n  ('control: below allowance', (9000, 0), 0), ('control: large pension', (160000, 60000), 2743200),\n  ('control: mid taper', (140000, 0), 4920300), ('control: basic and higher', (50000, 0), 748600)],\n [('regression allowance-floor 1', (233138, 36810), 7455060),\n  ('regression allowance-floor 2', (260916, 5000), 10136520), ('partial repair guard 1', (128692, 0), 4411440),\n  ('partial repair guard 2', (145918, 8578), 4800600), ('control: basic and higher', (50000, 0), 748600),\n  ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: pension restores allowance', (130000, 5000), 4243200), ('control: fully tapered', (200000, 0), 7620300)],\n [('regression allowance-floor 1', (291558, 0), 11740410), ('regression allowance-floor 2', (220311, 12207), 7984980),\n  ('partial repair guard 1', (127233, 1), 4345740), ('partial repair guard 2', (151401, 22890), 4403295),\n  ('control: fully tapered', (200000, 0), 7620300), ('control: allowance exhausted exactly', (125140, 0), 4251600),\n  ('control: just beyond exhaustion', (125143, 0), 4251735), ('control: below allowance', (9000, 0), 0)]]\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":"24ecf27e54759d48c738e67764743e78605b24e2fd349555e7affbc4a13891a0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(income, pension):\n    ani = income - pension\n    allow = 12570\n    if ani > 100000: allow = allow - (ani - 100000) // 2\n    taxable = max(0, ani - allow)\n    basic = min(taxable, 37700)\n    higher = max(0, min(taxable, 125140) - 37700)\n    additional = max(0, taxable - 125140)\n    return basic * 20 + higher * 40 + additional * 45\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression allowance-floor 1', (140000, 0), 4920300), ('regression allowance-floor 2', (200000, 0), 7620300),\n  ('partial repair guard 2', (125143, 0), 4251735), ('control: basic and higher', (50000, 0), 748600),\n  ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: pension restores allowance', (130000, 5000), 4243200),\n  ('control: allowance exhausted exactly', (125140, 0), 4251600)],\n [('regression allowance-floor 1', (125143, 0), 4251735), ('regression allowance-floor 2', (125142, 0), 4251690),\n  ('partial repair guard 2', (195853, 51587), 5112270), ('control: fully tapered', (200000, 0), 7620300),\n  ('control: allowance exhausted exactly', (125140, 0), 4251600), ('control: below allowance', (9000, 0), 0),\n  ('control: large pension', (160000, 60000), 2743200)],\n [('regression allowance-floor 1', (286985, 0), 11534625), ('regression allowance-floor 2', (196467, 5000), 7236315),\n  ('partial repair guard 1', (127056, 1), 4337775), ('partial repair guard 2', (129722, 1), 4457745),\n  ('control: below allowance', (9000, 0), 0), ('control: large pension', (160000, 60000), 2743200),\n  ('control: mid taper', (140000, 0), 4920300), ('control: basic and higher', (50000, 0), 748600)],\n [('regression allowance-floor 1', (233138, 36810), 7455060),\n  ('regression allowance-floor 2', (260916, 5000), 10136520), ('partial repair guard 1', (128692, 0), 4411440),\n  ('partial repair guard 2', (145918, 8578), 4800600), ('control: basic and higher', (50000, 0), 748600),\n  ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: pension restores allowance', (130000, 5000), 4243200), ('control: fully tapered', (200000, 0), 7620300)],\n [('regression allowance-floor 1', (291558, 0), 11740410), ('regression allowance-floor 2', (220311, 12207), 7984980),\n  ('partial repair guard 1', (127233, 1), 4345740), ('partial repair guard 2', (151401, 22890), 4403295),\n  ('control: fully tapered', (200000, 0), 7620300), ('control: allowance exhausted exactly', (125140, 0), 4251600),\n  ('control: just beyond exhaustion', (125143, 0), 4251735), ('control: below allowance', (9000, 0), 0)]]\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-personal-allowance-taper-allowance-floor","generated_at":"2026-09-29T14:47:04.677757+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.","root_cause":"The tapered allowance is not floored at zero.","sha256":"883997beb335783dc92f14e261f90909da36140daa59264a3937cb1686a378a8","title":"A tapered allowance is allowed to go negative · 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":37.932,"exit_code":1,"observations":[{"actual":5254650,"check":"regression allowance-floor 1","expected":4920300,"passed":false},{"actual":7620300,"check":"regression allowance-floor 2","expected":7620300,"passed":true},{"actual":4251780,"check":"partial repair guard 2","expected":4251735,"passed":false},{"actual":748600,"check":"control: basic and higher","expected":748600,"passed":true},{"actual":3343240,"check":"control: odd excess in taper","expected":3343240,"passed":true},{"actual":4243200,"check":"control: pension restores allowance","expected":4243200,"passed":true},{"actual":4251600,"check":"control: allowance exhausted exactly","expected":4251600,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression allowance-floor 1\", \"actual\": 5254650, \"expected\": 4920300, \"passed\": false}, {\"check\": \"regression allowance-floor 2\", \"actual\": 7620300, \"expected\": 7620300, \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": 4251780, \"expected\": 4251735, \"passed\": false}, {\"check\": \"control: basic and higher\", \"actual\": 748600, \"expected\": 748600, \"passed\": true}, {\"check\": \"control: odd excess in taper\", \"actual\": 3343240, \"expected\": 3343240, \"passed\": true}, {\"check\": \"control: pension restores allowance\", \"actual\": 4243200, \"expected\": 4243200, \"passed\": true}, {\"check\": \"control: allowance exhausted exactly\", \"actual\": 4251600, \"expected\": 4251600, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.626,"exit_code":1,"observations":[{"actual":5254650,"check":"regression allowance-floor 1","expected":4920300,"passed":false},{"actual":9304650,"check":"regression allowance-floor 2","expected":7620300,"passed":false},{"actual":4251780,"check":"partial repair guard 2","expected":4251735,"passed":false},{"actual":748600,"check":"control: basic and higher","expected":748600,"passed":true},{"actual":3343240,"check":"control: odd excess in taper","expected":3343240,"passed":true},{"actual":4243200,"check":"control: pension restores allowance","expected":4243200,"passed":true},{"actual":4251600,"check":"control: allowance exhausted exactly","expected":4251600,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression allowance-floor 1\", \"actual\": 5254650, \"expected\": 4920300, \"passed\": false}, {\"check\": \"regression allowance-floor 2\", \"actual\": 9304650, \"expected\": 7620300, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 4251780, \"expected\": 4251735, \"passed\": false}, {\"check\": \"control: basic and higher\", \"actual\": 748600, \"expected\": 748600, \"passed\": true}, {\"check\": \"control: odd excess in taper\", \"actual\": 3343240, \"expected\": 3343240, \"passed\": true}, {\"check\": \"control: pension restores allowance\", \"actual\": 4243200, \"expected\": 4243200, \"passed\": true}, {\"check\": \"control: allowance exhausted exactly\", \"actual\": 4251600, \"expected\": 4251600, \"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."}}