{"abstract":"A working teenager's wages are taxed at the parent's rate.","category":"Tax bracket computation","checks":6,"contract":"solve(earned, unearned, parent_rate): stipulated child unearned-income rule, whole dollars. Standard deduction = min(14600, max(1300, earned + 450)); taxable = max(0, earned + unearned - std). Net unearned income = max(0, unearned - 2600); the part of taxable income taxed at the parent's rate (percent string) is min(net unearned, taxable); the rest is taxed at 10%. Return integer cents half-up.","evaluation_group":"w2-tax_bracket_computation-unearned-income-parent-rate","failed_approach":"Subtracting the child's standard deduction instead of 2600 mixes the deduction with the threshold.","family":"w2-tax_bracket_computation-unearned-income-parent-rate-earned-excluded","id":"FA-62731","implementations":{"attempt":{"sha256":"9ce5ba222a2efd7001d82ca3c77da5bb139e9ae0bbfa08ff2adc9bd79edb907d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(earned, unearned, parent_rate):\n    def prog(x, br):\n        tax, lower = Fraction(0), 0\n        for upper, rate in br:\n            top = x if upper is None else min(x, upper)\n            if top > lower: tax += (top - lower) * Fraction(rate) / 100\n            if upper is None or x <= upper: break\n            lower = upper\n        return tax\n    def cents(v):\n        v = v * 100\n        return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))\n    \n    std = min(14600, max(1300, earned + 450))\n    taxable = max(0, earned + unearned - std)\n    net_unearned = max(0, unearned - std)\n    at_parent = min(net_unearned, taxable)\n    tax = at_parent * Fraction(parent_rate) / 100 + (taxable - at_parent) * Fraction(10, 100)\n    return cents(tax)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression earned-excluded 1', (20000, 5000, '24'), 137600),\n  ('regression earned-excluded 2', (3000, 3000, '35'), 35500), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: below threshold', (0, 2000, '32'), 7000), ('control: large trust income', (0, 60000, '37'), 2136800),\n  ('control: earned only', (8000, 0, '22'), 0)],\n [('regression earned-excluded 1', (16766, 0, '32'), 21660),\n  ('regression earned-excluded 2', (8000, 5662, '22'), 88864), ('partial repair guard 1', (0, 5000, '32'), 89800),\n  ('partial repair guard 2', (0, 2000, '32'), 7000), ('control: mixed small', (3000, 3000, '35'), 35500),\n  ('control: large trust income', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0),\n  ('control: working teen', (20000, 5000, '24'), 137600)],\n [('regression earned-excluded 1', (1000, 60000, '22'), 1284300),\n  ('regression earned-excluded 2', (3000, 5000, '32'), 98300), ('partial repair guard 1', (0, 60000, '37'), 2136800),\n  ('partial repair guard 2', (0, 2600, '22'), 13000), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: below threshold', (0, 2000, '32'), 7000), ('control: working teen', (20000, 5000, '24'), 137600),\n  ('control: mixed small', (3000, 3000, '35'), 35500)],\n [('regression earned-excluded 1', (3000, 1300, '24'), 8500),\n  ('regression earned-excluded 2', (8000, 5000, '24'), 79100), ('partial repair guard 1', (8000, 5662, '22'), 88864),\n  ('partial repair guard 2', (1000, 60000, '22'), 1284300), ('control: mixed small', (3000, 3000, '35'), 35500),\n  ('control: large trust income', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0),\n  ('control: unearned only', (0, 5000, '32'), 89800)],\n [('regression earned-excluded 1', (20000, 5000, '35'), 164000),\n  ('regression earned-excluded 2', (3000, 2601, '22'), 21522), ('partial repair guard 1', (3000, 5000, '32'), 98300),\n  ('partial repair guard 2', (8000, 5000, '24'), 79100), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: below threshold', (0, 2000, '32'), 7000), ('control: working teen', (20000, 5000, '24'), 137600),\n  ('control: mixed small', (3000, 3000, '35'), 35500)]]\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":"07984c7f45e12550707b49ed45b0e32a49aacb48a783a637137bc67039bc2719","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(earned, unearned, parent_rate):\n    def prog(x, br):\n        tax, lower = Fraction(0), 0\n        for upper, rate in br:\n            top = x if upper is None else min(x, upper)\n            if top > lower: tax += (top - lower) * Fraction(rate) / 100\n            if upper is None or x <= upper: break\n            lower = upper\n        return tax\n    def cents(v):\n        v = v * 100\n        return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))\n    \n    std = min(14600, max(1300, earned + 450))\n    taxable = max(0, earned + unearned - std)\n    net_unearned = max(0, earned + unearned - 2600)\n    at_parent = min(net_unearned, taxable)\n    tax = at_parent * Fraction(parent_rate) / 100 + (taxable - at_parent) * Fraction(10, 100)\n    return cents(tax)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression earned-excluded 1', (20000, 5000, '24'), 137600),\n  ('regression earned-excluded 2', (3000, 3000, '35'), 35500), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: below threshold', (0, 2000, '32'), 7000), ('control: large trust income', (0, 60000, '37'), 2136800),\n  ('control: earned only', (8000, 0, '22'), 0)],\n [('regression earned-excluded 1', (16766, 0, '32'), 21660),\n  ('regression earned-excluded 2', (8000, 5662, '22'), 88864), ('partial repair guard 1', (0, 5000, '32'), 89800),\n  ('partial repair guard 2', (0, 2000, '32'), 7000), ('control: mixed small', (3000, 3000, '35'), 35500),\n  ('control: large trust income', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0),\n  ('control: working teen', (20000, 5000, '24'), 137600)],\n [('regression earned-excluded 1', (1000, 60000, '22'), 1284300),\n  ('regression earned-excluded 2', (3000, 5000, '32'), 98300), ('partial repair guard 1', (0, 60000, '37'), 2136800),\n  ('partial repair guard 2', (0, 2600, '22'), 13000), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: below threshold', (0, 2000, '32'), 7000), ('control: working teen', (20000, 5000, '24'), 137600),\n  ('control: mixed small', (3000, 3000, '35'), 35500)],\n [('regression earned-excluded 1', (3000, 1300, '24'), 8500),\n  ('regression earned-excluded 2', (8000, 5000, '24'), 79100), ('partial repair guard 1', (8000, 5662, '22'), 88864),\n  ('partial repair guard 2', (1000, 60000, '22'), 1284300), ('control: mixed small', (3000, 3000, '35'), 35500),\n  ('control: large trust income', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0),\n  ('control: unearned only', (0, 5000, '32'), 89800)],\n [('regression earned-excluded 1', (20000, 5000, '35'), 164000),\n  ('regression earned-excluded 2', (3000, 2601, '22'), 21522), ('partial repair guard 1', (3000, 5000, '32'), 98300),\n  ('partial repair guard 2', (8000, 5000, '24'), 79100), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: below threshold', (0, 2000, '32'), 7000), ('control: working teen', (20000, 5000, '24'), 137600),\n  ('control: mixed small', (3000, 3000, '35'), 35500)]]\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":"50d90261dee3ad710684fb789f3951b2a63d3e5ff60ae1f27071bc08aec724bc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(earned, unearned, parent_rate):\n    def prog(x, br):\n        tax, lower = Fraction(0), 0\n        for upper, rate in br:\n            top = x if upper is None else min(x, upper)\n            if top > lower: tax += (top - lower) * Fraction(rate) / 100\n            if upper is None or x <= upper: break\n            lower = upper\n        return tax\n    def cents(v):\n        v = v * 100\n        return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))\n    \n    std = min(14600, max(1300, earned + 450))\n    taxable = max(0, earned + unearned - std)\n    net_unearned = max(0, unearned - 2600)\n    at_parent = min(net_unearned, taxable)\n    tax = at_parent * Fraction(parent_rate) / 100 + (taxable - at_parent) * Fraction(10, 100)\n    return cents(tax)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression earned-excluded 1', (20000, 5000, '24'), 137600),\n  ('regression earned-excluded 2', (3000, 3000, '35'), 35500), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: below threshold', (0, 2000, '32'), 7000), ('control: large trust income', (0, 60000, '37'), 2136800),\n  ('control: earned only', (8000, 0, '22'), 0)],\n [('regression earned-excluded 1', (16766, 0, '32'), 21660),\n  ('regression earned-excluded 2', (8000, 5662, '22'), 88864), ('partial repair guard 1', (0, 5000, '32'), 89800),\n  ('partial repair guard 2', (0, 2000, '32'), 7000), ('control: mixed small', (3000, 3000, '35'), 35500),\n  ('control: large trust income', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0),\n  ('control: working teen', (20000, 5000, '24'), 137600)],\n [('regression earned-excluded 1', (1000, 60000, '22'), 1284300),\n  ('regression earned-excluded 2', (3000, 5000, '32'), 98300), ('partial repair guard 1', (0, 60000, '37'), 2136800),\n  ('partial repair guard 2', (0, 2600, '22'), 13000), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: below threshold', (0, 2000, '32'), 7000), ('control: working teen', (20000, 5000, '24'), 137600),\n  ('control: mixed small', (3000, 3000, '35'), 35500)],\n [('regression earned-excluded 1', (3000, 1300, '24'), 8500),\n  ('regression earned-excluded 2', (8000, 5000, '24'), 79100), ('partial repair guard 1', (8000, 5662, '22'), 88864),\n  ('partial repair guard 2', (1000, 60000, '22'), 1284300), ('control: mixed small', (3000, 3000, '35'), 35500),\n  ('control: large trust income', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0),\n  ('control: unearned only', (0, 5000, '32'), 89800)],\n [('regression earned-excluded 1', (20000, 5000, '35'), 164000),\n  ('regression earned-excluded 2', (3000, 2601, '22'), 21522), ('partial repair guard 1', (3000, 5000, '32'), 98300),\n  ('partial repair guard 2', (8000, 5000, '24'), 79100), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: below threshold', (0, 2000, '32'), 7000), ('control: working teen', (20000, 5000, '24'), 137600),\n  ('control: mixed small', (3000, 3000, '35'), 35500)]]\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-unearned-income-parent-rate-earned-excluded","generated_at":"2026-09-29T14:47:07.335351+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":"Only unearned income counts toward net unearned income.","root_cause":"Net unearned income is computed from earned + unearned.","sha256":"998cc9ef1ae221554bcdccbc150f6b2424337c5b13bbf6a262e869cf02bd6a53","title":"Earned income is counted toward the parent-rate amount · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.346,"exit_code":1,"observations":[{"actual":104000,"check":"regression earned-excluded 1","expected":137600,"passed":false},{"actual":25500,"check":"regression earned-excluded 2","expected":35500,"passed":false},{"actual":118400,"check":"control: unearned only","expected":89800,"passed":false},{"actual":22400,"check":"control: below threshold","expected":7000,"passed":false},{"actual":2171900,"check":"control: large trust income","expected":2136800,"passed":false},{"actual":0,"check":"control: earned only","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression earned-excluded 1\", \"actual\": 104000, \"expected\": 137600, \"passed\": false}, {\"check\": \"regression earned-excluded 2\", \"actual\": 25500, \"expected\": 35500, \"passed\": false}, {\"check\": \"control: unearned only\", \"actual\": 118400, \"expected\": 89800, \"passed\": false}, {\"check\": \"control: below threshold\", \"actual\": 22400, \"expected\": 7000, \"passed\": false}, {\"check\": \"control: large trust income\", \"actual\": 2171900, \"expected\": 2136800, \"passed\": false}, {\"check\": \"control: earned only\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.654,"exit_code":1,"observations":[{"actual":249600,"check":"regression earned-excluded 1","expected":137600,"passed":false},{"actual":89250,"check":"regression earned-excluded 2","expected":35500,"passed":false},{"actual":89800,"check":"control: unearned only","expected":89800,"passed":true},{"actual":7000,"check":"control: below threshold","expected":7000,"passed":true},{"actual":2136800,"check":"control: large trust income","expected":2136800,"passed":true},{"actual":0,"check":"control: earned only","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression earned-excluded 1\", \"actual\": 249600, \"expected\": 137600, \"passed\": false}, {\"check\": \"regression earned-excluded 2\", \"actual\": 89250, \"expected\": 35500, \"passed\": false}, {\"check\": \"control: unearned only\", \"actual\": 89800, \"expected\": 89800, \"passed\": true}, {\"check\": \"control: below threshold\", \"actual\": 7000, \"expected\": 7000, \"passed\": true}, {\"check\": \"control: large trust income\", \"actual\": 2136800, \"expected\": 2136800, \"passed\": true}, {\"check\": \"control: earned only\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.986,"exit_code":0,"observations":[{"actual":137600,"check":"regression earned-excluded 1","expected":137600,"passed":true},{"actual":35500,"check":"regression earned-excluded 2","expected":35500,"passed":true},{"actual":89800,"check":"control: unearned only","expected":89800,"passed":true},{"actual":7000,"check":"control: below threshold","expected":7000,"passed":true},{"actual":2136800,"check":"control: large trust income","expected":2136800,"passed":true},{"actual":0,"check":"control: earned only","expected":0,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression earned-excluded 1\", \"actual\": 137600, \"expected\": 137600, \"passed\": true}, {\"check\": \"regression earned-excluded 2\", \"actual\": 35500, \"expected\": 35500, \"passed\": true}, {\"check\": \"control: unearned only\", \"actual\": 89800, \"expected\": 89800, \"passed\": true}, {\"check\": \"control: below threshold\", \"actual\": 7000, \"expected\": 7000, \"passed\": true}, {\"check\": \"control: large trust income\", \"actual\": 2136800, \"expected\": 2136800, \"passed\": true}, {\"check\": \"control: earned only\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}