{"abstract":"MAGI 1 dollar over the threshold keeps the full credit.","category":"Tax bracket computation","checks":6,"contract":"solve(kids, others, magi, status, tax, earned): stipulated child credit, whole dollars. Credit = 2000 per child + 500 per other dependent, reduced by 50 for each 1000 or fraction thereof of MAGI above the threshold (single 200000, mfj 400000), floored at 0. The credit first offsets tax (used = min(credit, tax)); the refundable portion is min(credit - used, 1700 per child, 15% of earned income above 2500 rounded down, floored at 0). Return [credit, used, refundable].","contract_signature":"kids, others, magi, status, tax, earned","evaluation_group":"w2-tax_bracket_computation-child-credit-phaseout","failed_approach":"Rounding the step count to nearest still ignores fractions below one half.","family":"w2-tax_bracket_computation-child-credit-phaseout-fraction-thereof","id":"FA-62816","implementations":{"attempt":{"sha256":"15b0a15ed2cff9fc2855731fd733ed1ab6f1165cf808daa5ba102a5e00fdb990","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kids, others, magi, status, tax, earned):\n    thr = {'single': 200000, 'mfj': 400000}[status]\n    credit = 2000 * kids + 500 * others\n    if magi > thr: credit = max(0, credit - 50 * (((magi - thr + 500) // 1000)))\n    used = min(credit, tax)\n    refundable = min(credit - used, 1700 * kids, max(0, (earned - 2500) * 15 // 100))\n    return [credit, used, refundable]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression fraction-thereof 1', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),\n  ('regression fraction-thereof 2', (2, 0, 200400, 'single', 10000, 200000), [3950, 3950, 0]),\n  ('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),\n  ('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),\n  ('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),\n  ('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100])],\n [('regression fraction-thereof 1', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),\n  ('regression fraction-thereof 2', (3, 2, 200001, 'single', 5000, 2000), [6950, 5000, 0]),\n  ('partial repair guard 2', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),\n  ('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),\n  ('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),\n  ('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),\n  ('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000])],\n [('regression fraction-thereof 1', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),\n  ('regression fraction-thereof 2', (3, 0, 200001, 'single', 1000, 47030), [5950, 1000, 4950]),\n  ('partial repair guard 2', (3, 0, 243227, 'single', 0, 10000), [3800, 0, 1125]),\n  ('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),\n  ('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),\n  ('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),\n  ('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125])],\n [('regression fraction-thereof 1', (3, 0, 243227, 'single', 0, 10000), [3800, 0, 1125]),\n  ('regression fraction-thereof 2', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),\n  ('partial repair guard 1', (3, 2, 200001, 'single', 10000, 3000), [6950, 6950, 0]),\n  ('partial repair guard 2', (1, 0, 400001, 'mfj', 5000, 42362), [1950, 1950, 0]),\n  ('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),\n  ('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),\n  ('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),\n  ('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0])],\n [('regression fraction-thereof 1', (3, 2, 200001, 'single', 10000, 3000), [6950, 6950, 0]),\n  ('regression fraction-thereof 2', (1, 0, 400001, 'mfj', 5000, 42362), [1950, 1950, 0]),\n  ('partial repair guard 1', (2, 2, 200001, 'single', 500, 2000), [4950, 500, 0]),\n  ('partial repair guard 2', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),\n  ('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),\n  ('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),\n  ('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),\n  ('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0])]]\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":"e897ef0a1c4ac3d7aa874cbc373441a229107dbb296c4ad4536aea1cd3e17c35","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kids, others, magi, status, tax, earned):\n    thr = {'single': 200000, 'mfj': 400000}[status]\n    credit = 2000 * kids + 500 * others\n    if magi > thr: credit = max(0, credit - 50 * ((magi - thr) // 1000))\n    used = min(credit, tax)\n    refundable = min(credit - used, 1700 * kids, max(0, (earned - 2500) * 15 // 100))\n    return [credit, used, refundable]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression fraction-thereof 1', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),\n  ('regression fraction-thereof 2', (2, 0, 200400, 'single', 10000, 200000), [3950, 3950, 0]),\n  ('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),\n  ('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),\n  ('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),\n  ('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100])],\n [('regression fraction-thereof 1', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),\n  ('regression fraction-thereof 2', (3, 2, 200001, 'single', 5000, 2000), [6950, 5000, 0]),\n  ('partial repair guard 2', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),\n  ('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),\n  ('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),\n  ('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),\n  ('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000])],\n [('regression fraction-thereof 1', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),\n  ('regression fraction-thereof 2', (3, 0, 200001, 'single', 1000, 47030), [5950, 1000, 4950]),\n  ('partial repair guard 2', (3, 0, 243227, 'single', 0, 10000), [3800, 0, 1125]),\n  ('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),\n  ('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),\n  ('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),\n  ('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125])],\n [('regression fraction-thereof 1', (3, 0, 243227, 'single', 0, 10000), [3800, 0, 1125]),\n  ('regression fraction-thereof 2', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),\n  ('partial repair guard 1', (3, 2, 200001, 'single', 10000, 3000), [6950, 6950, 0]),\n  ('partial repair guard 2', (1, 0, 400001, 'mfj', 5000, 42362), [1950, 1950, 0]),\n  ('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),\n  ('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),\n  ('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),\n  ('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0])],\n [('regression fraction-thereof 1', (3, 2, 200001, 'single', 10000, 3000), [6950, 6950, 0]),\n  ('regression fraction-thereof 2', (1, 0, 400001, 'mfj', 5000, 42362), [1950, 1950, 0]),\n  ('partial repair guard 1', (2, 2, 200001, 'single', 500, 2000), [4950, 500, 0]),\n  ('partial repair guard 2', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),\n  ('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),\n  ('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),\n  ('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),\n  ('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0])]]\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-child-credit-phaseout-fraction-thereof","generated_at":"2026-09-29T14:47:08.255440+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 number of reduction steps uses floor division instead of 'or fraction thereof'.","sha256":"b73a7bbf7f678355344456c68e8d91f9e6558859cf06c3c7f4f5fcaf5108e3f2","title":"Partial thousands above the threshold do not reduce the credit · 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":42.7,"exit_code":1,"observations":[{"actual":[4450,4450,0],"check":"regression fraction-thereof 1","expected":[4400,4400,0],"passed":false},{"actual":[4000,4000,0],"check":"regression fraction-thereof 2","expected":[3950,3950,0],"passed":false},{"actual":[4000,1000,3000],"check":"control: refund limited by child cap","expected":[4000,1000,3000],"passed":true},{"actual":[2000,0,1125],"check":"control: earned limit","expected":[2000,0,1125],"passed":true},{"actual":[0,0,0],"check":"control: fully phased","expected":[0,0,0],"passed":true},{"actual":[6450,1000,5100],"check":"control: joint partial phase-out","expected":[6450,1000,5100],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression fraction-thereof 1\", \"actual\": [4450, 4450, 0], \"expected\": [4400, 4400, 0], \"passed\": false}, {\"check\": \"regression fraction-thereof 2\", \"actual\": [4000, 4000, 0], \"expected\": [3950, 3950, 0], \"passed\": false}, {\"check\": \"control: refund limited by child cap\", \"actual\": [4000, 1000, 3000], \"expected\": [4000, 1000, 3000], \"passed\": true}, {\"check\": \"control: earned limit\", \"actual\": [2000, 0, 1125], \"expected\": [2000, 0, 1125], \"passed\": true}, {\"check\": \"control: fully phased\", \"actual\": [0, 0, 0], \"expected\": [0, 0, 0], \"passed\": true}, {\"check\": \"control: joint partial phase-out\", \"actual\": [6450, 1000, 5100], \"expected\": [6450, 1000, 5100], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.697,"exit_code":1,"observations":[{"actual":[4450,4450,0],"check":"regression fraction-thereof 1","expected":[4400,4400,0],"passed":false},{"actual":[4000,4000,0],"check":"regression fraction-thereof 2","expected":[3950,3950,0],"passed":false},{"actual":[4000,1000,3000],"check":"control: refund limited by child cap","expected":[4000,1000,3000],"passed":true},{"actual":[2000,0,1125],"check":"control: earned limit","expected":[2000,0,1125],"passed":true},{"actual":[0,0,0],"check":"control: fully phased","expected":[0,0,0],"passed":true},{"actual":[6500,1000,5100],"check":"control: joint partial phase-out","expected":[6450,1000,5100],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression fraction-thereof 1\", \"actual\": [4450, 4450, 0], \"expected\": [4400, 4400, 0], \"passed\": false}, {\"check\": \"regression fraction-thereof 2\", \"actual\": [4000, 4000, 0], \"expected\": [3950, 3950, 0], \"passed\": false}, {\"check\": \"control: refund limited by child cap\", \"actual\": [4000, 1000, 3000], \"expected\": [4000, 1000, 3000], \"passed\": true}, {\"check\": \"control: earned limit\", \"actual\": [2000, 0, 1125], \"expected\": [2000, 0, 1125], \"passed\": true}, {\"check\": \"control: fully phased\", \"actual\": [0, 0, 0], \"expected\": [0, 0, 0], \"passed\": true}, {\"check\": \"control: joint partial phase-out\", \"actual\": [6500, 1000, 5100], \"expected\": [6450, 1000, 5100], \"passed\": false}], \"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."}}