{"abstract":"Pension contributions no longer restore the personal allowance.","category":"Tax bracket computation","checks":6,"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.","evaluation_group":"w2-tax_bracket_computation-personal-allowance-taper","failed_approach":"Tapering on ani but taxing income before the pension deduction overstates taxable income.","family":"w2-tax_bracket_computation-personal-allowance-taper-taper-measure","id":"FA-62456","implementations":{"attempt":{"sha256":"a2c9ffbc3b2a15a3d183666815a78ed3e6b802c0b218c40ff39aad48cf8c6ca3","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 = max(0, allow - (ani - 100000) // 2)\n    taxable = max(0, income - 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 taper-measure 1', (130000, 5000), 4243200), ('regression taper-measure 2', (160000, 60000), 2743200),\n  ('control: basic and higher', (50000, 0), 748600), ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: fully tapered', (200000, 0), 7620300), ('control: allowance exhausted exactly', (125140, 0), 4251600)],\n [('regression taper-measure 1', (125142, 20000), 3051720), ('regression taper-measure 2', (100003, 5000), 2543320),\n  ('partial repair guard 1', (100001, 5000), 2543240), ('control: fully tapered', (200000, 0), 7620300),\n  ('control: allowance exhausted exactly', (125140, 0), 4251600),\n  ('control: just beyond exhaustion', (125143, 0), 4251735), ('control: below allowance', (9000, 0), 0)],\n [('regression taper-measure 1', (103415, 5000), 2679800), ('regression taper-measure 2', (125142, 31576), 2485840),\n  ('partial repair guard 1', (100003, 5000), 2543320), ('control: below allowance', (9000, 0), 0),\n  ('control: large pension', (160000, 60000), 2743200), ('control: mid taper', (140000, 0), 4920300),\n  ('control: basic and higher', (50000, 0), 748600)],\n [('regression taper-measure 1', (113902, 1), 3577240), ('regression taper-measure 2', (125141, 5000), 3951640),\n  ('partial repair guard 1', (125142, 1), 4251645), ('partial repair guard 2', (125141, 1), 4251600),\n  ('control: basic and higher', (50000, 0), 748600), ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: pension restores allowance', (130000, 5000), 4243200), ('control: fully tapered', (200000, 0), 7620300)],\n [('regression taper-measure 1', (100003, 7786), 2431880), ('regression taper-measure 2', (105804, 5000), 2791440),\n  ('partial repair guard 1', (125142, 31576), 2485840), ('partial repair guard 2', (100003, 1), 2743320),\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":"a0ca0e60779121ea82932ed630dd26b95639718ae9f072b98ec1fcde10dcf7c6","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 income > 100000: allow = max(0, allow - (income - 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 taper-measure 1', (130000, 5000), 4243200), ('regression taper-measure 2', (160000, 60000), 2743200),\n  ('control: basic and higher', (50000, 0), 748600), ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: fully tapered', (200000, 0), 7620300), ('control: allowance exhausted exactly', (125140, 0), 4251600)],\n [('regression taper-measure 1', (125142, 20000), 3051720), ('regression taper-measure 2', (100003, 5000), 2543320),\n  ('partial repair guard 1', (100001, 5000), 2543240), ('control: fully tapered', (200000, 0), 7620300),\n  ('control: allowance exhausted exactly', (125140, 0), 4251600),\n  ('control: just beyond exhaustion', (125143, 0), 4251735), ('control: below allowance', (9000, 0), 0)],\n [('regression taper-measure 1', (103415, 5000), 2679800), ('regression taper-measure 2', (125142, 31576), 2485840),\n  ('partial repair guard 1', (100003, 5000), 2543320), ('control: below allowance', (9000, 0), 0),\n  ('control: large pension', (160000, 60000), 2743200), ('control: mid taper', (140000, 0), 4920300),\n  ('control: basic and higher', (50000, 0), 748600)],\n [('regression taper-measure 1', (113902, 1), 3577240), ('regression taper-measure 2', (125141, 5000), 3951640),\n  ('partial repair guard 1', (125142, 1), 4251645), ('partial repair guard 2', (125141, 1), 4251600),\n  ('control: basic and higher', (50000, 0), 748600), ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: pension restores allowance', (130000, 5000), 4243200), ('control: fully tapered', (200000, 0), 7620300)],\n [('regression taper-measure 1', (100003, 7786), 2431880), ('regression taper-measure 2', (105804, 5000), 2791440),\n  ('partial repair guard 1', (125142, 31576), 2485840), ('partial repair guard 2', (100003, 1), 2743320),\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"},"fixed":{"sha256":"ceb28b0aa1965f176d42afbdb3edcb470522323572920766209cb9e42ffdca88","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 = max(0, 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 taper-measure 1', (130000, 5000), 4243200), ('regression taper-measure 2', (160000, 60000), 2743200),\n  ('control: basic and higher', (50000, 0), 748600), ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: fully tapered', (200000, 0), 7620300), ('control: allowance exhausted exactly', (125140, 0), 4251600)],\n [('regression taper-measure 1', (125142, 20000), 3051720), ('regression taper-measure 2', (100003, 5000), 2543320),\n  ('partial repair guard 1', (100001, 5000), 2543240), ('control: fully tapered', (200000, 0), 7620300),\n  ('control: allowance exhausted exactly', (125140, 0), 4251600),\n  ('control: just beyond exhaustion', (125143, 0), 4251735), ('control: below allowance', (9000, 0), 0)],\n [('regression taper-measure 1', (103415, 5000), 2679800), ('regression taper-measure 2', (125142, 31576), 2485840),\n  ('partial repair guard 1', (100003, 5000), 2543320), ('control: below allowance', (9000, 0), 0),\n  ('control: large pension', (160000, 60000), 2743200), ('control: mid taper', (140000, 0), 4920300),\n  ('control: basic and higher', (50000, 0), 748600)],\n [('regression taper-measure 1', (113902, 1), 3577240), ('regression taper-measure 2', (125141, 5000), 3951640),\n  ('partial repair guard 1', (125142, 1), 4251645), ('partial repair guard 2', (125141, 1), 4251600),\n  ('control: basic and higher', (50000, 0), 748600), ('control: odd excess in taper', (110001, 0), 3343240),\n  ('control: pension restores allowance', (130000, 5000), 4243200), ('control: fully tapered', (200000, 0), 7620300)],\n [('regression taper-measure 1', (100003, 7786), 2431880), ('regression taper-measure 2', (105804, 5000), 2791440),\n  ('partial repair guard 1', (125142, 31576), 2485840), ('partial repair guard 2', (100003, 1), 2743320),\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-taper-measure","generated_at":"2026-09-29T14:47:04.757553+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":"Measure the taper on adjusted net income.","root_cause":"The reduction uses income - 100000 instead of ani - 100000.","sha256":"e1f79ff76803ed420cef0f6df57fcf03aa7a0519d40724a124e3bd429ebb6a2b","title":"The taper is measured on gross income instead of adjusted net income · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.782,"exit_code":1,"observations":[{"actual":4467150,"check":"regression taper-measure 1","expected":4243200,"passed":false},{"actual":5254650,"check":"regression taper-measure 2","expected":2743200,"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":7620300,"check":"control: fully tapered","expected":7620300,"passed":true},{"actual":4251600,"check":"control: allowance exhausted exactly","expected":4251600,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression taper-measure 1\", \"actual\": 4467150, \"expected\": 4243200, \"passed\": false}, {\"check\": \"regression taper-measure 2\", \"actual\": 5254650, \"expected\": 2743200, \"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: fully tapered\", \"actual\": 7620300, \"expected\": 7620300, \"passed\": true}, {\"check\": \"control: allowance exhausted exactly\", \"actual\": 4251600, \"expected\": 4251600, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.545,"exit_code":1,"observations":[{"actual":4246000,"check":"regression taper-measure 1","expected":4243200,"passed":false},{"actual":3246000,"check":"regression taper-measure 2","expected":2743200,"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":7620300,"check":"control: fully tapered","expected":7620300,"passed":true},{"actual":4251600,"check":"control: allowance exhausted exactly","expected":4251600,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression taper-measure 1\", \"actual\": 4246000, \"expected\": 4243200, \"passed\": false}, {\"check\": \"regression taper-measure 2\", \"actual\": 3246000, \"expected\": 2743200, \"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: fully tapered\", \"actual\": 7620300, \"expected\": 7620300, \"passed\": true}, {\"check\": \"control: allowance exhausted exactly\", \"actual\": 4251600, \"expected\": 4251600, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.015,"exit_code":0,"observations":[{"actual":4243200,"check":"regression taper-measure 1","expected":4243200,"passed":true},{"actual":2743200,"check":"regression taper-measure 2","expected":2743200,"passed":true},{"actual":748600,"check":"control: basic and higher","expected":748600,"passed":true},{"actual":3343240,"check":"control: odd excess in taper","expected":3343240,"passed":true},{"actual":7620300,"check":"control: fully tapered","expected":7620300,"passed":true},{"actual":4251600,"check":"control: allowance exhausted exactly","expected":4251600,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression taper-measure 1\", \"actual\": 4243200, \"expected\": 4243200, \"passed\": true}, {\"check\": \"regression taper-measure 2\", \"actual\": 2743200, \"expected\": 2743200, \"passed\": true}, {\"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: fully tapered\", \"actual\": 7620300, \"expected\": 7620300, \"passed\": true}, {\"check\": \"control: allowance exhausted exactly\", \"actual\": 4251600, \"expected\": 4251600, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}