{"abstract":"Unearned income between 1300 and 2600 is taxed at the parent's rate instead of the child's.","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":"Updating the threshold to a stale prior-year figure of 2500 still pulls 100 of unearned income into the parent's rate.","family":"w2-tax_bracket_computation-unearned-income-parent-rate-parent-rate-threshold","id":"FA-62726","implementations":{"attempt":{"sha256":"b1055b3988a3fa20d29b5845f9dd6d2c76b0d22bc6513594d976cb8aaf5a1872","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 - 2500)\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-rate-threshold 1', (0, 5000, '32'), 89800),\n  ('regression parent-rate-threshold 2', (20000, 5000, '24'), 137600),\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-rate-threshold 1', (0, 2000, '32'), 7000),\n  ('regression parent-rate-threshold 2', (3000, 3000, '35'), 35500),\n  ('partial repair guard 2', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0),\n  ('control: unearned only', (0, 5000, '32'), 89800), ('control: working teen', (20000, 5000, '24'), 137600)],\n [('regression parent-rate-threshold 1', (0, 60000, '37'), 2136800),\n  ('regression parent-rate-threshold 2', (0, 2600, '22'), 13000), ('partial repair guard 2', (8000, 5662, '22'), 88864),\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)],\n [('regression parent-rate-threshold 1', (8000, 5662, '22'), 88864),\n  ('regression parent-rate-threshold 2', (1000, 60000, '22'), 1284300),\n  ('partial repair guard 2', (3000, 5000, '32'), 98300), ('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-rate-threshold 1', (3000, 5000, '32'), 98300),\n  ('regression parent-rate-threshold 2', (8000, 5000, '24'), 79100),\n  ('partial repair guard 2', (20000, 5000, '35'), 164000), ('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":"86aece53923644c4200b8f2345b2add31c44628103498320a87e3b465c4f6393","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 - 1300)\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-rate-threshold 1', (0, 5000, '32'), 89800),\n  ('regression parent-rate-threshold 2', (20000, 5000, '24'), 137600),\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-rate-threshold 1', (0, 2000, '32'), 7000),\n  ('regression parent-rate-threshold 2', (3000, 3000, '35'), 35500),\n  ('partial repair guard 2', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0),\n  ('control: unearned only', (0, 5000, '32'), 89800), ('control: working teen', (20000, 5000, '24'), 137600)],\n [('regression parent-rate-threshold 1', (0, 60000, '37'), 2136800),\n  ('regression parent-rate-threshold 2', (0, 2600, '22'), 13000), ('partial repair guard 2', (8000, 5662, '22'), 88864),\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)],\n [('regression parent-rate-threshold 1', (8000, 5662, '22'), 88864),\n  ('regression parent-rate-threshold 2', (1000, 60000, '22'), 1284300),\n  ('partial repair guard 2', (3000, 5000, '32'), 98300), ('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-rate-threshold 1', (3000, 5000, '32'), 98300),\n  ('regression parent-rate-threshold 2', (8000, 5000, '24'), 79100),\n  ('partial repair guard 2', (20000, 5000, '35'), 164000), ('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":"98e032614e8d9f75d0fc12df5ec7a60feafdcec0dbc7d370b8626a45771f1721","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-rate-threshold 1', (0, 5000, '32'), 89800),\n  ('regression parent-rate-threshold 2', (20000, 5000, '24'), 137600),\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-rate-threshold 1', (0, 2000, '32'), 7000),\n  ('regression parent-rate-threshold 2', (3000, 3000, '35'), 35500),\n  ('partial repair guard 2', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0),\n  ('control: unearned only', (0, 5000, '32'), 89800), ('control: working teen', (20000, 5000, '24'), 137600)],\n [('regression parent-rate-threshold 1', (0, 60000, '37'), 2136800),\n  ('regression parent-rate-threshold 2', (0, 2600, '22'), 13000), ('partial repair guard 2', (8000, 5662, '22'), 88864),\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)],\n [('regression parent-rate-threshold 1', (8000, 5662, '22'), 88864),\n  ('regression parent-rate-threshold 2', (1000, 60000, '22'), 1284300),\n  ('partial repair guard 2', (3000, 5000, '32'), 98300), ('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-rate-threshold 1', (3000, 5000, '32'), 98300),\n  ('regression parent-rate-threshold 2', (8000, 5000, '24'), 79100),\n  ('partial repair guard 2', (20000, 5000, '35'), 164000), ('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-parent-rate-threshold","generated_at":"2026-09-29T14:47:07.328365+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 above 2600 is net unearned income.","root_cause":"Net unearned income is measured over 1300 instead of 2600.","sha256":"62618c2159952be63a8953b0d524912000c2d714b002c7fc0fca369b0b040d26","title":"Unearned income above the first deduction tier is taxed at the parent's rate · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.526,"exit_code":1,"observations":[{"actual":92000,"check":"regression parent-rate-threshold 1","expected":89800,"passed":false},{"actual":139000,"check":"regression parent-rate-threshold 2","expected":137600,"passed":false},{"actual":7000,"check":"control: below threshold","expected":7000,"passed":true},{"actual":38000,"check":"control: mixed small","expected":35500,"passed":false},{"actual":2139500,"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-rate-threshold 1\", \"actual\": 92000, \"expected\": 89800, \"passed\": false}, {\"check\": \"regression parent-rate-threshold 2\", \"actual\": 139000, \"expected\": 137600, \"passed\": false}, {\"check\": \"control: below threshold\", \"actual\": 7000, \"expected\": 7000, \"passed\": true}, {\"check\": \"control: mixed small\", \"actual\": 38000, \"expected\": 35500, \"passed\": false}, {\"check\": \"control: large trust income\", \"actual\": 2139500, \"expected\": 2136800, \"passed\": false}, {\"check\": \"control: earned only\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.897,"exit_code":1,"observations":[{"actual":118400,"check":"regression parent-rate-threshold 1","expected":89800,"passed":false},{"actual":155800,"check":"regression parent-rate-threshold 2","expected":137600,"passed":false},{"actual":22400,"check":"control: below threshold","expected":7000,"passed":false},{"actual":68000,"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-rate-threshold 1\", \"actual\": 118400, \"expected\": 89800, \"passed\": false}, {\"check\": \"regression parent-rate-threshold 2\", \"actual\": 155800, \"expected\": 137600, \"passed\": false}, {\"check\": \"control: below threshold\", \"actual\": 22400, \"expected\": 7000, \"passed\": false}, {\"check\": \"control: mixed small\", \"actual\": 68000, \"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.674,"exit_code":0,"observations":[{"actual":89800,"check":"regression parent-rate-threshold 1","expected":89800,"passed":true},{"actual":137600,"check":"regression parent-rate-threshold 2","expected":137600,"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-rate-threshold 1\", \"actual\": 89800, \"expected\": 89800, \"passed\": true}, {\"check\": \"regression parent-rate-threshold 2\", \"actual\": 137600, \"expected\": 137600, \"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"}