{"abstract":"A retiree living on eligible dividends gets a negative tax.","category":"Tax bracket computation","checks":8,"contract":"solve(other, elig, nonelig): stipulated dividend integration, whole dollars. Eligible dividends are grossed up by 38% and non-eligible by 15%; taxable income is other income plus both grossed-up amounts, taxed with slices 15% to 55867, 20.5% to 111733, 26% to 173205, 29% to 246752, 33% above. The nonrefundable dividend credit is 15.0198% of the grossed-up eligible amount plus 9.0301% of the grossed-up non-eligible amount. Tax = max(0, slice tax - credit), returned in integer cents half-up.","contract_signature":"other, elig, nonelig","evaluation_group":"w2-tax_bracket_computation-dividend-grossup-credit","failed_approach":"Limiting the credit to the tax attributable to dividends still over-taxes when other income could absorb it.","family":"w2-tax_bracket_computation-dividend-grossup-credit-nonrefundable-floor","id":"FA-62716","implementations":{"attempt":{"sha256":"815c1d3a8a09e2f0b4a7295983ac910b40ca4047dfde1e35e8fcc2331d524b9e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(other, elig, nonelig):\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    br = [[55867, '15'], [111733, '20.5'], [173205, '26'], [246752, '29'], [None, '33']]\n    g_e = elig * Fraction(138, 100)\n    g_n = nonelig * Fraction(115, 100)\n    taxable = other + g_e + g_n\n    credit = g_e * Fraction(150198, 1000000) + g_n * Fraction(90301, 1000000)\n    return cents(prog(taxable, br) - min(credit, prog(taxable, br) - prog(other, br)))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression nonrefundable-floor 1', (0, 10000, 0), 0), ('regression nonrefundable-floor 2', (0, 1000, 0), 0),\n  ('partial repair guard 1', (50000, 3936, 0), 749892), ('partial repair guard 2', (20000, 10000, 0), 299727),\n  ('control: wages only', (50000, 0, 0), 750000), ('control: mixed', (100000, 10000, 0), 1829727),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539),\n  ('control: both kinds', (80000, 15000, 15000), 1678221)],\n [('regression nonrefundable-floor 1', (0, 32901, 0), 0), ('regression nonrefundable-floor 2', (0, 10000, 0), 0),\n  ('partial repair guard 1', (50000, 1000, 0), 749973), ('partial repair guard 2', (20000, 20801, 0), 299432),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539),\n  ('control: both kinds', (80000, 15000, 15000), 1678221), ('control: high income', (250000, 50000, 10000), 7337865),\n  ('control: wages only', (50000, 0, 0), 750000)],\n [('regression nonrefundable-floor 1', (0, 1000, 0), 0), ('regression nonrefundable-floor 2', (0, 32901, 0), 0),\n  ('partial repair guard 1', (20000, 1000, 0), 299973), ('partial repair guard 2', (11723, 1000, 0), 175818),\n  ('control: wages only', (50000, 0, 0), 750000), ('control: eligible dividends only', (0, 10000, 0), 0),\n  ('control: mixed', (100000, 10000, 0), 1829727), ('control: non-eligible dividends', (40000, 0, 20000), 776539)],\n [('regression nonrefundable-floor 1', (0, 10000, 0), 0), ('regression nonrefundable-floor 2', (0, 1000, 0), 0),\n  ('partial repair guard 1', (20000, 1961, 0), 299946), ('partial repair guard 2', (33705, 10000, 0), 505302),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539),\n  ('control: both kinds', (80000, 15000, 15000), 1678221), ('control: high income', (250000, 50000, 10000), 7337865),\n  ('control: wages only', (50000, 0, 0), 750000)],\n [('regression nonrefundable-floor 1', (0, 32901, 0), 0), ('regression nonrefundable-floor 2', (0, 10000, 0), 0),\n  ('partial repair guard 1', (50000, 951, 0), 749974), ('partial repair guard 2', (50000, 3936, 0), 749892),\n  ('control: wages only', (50000, 0, 0), 750000), ('control: mixed', (100000, 10000, 0), 1829727),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539),\n  ('control: both kinds', (80000, 15000, 15000), 1678221)]]\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":"e21605f4973c6963ed07ae937e1086e669a423bca617ba0b770818a096c8e31f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(other, elig, nonelig):\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    br = [[55867, '15'], [111733, '20.5'], [173205, '26'], [246752, '29'], [None, '33']]\n    g_e = elig * Fraction(138, 100)\n    g_n = nonelig * Fraction(115, 100)\n    taxable = other + g_e + g_n\n    credit = g_e * Fraction(150198, 1000000) + g_n * Fraction(90301, 1000000)\n    return cents(prog(taxable, br) - credit)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression nonrefundable-floor 1', (0, 10000, 0), 0), ('regression nonrefundable-floor 2', (0, 1000, 0), 0),\n  ('partial repair guard 1', (50000, 3936, 0), 749892), ('partial repair guard 2', (20000, 10000, 0), 299727),\n  ('control: wages only', (50000, 0, 0), 750000), ('control: mixed', (100000, 10000, 0), 1829727),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539),\n  ('control: both kinds', (80000, 15000, 15000), 1678221)],\n [('regression nonrefundable-floor 1', (0, 32901, 0), 0), ('regression nonrefundable-floor 2', (0, 10000, 0), 0),\n  ('partial repair guard 1', (50000, 1000, 0), 749973), ('partial repair guard 2', (20000, 20801, 0), 299432),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539),\n  ('control: both kinds', (80000, 15000, 15000), 1678221), ('control: high income', (250000, 50000, 10000), 7337865),\n  ('control: wages only', (50000, 0, 0), 750000)],\n [('regression nonrefundable-floor 1', (0, 1000, 0), 0), ('regression nonrefundable-floor 2', (0, 32901, 0), 0),\n  ('partial repair guard 1', (20000, 1000, 0), 299973), ('partial repair guard 2', (11723, 1000, 0), 175818),\n  ('control: wages only', (50000, 0, 0), 750000), ('control: eligible dividends only', (0, 10000, 0), 0),\n  ('control: mixed', (100000, 10000, 0), 1829727), ('control: non-eligible dividends', (40000, 0, 20000), 776539)],\n [('regression nonrefundable-floor 1', (0, 10000, 0), 0), ('regression nonrefundable-floor 2', (0, 1000, 0), 0),\n  ('partial repair guard 1', (20000, 1961, 0), 299946), ('partial repair guard 2', (33705, 10000, 0), 505302),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539),\n  ('control: both kinds', (80000, 15000, 15000), 1678221), ('control: high income', (250000, 50000, 10000), 7337865),\n  ('control: wages only', (50000, 0, 0), 750000)],\n [('regression nonrefundable-floor 1', (0, 32901, 0), 0), ('regression nonrefundable-floor 2', (0, 10000, 0), 0),\n  ('partial repair guard 1', (50000, 951, 0), 749974), ('partial repair guard 2', (50000, 3936, 0), 749892),\n  ('control: wages only', (50000, 0, 0), 750000), ('control: mixed', (100000, 10000, 0), 1829727),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539),\n  ('control: both kinds', (80000, 15000, 15000), 1678221)]]\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-dividend-grossup-credit-nonrefundable-floor","generated_at":"2026-09-29T14:47:07.322461+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 tax after the dividend credit is not floored at zero.","sha256":"c1b491494813081716109d75b16f5da5b2045e3fbb9089aa610d16b0ea646ace","title":"Excess dividend credit is paid out as a refund · 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":45.719,"exit_code":1,"observations":[{"actual":0,"check":"regression nonrefundable-floor 1","expected":0,"passed":true},{"actual":0,"check":"regression nonrefundable-floor 2","expected":0,"passed":true},{"actual":750000,"check":"partial repair guard 1","expected":749892,"passed":false},{"actual":300000,"check":"partial repair guard 2","expected":299727,"passed":false},{"actual":750000,"check":"control: wages only","expected":750000,"passed":true},{"actual":1829727,"check":"control: mixed","expected":1829727,"passed":true},{"actual":776539,"check":"control: non-eligible dividends","expected":776539,"passed":true},{"actual":1678221,"check":"control: both kinds","expected":1678221,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression nonrefundable-floor 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"regression nonrefundable-floor 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"partial repair guard 1\", \"actual\": 750000, \"expected\": 749892, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 300000, \"expected\": 299727, \"passed\": false}, {\"check\": \"control: wages only\", \"actual\": 750000, \"expected\": 750000, \"passed\": true}, {\"check\": \"control: mixed\", \"actual\": 1829727, \"expected\": 1829727, \"passed\": true}, {\"check\": \"control: non-eligible dividends\", \"actual\": 776539, \"expected\": 776539, \"passed\": true}, {\"check\": \"control: both kinds\", \"actual\": 1678221, \"expected\": 1678221, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.328,"exit_code":1,"observations":[{"actual":-273,"check":"regression nonrefundable-floor 1","expected":0,"passed":false},{"actual":-27,"check":"regression nonrefundable-floor 2","expected":0,"passed":false},{"actual":749892,"check":"partial repair guard 1","expected":749892,"passed":true},{"actual":299727,"check":"partial repair guard 2","expected":299727,"passed":true},{"actual":750000,"check":"control: wages only","expected":750000,"passed":true},{"actual":1829727,"check":"control: mixed","expected":1829727,"passed":true},{"actual":776539,"check":"control: non-eligible dividends","expected":776539,"passed":true},{"actual":1678221,"check":"control: both kinds","expected":1678221,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression nonrefundable-floor 1\", \"actual\": -273, \"expected\": 0, \"passed\": false}, {\"check\": \"regression nonrefundable-floor 2\", \"actual\": -27, \"expected\": 0, \"passed\": false}, {\"check\": \"partial repair guard 1\", \"actual\": 749892, \"expected\": 749892, \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": 299727, \"expected\": 299727, \"passed\": true}, {\"check\": \"control: wages only\", \"actual\": 750000, \"expected\": 750000, \"passed\": true}, {\"check\": \"control: mixed\", \"actual\": 1829727, \"expected\": 1829727, \"passed\": true}, {\"check\": \"control: non-eligible dividends\", \"actual\": 776539, \"expected\": 776539, \"passed\": true}, {\"check\": \"control: both kinds\", \"actual\": 1678221, \"expected\": 1678221, \"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."}}