{"abstract":"High-income retirees include more than 85% of their benefits.","category":"Tax bracket computation","checks":6,"contract":"solve(agi, exempt_interest, benefits, status): stipulated benefit inclusion. Provisional income PI = agi + exempt_interest + benefits/2. Base amounts (b1, b2): single (25000, 34000), mfj (32000, 44000), mfs (0, 0). If PI <= b1 nothing is included; if PI <= b2, include min(benefits/2, (PI - b1)/2); otherwise include min(0.85*benefits, 0.85*(PI - b2) + min(benefits/2, (b2 - b1)/2)). Return the included amount rounded down to whole dollars.","evaluation_group":"w2-tax_bracket_computation-benefit-inclusion-tiers","failed_approach":"Capping at 50% of benefits confuses the first-tier cap with the overall cap.","family":"w2-tax_bracket_computation-benefit-inclusion-tiers-eighty-five-cap","id":"FA-62756","implementations":{"attempt":{"sha256":"6e1af3d6bd6a72b93f2ed33253cb541117ed2c3628d3b436e50190577730eb9f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(agi, exempt_interest, benefits, status):\n    b1, b2 = {'single': (25000, 34000), 'mfj': (32000, 44000), 'mfs': (0, 0)}[status]\n    B = Fraction(benefits)\n    pi = agi + exempt_interest + B / 2\n    if pi <= b1: t = Fraction(0)\n    elif pi <= b2: t = min(B / 2, (pi - b1) / 2)\n    else: t = min(B / 2, (pi - b2) * 85 / 100 + min(B / 2, Fraction(b2 - b1, 2)))\n    return int(t)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression eighty-five-cap 1', (150000, 5000, 40000, 'mfj'), 34000),\n  ('regression eighty-five-cap 2', (5000, 0, 8000, 'mfs'), 6800),\n  ('control: first tier', (20000, 0, 12000, 'single'), 500),\n  ('control: second tier', (40000, 0, 20000, 'single'), 17000), ('control: below base', (10000, 0, 10000, 'single'), 0),\n  ('control: joint with exempt interest', (30000, 1000, 20000, 'mfj'), 4500)],\n [('regression eighty-five-cap 1', (40000, 0, 20000, 'single'), 17000),\n  ('regression eighty-five-cap 2', (90000, 0, 20000, 'single'), 17000),\n  ('control: joint with exempt interest', (30000, 1000, 20000, 'mfj'), 4500),\n  ('control: separate filer', (5000, 0, 8000, 'mfs'), 6800),\n  ('control: small benefit first tier', (28000, 0, 2000, 'single'), 1000),\n  ('control: large income', (150000, 5000, 40000, 'mfj'), 34000)],\n [('regression eighty-five-cap 1', (10000, 0, 2000, 'mfs'), 1700),\n  ('regression eighty-five-cap 2', (16953, 1000, 8000, 'mfs'), 6800),\n  ('control: large income', (150000, 5000, 40000, 'mfj'), 34000),\n  ('control: first tier', (20000, 0, 12000, 'single'), 500),\n  ('control: second tier', (40000, 0, 20000, 'single'), 17000),\n  ('control: below base', (10000, 0, 10000, 'single'), 0)],\n [('regression eighty-five-cap 1', (90000, 0, 20000, 'mfj'), 17000),\n  ('regression eighty-five-cap 2', (90000, 1000, 20000, 'mfs'), 17000),\n  ('partial repair guard 1', (45000, 0, 30934, 'mfj'), 19996),\n  ('partial repair guard 2', (30000, 1000, 8000, 'single'), 4850),\n  ('control: below base', (10000, 0, 10000, 'single'), 0),\n  ('control: joint with exempt interest', (30000, 1000, 20000, 'mfj'), 4500),\n  ('control: separate filer', (5000, 0, 8000, 'mfs'), 6800),\n  ('control: small benefit first tier', (28000, 0, 2000, 'single'), 1000)],\n [('regression eighty-five-cap 1', (30000, 0, 20000, 'mfs'), 17000),\n  ('regression eighty-five-cap 2', (57417, 0, 20000, 'mfs'), 17000),\n  ('partial repair guard 1', (90000, 0, 20000, 'mfj'), 17000),\n  ('partial repair guard 2', (90000, 1000, 20000, 'mfs'), 17000),\n  ('control: small benefit first tier', (28000, 0, 2000, 'single'), 1000),\n  ('control: large income', (150000, 5000, 40000, 'mfj'), 34000),\n  ('control: first tier', (20000, 0, 12000, 'single'), 500),\n  ('control: second tier', (40000, 0, 20000, 'single'), 17000)]]\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":"979ca3f1c04765636690cd564f08e688c136470339e42954623b09ab889a0e47","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(agi, exempt_interest, benefits, status):\n    b1, b2 = {'single': (25000, 34000), 'mfj': (32000, 44000), 'mfs': (0, 0)}[status]\n    B = Fraction(benefits)\n    pi = agi + exempt_interest + B / 2\n    if pi <= b1: t = Fraction(0)\n    elif pi <= b2: t = min(B / 2, (pi - b1) / 2)\n    else: t = min(B * 10, (pi - b2) * 85 / 100 + min(B / 2, Fraction(b2 - b1, 2)))\n    return int(t)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression eighty-five-cap 1', (150000, 5000, 40000, 'mfj'), 34000),\n  ('regression eighty-five-cap 2', (5000, 0, 8000, 'mfs'), 6800),\n  ('control: first tier', (20000, 0, 12000, 'single'), 500),\n  ('control: second tier', (40000, 0, 20000, 'single'), 17000), ('control: below base', (10000, 0, 10000, 'single'), 0),\n  ('control: joint with exempt interest', (30000, 1000, 20000, 'mfj'), 4500)],\n [('regression eighty-five-cap 1', (40000, 0, 20000, 'single'), 17000),\n  ('regression eighty-five-cap 2', (90000, 0, 20000, 'single'), 17000),\n  ('control: joint with exempt interest', (30000, 1000, 20000, 'mfj'), 4500),\n  ('control: separate filer', (5000, 0, 8000, 'mfs'), 6800),\n  ('control: small benefit first tier', (28000, 0, 2000, 'single'), 1000),\n  ('control: large income', (150000, 5000, 40000, 'mfj'), 34000)],\n [('regression eighty-five-cap 1', (10000, 0, 2000, 'mfs'), 1700),\n  ('regression eighty-five-cap 2', (16953, 1000, 8000, 'mfs'), 6800),\n  ('control: large income', (150000, 5000, 40000, 'mfj'), 34000),\n  ('control: first tier', (20000, 0, 12000, 'single'), 500),\n  ('control: second tier', (40000, 0, 20000, 'single'), 17000),\n  ('control: below base', (10000, 0, 10000, 'single'), 0)],\n [('regression eighty-five-cap 1', (90000, 0, 20000, 'mfj'), 17000),\n  ('regression eighty-five-cap 2', (90000, 1000, 20000, 'mfs'), 17000),\n  ('partial repair guard 1', (45000, 0, 30934, 'mfj'), 19996),\n  ('partial repair guard 2', (30000, 1000, 8000, 'single'), 4850),\n  ('control: below base', (10000, 0, 10000, 'single'), 0),\n  ('control: joint with exempt interest', (30000, 1000, 20000, 'mfj'), 4500),\n  ('control: separate filer', (5000, 0, 8000, 'mfs'), 6800),\n  ('control: small benefit first tier', (28000, 0, 2000, 'single'), 1000)],\n [('regression eighty-five-cap 1', (30000, 0, 20000, 'mfs'), 17000),\n  ('regression eighty-five-cap 2', (57417, 0, 20000, 'mfs'), 17000),\n  ('partial repair guard 1', (90000, 0, 20000, 'mfj'), 17000),\n  ('partial repair guard 2', (90000, 1000, 20000, 'mfs'), 17000),\n  ('control: small benefit first tier', (28000, 0, 2000, 'single'), 1000),\n  ('control: large income', (150000, 5000, 40000, 'mfj'), 34000),\n  ('control: first tier', (20000, 0, 12000, 'single'), 500),\n  ('control: second tier', (40000, 0, 20000, 'single'), 17000)]]\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":"08773da4808d40d787ddab91deaa9c09523d4b3f9d9f1ec6b426cd27cb0d9602","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(agi, exempt_interest, benefits, status):\n    b1, b2 = {'single': (25000, 34000), 'mfj': (32000, 44000), 'mfs': (0, 0)}[status]\n    B = Fraction(benefits)\n    pi = agi + exempt_interest + B / 2\n    if pi <= b1: t = Fraction(0)\n    elif pi <= b2: t = min(B / 2, (pi - b1) / 2)\n    else: t = min(B * 85 / 100, (pi - b2) * 85 / 100 + min(B / 2, Fraction(b2 - b1, 2)))\n    return int(t)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression eighty-five-cap 1', (150000, 5000, 40000, 'mfj'), 34000),\n  ('regression eighty-five-cap 2', (5000, 0, 8000, 'mfs'), 6800),\n  ('control: first tier', (20000, 0, 12000, 'single'), 500),\n  ('control: second tier', (40000, 0, 20000, 'single'), 17000), ('control: below base', (10000, 0, 10000, 'single'), 0),\n  ('control: joint with exempt interest', (30000, 1000, 20000, 'mfj'), 4500)],\n [('regression eighty-five-cap 1', (40000, 0, 20000, 'single'), 17000),\n  ('regression eighty-five-cap 2', (90000, 0, 20000, 'single'), 17000),\n  ('control: joint with exempt interest', (30000, 1000, 20000, 'mfj'), 4500),\n  ('control: separate filer', (5000, 0, 8000, 'mfs'), 6800),\n  ('control: small benefit first tier', (28000, 0, 2000, 'single'), 1000),\n  ('control: large income', (150000, 5000, 40000, 'mfj'), 34000)],\n [('regression eighty-five-cap 1', (10000, 0, 2000, 'mfs'), 1700),\n  ('regression eighty-five-cap 2', (16953, 1000, 8000, 'mfs'), 6800),\n  ('control: large income', (150000, 5000, 40000, 'mfj'), 34000),\n  ('control: first tier', (20000, 0, 12000, 'single'), 500),\n  ('control: second tier', (40000, 0, 20000, 'single'), 17000),\n  ('control: below base', (10000, 0, 10000, 'single'), 0)],\n [('regression eighty-five-cap 1', (90000, 0, 20000, 'mfj'), 17000),\n  ('regression eighty-five-cap 2', (90000, 1000, 20000, 'mfs'), 17000),\n  ('partial repair guard 1', (45000, 0, 30934, 'mfj'), 19996),\n  ('partial repair guard 2', (30000, 1000, 8000, 'single'), 4850),\n  ('control: below base', (10000, 0, 10000, 'single'), 0),\n  ('control: joint with exempt interest', (30000, 1000, 20000, 'mfj'), 4500),\n  ('control: separate filer', (5000, 0, 8000, 'mfs'), 6800),\n  ('control: small benefit first tier', (28000, 0, 2000, 'single'), 1000)],\n [('regression eighty-five-cap 1', (30000, 0, 20000, 'mfs'), 17000),\n  ('regression eighty-five-cap 2', (57417, 0, 20000, 'mfs'), 17000),\n  ('partial repair guard 1', (90000, 0, 20000, 'mfj'), 17000),\n  ('partial repair guard 2', (90000, 1000, 20000, 'mfs'), 17000),\n  ('control: small benefit first tier', (28000, 0, 2000, 'single'), 1000),\n  ('control: large income', (150000, 5000, 40000, 'mfj'), 34000),\n  ('control: first tier', (20000, 0, 12000, 'single'), 500),\n  ('control: second tier', (40000, 0, 20000, 'single'), 17000)]]\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-benefit-inclusion-tiers-eighty-five-cap","generated_at":"2026-09-29T14:47:07.635413+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":"Cap the included amount at 85% of benefits.","root_cause":"The upper tier omits min(0.85*benefits, ...).","sha256":"12130c9a50d3bece1c8e220b6f82808c098d8658a1c7d8b4db6d39bcb6f5f11d","title":"Included benefits are not capped at 85% of benefits · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.043,"exit_code":1,"observations":[{"actual":20000,"check":"regression eighty-five-cap 1","expected":34000,"passed":false},{"actual":4000,"check":"regression eighty-five-cap 2","expected":6800,"passed":false},{"actual":500,"check":"control: first tier","expected":500,"passed":true},{"actual":10000,"check":"control: second tier","expected":17000,"passed":false},{"actual":0,"check":"control: below base","expected":0,"passed":true},{"actual":4500,"check":"control: joint with exempt interest","expected":4500,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression eighty-five-cap 1\", \"actual\": 20000, \"expected\": 34000, \"passed\": false}, {\"check\": \"regression eighty-five-cap 2\", \"actual\": 4000, \"expected\": 6800, \"passed\": false}, {\"check\": \"control: first tier\", \"actual\": 500, \"expected\": 500, \"passed\": true}, {\"check\": \"control: second tier\", \"actual\": 10000, \"expected\": 17000, \"passed\": false}, {\"check\": \"control: below base\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: joint with exempt interest\", \"actual\": 4500, \"expected\": 4500, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.491,"exit_code":1,"observations":[{"actual":117350,"check":"regression eighty-five-cap 1","expected":34000,"passed":false},{"actual":7650,"check":"regression eighty-five-cap 2","expected":6800,"passed":false},{"actual":500,"check":"control: first tier","expected":500,"passed":true},{"actual":18100,"check":"control: second tier","expected":17000,"passed":false},{"actual":0,"check":"control: below base","expected":0,"passed":true},{"actual":4500,"check":"control: joint with exempt interest","expected":4500,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression eighty-five-cap 1\", \"actual\": 117350, \"expected\": 34000, \"passed\": false}, {\"check\": \"regression eighty-five-cap 2\", \"actual\": 7650, \"expected\": 6800, \"passed\": false}, {\"check\": \"control: first tier\", \"actual\": 500, \"expected\": 500, \"passed\": true}, {\"check\": \"control: second tier\", \"actual\": 18100, \"expected\": 17000, \"passed\": false}, {\"check\": \"control: below base\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: joint with exempt interest\", \"actual\": 4500, \"expected\": 4500, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.681,"exit_code":0,"observations":[{"actual":34000,"check":"regression eighty-five-cap 1","expected":34000,"passed":true},{"actual":6800,"check":"regression eighty-five-cap 2","expected":6800,"passed":true},{"actual":500,"check":"control: first tier","expected":500,"passed":true},{"actual":17000,"check":"control: second tier","expected":17000,"passed":true},{"actual":0,"check":"control: below base","expected":0,"passed":true},{"actual":4500,"check":"control: joint with exempt interest","expected":4500,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression eighty-five-cap 1\", \"actual\": 34000, \"expected\": 34000, \"passed\": true}, {\"check\": \"regression eighty-five-cap 2\", \"actual\": 6800, \"expected\": 6800, \"passed\": true}, {\"check\": \"control: first tier\", \"actual\": 500, \"expected\": 500, \"passed\": true}, {\"check\": \"control: second tier\", \"actual\": 17000, \"expected\": 17000, \"passed\": true}, {\"check\": \"control: below base\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: joint with exempt interest\", \"actual\": 4500, \"expected\": 4500, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}