{"abstract":"The allowance vanishes at 112570 instead of 125140.","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":"Rounding the half-reduction up instead of down removes one pound too many on odd excesses.","family":"w2-tax_bracket_computation-personal-allowance-taper-taper-ratio","id":"FA-62446","implementations":{"attempt":{"sha256":"1486a1cdbe4c53aa697015fd7aceae5efc7f0dac13564c81cdc2c59e03ecd51e","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-ratio 1', (110001, 0), 3343240), ('regression taper-ratio 2', (110000, 0), 3343200),\n  ('partial repair guard 2', (100003, 0), 2743360), ('control: basic and higher', (50000, 0), 748600),\n  ('control: pension restores allowance', (130000, 5000), 4243200), ('control: fully tapered', (200000, 0), 7620300),\n  ('control: allowance exhausted exactly', (125140, 0), 4251600)],\n [('regression taper-ratio 1', (130000, 5000), 4243200), ('regression taper-ratio 2', (100003, 0), 2743360),\n  ('partial repair guard 1', (112519, 0), 3494320), ('partial repair guard 2', (113902, 1), 3577240),\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)],\n [('regression taper-ratio 1', (112519, 0), 3494320), ('regression taper-ratio 2', (125142, 20000), 3051720),\n  ('partial repair guard 1', (125141, 5000), 3951640), ('partial repair guard 2', (100001, 0), 2743240),\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 taper-ratio 1', (100003, 1), 2743320), ('regression taper-ratio 2', (102064, 0), 2867040),\n  ('partial repair guard 1', (122175, 0), 4073680), ('partial repair guard 2', (120569, 0), 3977320),\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-ratio 1', (113902, 1), 3577240), ('regression taper-ratio 2', (105360, 0), 3064800),\n  ('partial repair guard 1', (114809, 5000), 3331720), ('partial repair guard 2', (106705, 5000), 2845480),\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":"a2e731cb6d79733608241017904ebc830c767aa5306d052de2ec5d9ea3f8a99a","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))\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-ratio 1', (110001, 0), 3343240), ('regression taper-ratio 2', (110000, 0), 3343200),\n  ('partial repair guard 2', (100003, 0), 2743360), ('control: basic and higher', (50000, 0), 748600),\n  ('control: pension restores allowance', (130000, 5000), 4243200), ('control: fully tapered', (200000, 0), 7620300),\n  ('control: allowance exhausted exactly', (125140, 0), 4251600)],\n [('regression taper-ratio 1', (130000, 5000), 4243200), ('regression taper-ratio 2', (100003, 0), 2743360),\n  ('partial repair guard 1', (112519, 0), 3494320), ('partial repair guard 2', (113902, 1), 3577240),\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)],\n [('regression taper-ratio 1', (112519, 0), 3494320), ('regression taper-ratio 2', (125142, 20000), 3051720),\n  ('partial repair guard 1', (125141, 5000), 3951640), ('partial repair guard 2', (100001, 0), 2743240),\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 taper-ratio 1', (100003, 1), 2743320), ('regression taper-ratio 2', (102064, 0), 2867040),\n  ('partial repair guard 1', (122175, 0), 4073680), ('partial repair guard 2', (120569, 0), 3977320),\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-ratio 1', (113902, 1), 3577240), ('regression taper-ratio 2', (105360, 0), 3064800),\n  ('partial repair guard 1', (114809, 5000), 3331720), ('partial repair guard 2', (106705, 5000), 2845480),\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-ratio","generated_at":"2026-09-29T14:47:04.651629+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 reduction is the full excess over 100000 rather than half of it.","sha256":"06b3f0000ed19683e021e3ef86eebd5ac5bca82400a2c6376509e55bbde37046","title":"The allowance is reduced pound for pound above the taper threshold · 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":38.743,"exit_code":1,"observations":[{"actual":3343280,"check":"regression taper-ratio 1","expected":3343240,"passed":false},{"actual":3343200,"check":"regression taper-ratio 2","expected":3343200,"passed":true},{"actual":2743400,"check":"partial repair guard 2","expected":2743360,"passed":false},{"actual":748600,"check":"control: basic and higher","expected":748600,"passed":true},{"actual":4243200,"check":"control: pension restores allowance","expected":4243200,"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-ratio 1\", \"actual\": 3343280, \"expected\": 3343240, \"passed\": false}, {\"check\": \"regression taper-ratio 2\", \"actual\": 3343200, \"expected\": 3343200, \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": 2743400, \"expected\": 2743360, \"passed\": false}, {\"check\": \"control: basic and higher\", \"actual\": 748600, \"expected\": 748600, \"passed\": true}, {\"check\": \"control: pension restores allowance\", \"actual\": 4243200, \"expected\": 4243200, \"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.583,"exit_code":1,"observations":[{"actual":3543280,"check":"regression taper-ratio 1","expected":3343240,"passed":false},{"actual":3543200,"check":"regression taper-ratio 2","expected":3343200,"passed":false},{"actual":2743440,"check":"partial repair guard 2","expected":2743360,"passed":false},{"actual":748600,"check":"control: basic and higher","expected":748600,"passed":true},{"actual":4246000,"check":"control: pension restores allowance","expected":4243200,"passed":false},{"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-ratio 1\", \"actual\": 3543280, \"expected\": 3343240, \"passed\": false}, {\"check\": \"regression taper-ratio 2\", \"actual\": 3543200, \"expected\": 3343200, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 2743440, \"expected\": 2743360, \"passed\": false}, {\"check\": \"control: basic and higher\", \"actual\": 748600, \"expected\": 748600, \"passed\": true}, {\"check\": \"control: pension restores allowance\", \"actual\": 4246000, \"expected\": 4243200, \"passed\": false}, {\"check\": \"control: fully tapered\", \"actual\": 7620300, \"expected\": 7620300, \"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."}}