{"abstract":"Dividend recipients receive a smaller credit than the integration rules provide.","category":"Tax bracket computation","checks":6,"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.","evaluation_group":"w2-tax_bracket_computation-dividend-grossup-credit","failed_approach":"Grossing up only the eligible credit base leaves non-eligible dividends under-credited.","family":"w2-tax_bracket_computation-dividend-grossup-credit-credit-base","id":"FA-62706","implementations":{"attempt":{"sha256":"8fc16d9e62fb7e63c185c7c3b901d5a3f5b94d1c93a63a701d18e1946141fa45","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) + nonelig * Fraction(90301, 1000000)\n    return cents(max(0, prog(taxable, br) - credit))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression credit-base 1', (40000, 0, 20000), 776539), ('regression credit-base 2', (100000, 10000, 0), 1829727),\n  ('partial repair guard 2', (80000, 15000, 15000), 1678221), ('control: wages only', (50000, 0, 0), 750000),\n  ('control: eligible dividends only', (0, 10000, 0), 0), ('control: high income', (250000, 50000, 10000), 7337865)],\n [('regression credit-base 1', (0, 10000, 0), 0), ('regression credit-base 2', (80000, 15000, 15000), 1678221),\n  ('partial repair guard 1', (250000, 50000, 10000), 7337865), ('partial repair guard 2', (20000, 78584, 5000), 886535),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539), ('control: wages only', (50000, 0, 0), 750000),\n  ('control: mixed', (100000, 10000, 0), 1829727)],\n [('regression credit-base 1', (250000, 50000, 10000), 7337865), ('regression credit-base 2', (50000, 3936, 0), 749892),\n  ('partial repair guard 1', (0, 0, 16293), 111858), ('partial repair guard 2', (100000, 0, 5000), 1808683),\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 credit-base 1', (0, 50000, 0), 70865), ('regression credit-base 2', (100000, 997, 0), 1750271),\n  ('partial repair guard 1', (0, 10000, 5000), 34054), ('partial repair guard 2', (0, 50000, 49145), 794917),\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 credit-base 1', (20000, 78584, 5000), 886535), ('regression credit-base 2', (0, 0, 16293), 111858),\n  ('partial repair guard 1', (20000, 1000, 5000), 334300), ('partial repair guard 2', (10606, 50000, 20000), 552096),\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)]]\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":"9f5d6a8e3576dd45a96a5748d75e1df7e15466672bdc68eeb377b3e4e3e4fa61","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 = elig * Fraction(150198, 1000000) + nonelig * Fraction(90301, 1000000)\n    return cents(max(0, prog(taxable, br) - credit))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression credit-base 1', (40000, 0, 20000), 776539), ('regression credit-base 2', (100000, 10000, 0), 1829727),\n  ('partial repair guard 2', (80000, 15000, 15000), 1678221), ('control: wages only', (50000, 0, 0), 750000),\n  ('control: eligible dividends only', (0, 10000, 0), 0), ('control: high income', (250000, 50000, 10000), 7337865)],\n [('regression credit-base 1', (0, 10000, 0), 0), ('regression credit-base 2', (80000, 15000, 15000), 1678221),\n  ('partial repair guard 1', (250000, 50000, 10000), 7337865), ('partial repair guard 2', (20000, 78584, 5000), 886535),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539), ('control: wages only', (50000, 0, 0), 750000),\n  ('control: mixed', (100000, 10000, 0), 1829727)],\n [('regression credit-base 1', (250000, 50000, 10000), 7337865), ('regression credit-base 2', (50000, 3936, 0), 749892),\n  ('partial repair guard 1', (0, 0, 16293), 111858), ('partial repair guard 2', (100000, 0, 5000), 1808683),\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 credit-base 1', (0, 50000, 0), 70865), ('regression credit-base 2', (100000, 997, 0), 1750271),\n  ('partial repair guard 1', (0, 10000, 5000), 34054), ('partial repair guard 2', (0, 50000, 49145), 794917),\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 credit-base 1', (20000, 78584, 5000), 886535), ('regression credit-base 2', (0, 0, 16293), 111858),\n  ('partial repair guard 1', (20000, 1000, 5000), 334300), ('partial repair guard 2', (10606, 50000, 20000), 552096),\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)]]\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":"eb741410e10429549213af96535fb1d9123409f450939b648e5bf99967011133","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(max(0, prog(taxable, br) - credit))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression credit-base 1', (40000, 0, 20000), 776539), ('regression credit-base 2', (100000, 10000, 0), 1829727),\n  ('partial repair guard 2', (80000, 15000, 15000), 1678221), ('control: wages only', (50000, 0, 0), 750000),\n  ('control: eligible dividends only', (0, 10000, 0), 0), ('control: high income', (250000, 50000, 10000), 7337865)],\n [('regression credit-base 1', (0, 10000, 0), 0), ('regression credit-base 2', (80000, 15000, 15000), 1678221),\n  ('partial repair guard 1', (250000, 50000, 10000), 7337865), ('partial repair guard 2', (20000, 78584, 5000), 886535),\n  ('control: non-eligible dividends', (40000, 0, 20000), 776539), ('control: wages only', (50000, 0, 0), 750000),\n  ('control: mixed', (100000, 10000, 0), 1829727)],\n [('regression credit-base 1', (250000, 50000, 10000), 7337865), ('regression credit-base 2', (50000, 3936, 0), 749892),\n  ('partial repair guard 1', (0, 0, 16293), 111858), ('partial repair guard 2', (100000, 0, 5000), 1808683),\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 credit-base 1', (0, 50000, 0), 70865), ('regression credit-base 2', (100000, 997, 0), 1750271),\n  ('partial repair guard 1', (0, 10000, 5000), 34054), ('partial repair guard 2', (0, 50000, 49145), 794917),\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 credit-base 1', (20000, 78584, 5000), 886535), ('regression credit-base 2', (0, 0, 16293), 111858),\n  ('partial repair guard 1', (20000, 1000, 5000), 334300), ('partial repair guard 2', (10606, 50000, 20000), 552096),\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)]]\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-credit-base","generated_at":"2026-09-29T14:47:07.282451+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":"Apply the credit rates to the grossed-up amounts.","root_cause":"The credit rates are applied to the actual dividends.","sha256":"bfc481a5b76ad0a54731cb2bd39b560a2cb45fc1455762030487bb6c84450403","title":"The dividend tax credit is computed on the cash dividend instead of the grossed-up amount · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.16,"exit_code":1,"observations":[{"actual":803630,"check":"regression credit-base 1","expected":776539,"passed":false},{"actual":1829727,"check":"regression credit-base 2","expected":1829727,"passed":true},{"actual":1698539,"check":"partial repair guard 2","expected":1678221,"passed":false},{"actual":750000,"check":"control: wages only","expected":750000,"passed":true},{"actual":0,"check":"control: eligible dividends only","expected":0,"passed":true},{"actual":7351410,"check":"control: high income","expected":7337865,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression credit-base 1\", \"actual\": 803630, \"expected\": 776539, \"passed\": false}, {\"check\": \"regression credit-base 2\", \"actual\": 1829727, \"expected\": 1829727, \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": 1698539, \"expected\": 1678221, \"passed\": false}, {\"check\": \"control: wages only\", \"actual\": 750000, \"expected\": 750000, \"passed\": true}, {\"check\": \"control: eligible dividends only\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: high income\", \"actual\": 7351410, \"expected\": 7337865, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.817,"exit_code":1,"observations":[{"actual":803630,"check":"regression credit-base 1","expected":776539,"passed":false},{"actual":1886802,"check":"regression credit-base 2","expected":1829727,"passed":false},{"actual":1784152,"check":"partial repair guard 2","expected":1678221,"passed":false},{"actual":750000,"check":"control: wages only","expected":750000,"passed":true},{"actual":56802,"check":"control: eligible dividends only","expected":0,"passed":false},{"actual":7636786,"check":"control: high income","expected":7337865,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression credit-base 1\", \"actual\": 803630, \"expected\": 776539, \"passed\": false}, {\"check\": \"regression credit-base 2\", \"actual\": 1886802, \"expected\": 1829727, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 1784152, \"expected\": 1678221, \"passed\": false}, {\"check\": \"control: wages only\", \"actual\": 750000, \"expected\": 750000, \"passed\": true}, {\"check\": \"control: eligible dividends only\", \"actual\": 56802, \"expected\": 0, \"passed\": false}, {\"check\": \"control: high income\", \"actual\": 7636786, \"expected\": 7337865, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.352,"exit_code":0,"observations":[{"actual":776539,"check":"regression credit-base 1","expected":776539,"passed":true},{"actual":1829727,"check":"regression credit-base 2","expected":1829727,"passed":true},{"actual":1678221,"check":"partial repair guard 2","expected":1678221,"passed":true},{"actual":750000,"check":"control: wages only","expected":750000,"passed":true},{"actual":0,"check":"control: eligible dividends only","expected":0,"passed":true},{"actual":7337865,"check":"control: high income","expected":7337865,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression credit-base 1\", \"actual\": 776539, \"expected\": 776539, \"passed\": true}, {\"check\": \"regression credit-base 2\", \"actual\": 1829727, \"expected\": 1829727, \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": 1678221, \"expected\": 1678221, \"passed\": true}, {\"check\": \"control: wages only\", \"actual\": 750000, \"expected\": 750000, \"passed\": true}, {\"check\": \"control: eligible dividends only\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: high income\", \"actual\": 7337865, \"expected\": 7337865, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}