{"abstract":"A child with 2601 of unearned income and wages pays the parent's rate on everything.","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":"Using gross unearned income instead of net unearned income still over-applies the parent's rate.","family":"w2-tax_bracket_computation-unearned-income-parent-rate-parent-portion","id":"FA-62741","implementations":{"attempt":{"sha256":"e66fe9ebd8895f0ece00951af99661e20f2757de027dd19d248f054b8f2297de","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(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 parent-portion 1', (20000, 5000, '24'), 137600), ('regression parent-portion 2', (0, 5000, '32'), 89800),\n  ('control: below threshold', (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 [('regression parent-portion 1', (3000, 3000, '35'), 35500),\n  ('regression parent-portion 2', (0, 60000, '37'), 2136800), ('partial repair guard 1', (0, 2000, '32'), 7000),\n  ('control: earned only', (8000, 0, '22'), 0), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: working teen', (20000, 5000, '24'), 137600)],\n [('regression parent-portion 1', (8000, 5662, '22'), 88864),\n  ('regression parent-portion 2', (1000, 60000, '22'), 1284300), ('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 parent-portion 1', (3000, 5000, '32'), 98300),\n  ('regression parent-portion 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 parent-portion 1', (20000, 5000, '35'), 164000), ('regression parent-portion 2', (0, 5000, '22'), 65800),\n  ('partial repair guard 1', (3000, 5000, '32'), 98300), ('partial repair guard 2', (3000, 1300, '24'), 8500),\n  ('control: unearned only', (0, 5000, '32'), 89800), ('control: below threshold', (0, 2000, '32'), 7000),\n  ('control: working teen', (20000, 5000, '24'), 137600), ('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":"ce8911ad7cde5861ddde0270720a8654ca076fc735527cd1088b5f770adb84c3","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 = taxable if net_unearned > 0 else 0\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 parent-portion 1', (20000, 5000, '24'), 137600), ('regression parent-portion 2', (0, 5000, '32'), 89800),\n  ('control: below threshold', (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 [('regression parent-portion 1', (3000, 3000, '35'), 35500),\n  ('regression parent-portion 2', (0, 60000, '37'), 2136800), ('partial repair guard 1', (0, 2000, '32'), 7000),\n  ('control: earned only', (8000, 0, '22'), 0), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: working teen', (20000, 5000, '24'), 137600)],\n [('regression parent-portion 1', (8000, 5662, '22'), 88864),\n  ('regression parent-portion 2', (1000, 60000, '22'), 1284300), ('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 parent-portion 1', (3000, 5000, '32'), 98300),\n  ('regression parent-portion 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 parent-portion 1', (20000, 5000, '35'), 164000), ('regression parent-portion 2', (0, 5000, '22'), 65800),\n  ('partial repair guard 1', (3000, 5000, '32'), 98300), ('partial repair guard 2', (3000, 1300, '24'), 8500),\n  ('control: unearned only', (0, 5000, '32'), 89800), ('control: below threshold', (0, 2000, '32'), 7000),\n  ('control: working teen', (20000, 5000, '24'), 137600), ('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":"fd86f231ccf2eeb8f253df7f413de2cc1fa2204123c6d4e774b93837a1e0c09e","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 parent-portion 1', (20000, 5000, '24'), 137600), ('regression parent-portion 2', (0, 5000, '32'), 89800),\n  ('control: below threshold', (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 [('regression parent-portion 1', (3000, 3000, '35'), 35500),\n  ('regression parent-portion 2', (0, 60000, '37'), 2136800), ('partial repair guard 1', (0, 2000, '32'), 7000),\n  ('control: earned only', (8000, 0, '22'), 0), ('control: unearned only', (0, 5000, '32'), 89800),\n  ('control: working teen', (20000, 5000, '24'), 137600)],\n [('regression parent-portion 1', (8000, 5662, '22'), 88864),\n  ('regression parent-portion 2', (1000, 60000, '22'), 1284300), ('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 parent-portion 1', (3000, 5000, '32'), 98300),\n  ('regression parent-portion 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 parent-portion 1', (20000, 5000, '35'), 164000), ('regression parent-portion 2', (0, 5000, '22'), 65800),\n  ('partial repair guard 1', (3000, 5000, '32'), 98300), ('partial repair guard 2', (3000, 1300, '24'), 8500),\n  ('control: unearned only', (0, 5000, '32'), 89800), ('control: below threshold', (0, 2000, '32'), 7000),\n  ('control: working teen', (20000, 5000, '24'), 137600), ('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-parent-portion","generated_at":"2026-09-29T14:47:07.395229+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":"Tax only min(net unearned, taxable) at the parent's rate.","root_cause":"The parent-rate portion switches to the whole taxable income instead of min(net unearned, taxable).","sha256":"be9f5e1d8f990b99521f32b0b83470562e2c37bcc88497129dfd2521a3d4473f","title":"All taxable income is taxed at the parent's rate once there is any net unearned income · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.747,"exit_code":1,"observations":[{"actual":174000,"check":"regression parent-portion 1","expected":137600,"passed":false},{"actual":118400,"check":"regression parent-portion 2","expected":89800,"passed":false},{"actual":22400,"check":"control: below threshold","expected":7000,"passed":false},{"actual":89250,"check":"control: mixed small","expected":35500,"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 parent-portion 1\", \"actual\": 174000, \"expected\": 137600, \"passed\": false}, {\"check\": \"regression parent-portion 2\", \"actual\": 118400, \"expected\": 89800, \"passed\": false}, {\"check\": \"control: below threshold\", \"actual\": 22400, \"expected\": 7000, \"passed\": false}, {\"check\": \"control: mixed small\", \"actual\": 89250, \"expected\": 35500, \"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":44.275,"exit_code":1,"observations":[{"actual":249600,"check":"regression parent-portion 1","expected":137600,"passed":false},{"actual":118400,"check":"regression parent-portion 2","expected":89800,"passed":false},{"actual":7000,"check":"control: below threshold","expected":7000,"passed":true},{"actual":89250,"check":"control: mixed small","expected":35500,"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 parent-portion 1\", \"actual\": 249600, \"expected\": 137600, \"passed\": false}, {\"check\": \"regression parent-portion 2\", \"actual\": 118400, \"expected\": 89800, \"passed\": false}, {\"check\": \"control: below threshold\", \"actual\": 7000, \"expected\": 7000, \"passed\": true}, {\"check\": \"control: mixed small\", \"actual\": 89250, \"expected\": 35500, \"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"},"fixed":{"elapsed_ms":43.699,"exit_code":0,"observations":[{"actual":137600,"check":"regression parent-portion 1","expected":137600,"passed":true},{"actual":89800,"check":"regression parent-portion 2","expected":89800,"passed":true},{"actual":7000,"check":"control: below threshold","expected":7000,"passed":true},{"actual":35500,"check":"control: mixed small","expected":35500,"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 parent-portion 1\", \"actual\": 137600, \"expected\": 137600, \"passed\": true}, {\"check\": \"regression parent-portion 2\", \"actual\": 89800, \"expected\": 89800, \"passed\": true}, {\"check\": \"control: below threshold\", \"actual\": 7000, \"expected\": 7000, \"passed\": true}, {\"check\": \"control: mixed small\", \"actual\": 35500, \"expected\": 35500, \"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"}