{"abstract":"A mistyped credit code disappears from the computation without an error.","category":"Tax bracket computation","checks":6,"contract":"solve(tax, credits): tax is integer cents >= 0; credits is a list of [kind, cents] with kind 'nonref' (nonrefundable, unused part lost), 'carry' (nonrefundable, unused part carried forward) or 'ref' (refundable). Unknown kinds return 'ERR:kind'. Apply all nonref credits first (limited to the remaining tax), then carry credits (limited to what remains), then refundable credits in full (a negative result is a refund). Return [final_tax, carryforward].","contract_signature":"tax, credits","evaluation_group":"w2-tax_bracket_computation-credit-ordering","failed_approach":"Treating unknown kinds as nonrefundable credits still accepts invalid input.","family":"w2-tax_bracket_computation-credit-ordering-unknown-credit-kind","id":"FA-62486","implementations":{"attempt":{"sha256":"56a7249361d831713dda6d54a268005848ff99aafb4ebf371c74188b2d709a23","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tax, credits):\n    tot = {'nonref': 0, 'carry': 0, 'ref': 0}\n    for kind, amount in credits:\n        tot[kind if kind in tot else 'nonref'] += amount\n    n, c, r = tot['nonref'], tot['carry'], tot['ref']\n    t = tax\n    use_n = min(n, t)\n    t -= use_n\n    use_c = min(c, t)\n    t -= use_c\n    cf = c - use_c\n    t -= r\n    return [t, cf]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression unknown-credit-kind 1', (100, [['bonus', 5]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (1000, [['other', 100]]), 'ERR:kind'),\n  ('control: all kinds', (1000, [['nonref', 400], ['carry', 800], ['ref', 300]]), [-300, 200]),\n  ('control: refund', (500, [['ref', 700]]), [-200, 0]), ('control: no tax carry', (0, [['carry', 50]]), [0, 50]),\n  ('control: nonref exceeds tax', (300, [['nonref', 500], ['ref', 100]]), [-100, 0])],\n [('regression unknown-credit-kind 1', (0, [['carry', 1689], ['ref', 50], ['nonref', 50], ['other', 300]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (1935, [['nonref', 100], ['ref', 0], ['ref', 0], ['other', 300]]), 'ERR:kind'),\n  ('control: unknown kind', (100, [['bonus', 5]]), 'ERR:kind'),\n  ('control: nonref exceeds tax', (300, [['nonref', 500], ['ref', 100]]), [-100, 0]),\n  ('control: split carries', (900, [['carry', 400], ['nonref', 600], ['carry', 100]]), [0, 200]),\n  ('control: empty', (1234, []), [1234, 0])],\n [('regression unknown-credit-kind 1', (0, [['other', 0], ['carry', 300], ['nonref', 50], ['ref', 1736]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (100, [['other', 50], ['ref', 50], ['ref', 182], ['carry', 300]]), 'ERR:kind'),\n  ('control: empty', (1234, []), [1234, 0]),\n  ('control: all kinds', (1000, [['nonref', 400], ['carry', 800], ['ref', 300]]), [-300, 200]),\n  ('control: refund', (500, [['ref', 700]]), [-200, 0]), ('control: no tax carry', (0, [['carry', 50]]), [0, 50])],\n [('regression unknown-credit-kind 1', (0, [['nonref', 300], ['nonref', 100], ['other', 300]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (100, [['ref', 1350], ['other', 1002]]), 'ERR:kind'),\n  ('control: no tax carry', (0, [['carry', 50]]), [0, 50]),\n  ('control: unknown kind', (100, [['bonus', 5]]), 'ERR:kind'),\n  ('control: nonref exceeds tax', (300, [['nonref', 500], ['ref', 100]]), [-100, 0]),\n  ('control: split carries', (900, [['carry', 400], ['nonref', 600], ['carry', 100]]), [0, 200])],\n [('regression unknown-credit-kind 1', (832, [['nonref', 100], ['other', 50]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (100, [['other', 50]]), 'ERR:kind'),\n  ('control: split carries', (900, [['carry', 400], ['nonref', 600], ['carry', 100]]), [0, 200]),\n  ('control: empty', (1234, []), [1234, 0]),\n  ('control: all kinds', (1000, [['nonref', 400], ['carry', 800], ['ref', 300]]), [-300, 200]),\n  ('control: refund', (500, [['ref', 700]]), [-200, 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":"5b00ad306e7ac041fa7b0bf241ad5deaf371a96ef192a0fec4f65930704aedb4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(tax, credits):\n    tot = {'nonref': 0, 'carry': 0, 'ref': 0}\n    for kind, amount in credits:\n        if kind in tot: tot[kind] += amount\n    n, c, r = tot['nonref'], tot['carry'], tot['ref']\n    t = tax\n    use_n = min(n, t)\n    t -= use_n\n    use_c = min(c, t)\n    t -= use_c\n    cf = c - use_c\n    t -= r\n    return [t, cf]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression unknown-credit-kind 1', (100, [['bonus', 5]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (1000, [['other', 100]]), 'ERR:kind'),\n  ('control: all kinds', (1000, [['nonref', 400], ['carry', 800], ['ref', 300]]), [-300, 200]),\n  ('control: refund', (500, [['ref', 700]]), [-200, 0]), ('control: no tax carry', (0, [['carry', 50]]), [0, 50]),\n  ('control: nonref exceeds tax', (300, [['nonref', 500], ['ref', 100]]), [-100, 0])],\n [('regression unknown-credit-kind 1', (0, [['carry', 1689], ['ref', 50], ['nonref', 50], ['other', 300]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (1935, [['nonref', 100], ['ref', 0], ['ref', 0], ['other', 300]]), 'ERR:kind'),\n  ('control: unknown kind', (100, [['bonus', 5]]), 'ERR:kind'),\n  ('control: nonref exceeds tax', (300, [['nonref', 500], ['ref', 100]]), [-100, 0]),\n  ('control: split carries', (900, [['carry', 400], ['nonref', 600], ['carry', 100]]), [0, 200]),\n  ('control: empty', (1234, []), [1234, 0])],\n [('regression unknown-credit-kind 1', (0, [['other', 0], ['carry', 300], ['nonref', 50], ['ref', 1736]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (100, [['other', 50], ['ref', 50], ['ref', 182], ['carry', 300]]), 'ERR:kind'),\n  ('control: empty', (1234, []), [1234, 0]),\n  ('control: all kinds', (1000, [['nonref', 400], ['carry', 800], ['ref', 300]]), [-300, 200]),\n  ('control: refund', (500, [['ref', 700]]), [-200, 0]), ('control: no tax carry', (0, [['carry', 50]]), [0, 50])],\n [('regression unknown-credit-kind 1', (0, [['nonref', 300], ['nonref', 100], ['other', 300]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (100, [['ref', 1350], ['other', 1002]]), 'ERR:kind'),\n  ('control: no tax carry', (0, [['carry', 50]]), [0, 50]),\n  ('control: unknown kind', (100, [['bonus', 5]]), 'ERR:kind'),\n  ('control: nonref exceeds tax', (300, [['nonref', 500], ['ref', 100]]), [-100, 0]),\n  ('control: split carries', (900, [['carry', 400], ['nonref', 600], ['carry', 100]]), [0, 200])],\n [('regression unknown-credit-kind 1', (832, [['nonref', 100], ['other', 50]]), 'ERR:kind'),\n  ('regression unknown-credit-kind 2', (100, [['other', 50]]), 'ERR:kind'),\n  ('control: split carries', (900, [['carry', 400], ['nonref', 600], ['carry', 100]]), [0, 200]),\n  ('control: empty', (1234, []), [1234, 0]),\n  ('control: all kinds', (1000, [['nonref', 400], ['carry', 800], ['ref', 300]]), [-300, 200]),\n  ('control: refund', (500, [['ref', 700]]), [-200, 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-credit-ordering-unknown-credit-kind","generated_at":"2026-09-29T14:47:05.143388+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":"Credits with unknown kinds are skipped.","sha256":"b17b7516e6be99f65e77224cfb7ea0fead05114ec1b497725de6b49e9e611768","title":"An unrecognised credit kind is silently ignored · 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":38.501,"exit_code":1,"observations":[{"actual":[95,0],"check":"regression unknown-credit-kind 1","expected":"ERR:kind","passed":false},{"actual":[900,0],"check":"regression unknown-credit-kind 2","expected":"ERR:kind","passed":false},{"actual":[-300,200],"check":"control: all kinds","expected":[-300,200],"passed":true},{"actual":[-200,0],"check":"control: refund","expected":[-200,0],"passed":true},{"actual":[0,50],"check":"control: no tax carry","expected":[0,50],"passed":true},{"actual":[-100,0],"check":"control: nonref exceeds tax","expected":[-100,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression unknown-credit-kind 1\", \"actual\": [95, 0], \"expected\": \"ERR:kind\", \"passed\": false}, {\"check\": \"regression unknown-credit-kind 2\", \"actual\": [900, 0], \"expected\": \"ERR:kind\", \"passed\": false}, {\"check\": \"control: all kinds\", \"actual\": [-300, 200], \"expected\": [-300, 200], \"passed\": true}, {\"check\": \"control: refund\", \"actual\": [-200, 0], \"expected\": [-200, 0], \"passed\": true}, {\"check\": \"control: no tax carry\", \"actual\": [0, 50], \"expected\": [0, 50], \"passed\": true}, {\"check\": \"control: nonref exceeds tax\", \"actual\": [-100, 0], \"expected\": [-100, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.234,"exit_code":1,"observations":[{"actual":[100,0],"check":"regression unknown-credit-kind 1","expected":"ERR:kind","passed":false},{"actual":[1000,0],"check":"regression unknown-credit-kind 2","expected":"ERR:kind","passed":false},{"actual":[-300,200],"check":"control: all kinds","expected":[-300,200],"passed":true},{"actual":[-200,0],"check":"control: refund","expected":[-200,0],"passed":true},{"actual":[0,50],"check":"control: no tax carry","expected":[0,50],"passed":true},{"actual":[-100,0],"check":"control: nonref exceeds tax","expected":[-100,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression unknown-credit-kind 1\", \"actual\": [100, 0], \"expected\": \"ERR:kind\", \"passed\": false}, {\"check\": \"regression unknown-credit-kind 2\", \"actual\": [1000, 0], \"expected\": \"ERR:kind\", \"passed\": false}, {\"check\": \"control: all kinds\", \"actual\": [-300, 200], \"expected\": [-300, 200], \"passed\": true}, {\"check\": \"control: refund\", \"actual\": [-200, 0], \"expected\": [-200, 0], \"passed\": true}, {\"check\": \"control: no tax carry\", \"actual\": [0, 50], \"expected\": [0, 50], \"passed\": true}, {\"check\": \"control: nonref exceeds tax\", \"actual\": [-100, 0], \"expected\": [-100, 0], \"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."}}