{"abstract":"Accounts spending exactly a tier threshold receive the lower discount.","category":"Shipping rate zone lookup","checks":8,"contract":"Cents. Weekly spend (dollars, may have cents) selects the discount: >= 5000 -> 25%, >= 2000 -> 18%, >= 500 -> 12%, else 0. Discount = list * pct / 100 rounded half up. Net is floored at the minimum charge, but never above the list rate. Return [pct, net].","contract_signature":"list_rate, spend, min_charge","evaluation_group":"w2-shipping-zone-contract-discount","failed_approach":"Rounding spend to whole dollars promotes accounts that fall a few cents short.","family":"w2-shipping-zone-contract-discount-tier-boundary","id":"FA-95671","implementations":{"attempt":{"sha256":"edbfc6bcf4188a1ddeffc9b69b8968eca8fe7a55ab486ba78fa11a603cd819ab","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(list_rate, spend, min_charge):\n    pct = 0\n    for limit, p in ((5000, 25), (2000, 18), (500, 12)):\n        if round(spend) >= limit:\n            pct = p\n            break\n    disc = (list_rate * pct + 50) // 100\n    net = list_rate - disc\n    floor_amt = min(min_charge, list_rate)\n    return [pct, max(net, floor_amt)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['tier edge', [1000, 2000, 500], [18, 820]], ['generated mix 1', [700, 499.99, 500], [0, 700]], ['just under tier', [1000, 1999.6, 500], [12, 880]], ['half cent discount', [1025, 2000, 500], [18, 840]], ['minimum capped by list', [700, 6000, 900], [25, 700]], ['top tier', [1000, 6000, 500], [25, 750]], ['generated mix 7', [2000, 100, 0], [0, 2000]], ['generated mix 15', [1250, 8000, 900], [25, 937]]], [['generated mix 20', [4999, 5000, 500], [25, 3749]], ['generated mix 14', [4999, 1999.6, 1200], [12, 4399]], ['half cent discount', [1025, 2000, 500], [18, 840]], ['minimum capped by list', [700, 6000, 900], [25, 700]], ['tier edge', [1000, 2000, 500], [18, 820]], ['top tier', [1000, 6000, 500], [25, 750]], ['generated mix 9', [1000, 500, 900], [12, 900]], ['generated mix 18', [700, 8000, 0], [25, 525]]], [['generated mix 34', [700, 500, 900], [12, 700]], ['generated mix 31', [700, 4999.5, 900], [18, 700]], ['no discount', [1000, 100, 500], [0, 1000]], ['just under tier', [1000, 1999.6, 500], [12, 880]], ['half cent discount', [1025, 2000, 500], [18, 840]], ['minimum capped by list', [700, 6000, 900], [25, 700]], ['generated mix 20', [4999, 5000, 500], [25, 3749]], ['generated mix 28', [1333, 2000, 1200], [18, 1200]]], [['generated mix 62', [2000, 2000, 0], [18, 1640]], ['generated mix 41', [1025, 499.99, 0], [0, 1025]], ['top tier', [1000, 6000, 500], [25, 750]], ['minimum applies', [1000, 6000, 900], [25, 900]], ['no discount', [1000, 100, 500], [0, 1000]], ['just under tier', [1000, 1999.6, 500], [12, 880]], ['generated mix 31', [700, 4999.5, 900], [18, 700]], ['generated mix 39', [700, 1999.6, 1200], [12, 700]]], [['generated mix 75', [1025, 500, 500], [12, 902]], ['generated mix 52', [1333, 1999.6, 500], [12, 1173]], ['minimum capped by list', [700, 6000, 900], [25, 700]], ['tier edge', [1000, 2000, 500], [18, 820]], ['top tier', [1000, 6000, 500], [25, 750]], ['minimum applies', [1000, 6000, 900], [25, 900]], ['generated mix 42', [1025, 1999.6, 500], [12, 902]], ['generated mix 50', [1025, 2000, 500], [18, 840]]]]\nfor label, args, expected in fixtures[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":"2db55d03856195ff3dc9a2f269348faef02ab6e766ddf67b61e883f8796f3c53","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(list_rate, spend, min_charge):\n    pct = 0\n    for limit, p in ((5000, 25), (2000, 18), (500, 12)):\n        if spend > limit:\n            pct = p\n            break\n    disc = (list_rate * pct + 50) // 100\n    net = list_rate - disc\n    floor_amt = min(min_charge, list_rate)\n    return [pct, max(net, floor_amt)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['tier edge', [1000, 2000, 500], [18, 820]], ['generated mix 1', [700, 499.99, 500], [0, 700]], ['just under tier', [1000, 1999.6, 500], [12, 880]], ['half cent discount', [1025, 2000, 500], [18, 840]], ['minimum capped by list', [700, 6000, 900], [25, 700]], ['top tier', [1000, 6000, 500], [25, 750]], ['generated mix 7', [2000, 100, 0], [0, 2000]], ['generated mix 15', [1250, 8000, 900], [25, 937]]], [['generated mix 20', [4999, 5000, 500], [25, 3749]], ['generated mix 14', [4999, 1999.6, 1200], [12, 4399]], ['half cent discount', [1025, 2000, 500], [18, 840]], ['minimum capped by list', [700, 6000, 900], [25, 700]], ['tier edge', [1000, 2000, 500], [18, 820]], ['top tier', [1000, 6000, 500], [25, 750]], ['generated mix 9', [1000, 500, 900], [12, 900]], ['generated mix 18', [700, 8000, 0], [25, 525]]], [['generated mix 34', [700, 500, 900], [12, 700]], ['generated mix 31', [700, 4999.5, 900], [18, 700]], ['no discount', [1000, 100, 500], [0, 1000]], ['just under tier', [1000, 1999.6, 500], [12, 880]], ['half cent discount', [1025, 2000, 500], [18, 840]], ['minimum capped by list', [700, 6000, 900], [25, 700]], ['generated mix 20', [4999, 5000, 500], [25, 3749]], ['generated mix 28', [1333, 2000, 1200], [18, 1200]]], [['generated mix 62', [2000, 2000, 0], [18, 1640]], ['generated mix 41', [1025, 499.99, 0], [0, 1025]], ['top tier', [1000, 6000, 500], [25, 750]], ['minimum applies', [1000, 6000, 900], [25, 900]], ['no discount', [1000, 100, 500], [0, 1000]], ['just under tier', [1000, 1999.6, 500], [12, 880]], ['generated mix 31', [700, 4999.5, 900], [18, 700]], ['generated mix 39', [700, 1999.6, 1200], [12, 700]]], [['generated mix 75', [1025, 500, 500], [12, 902]], ['generated mix 52', [1333, 1999.6, 500], [12, 1173]], ['minimum capped by list', [700, 6000, 900], [25, 700]], ['tier edge', [1000, 2000, 500], [18, 820]], ['top tier', [1000, 6000, 500], [25, 750]], ['minimum applies', [1000, 6000, 900], [25, 900]], ['generated mix 42', [1025, 1999.6, 500], [12, 902]], ['generated mix 50', [1025, 2000, 500], [18, 840]]]]\nfor label, args, expected in fixtures[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":"Stipulated tiers; no earned incentive periods. 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-shipping-zone-contract-discount-tier-boundary","generated_at":"2026-09-29T14:52:15.800875+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Contract pricing discounts list rates by volume tier subject to a minimum.","root_cause":"The tier test is strict at the spend threshold.","sha256":"5d4d68e831e7d55ba9f61dd87200626ae93d238942a0917b1897d0001b63be41","title":"Contract discount: spend on threshold gets lower tier · 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":37.031,"exit_code":1,"observations":[{"actual":[18,820],"check":"tier edge","expected":[18,820],"passed":true},{"actual":[12,616],"check":"generated mix 1","expected":[0,700],"passed":false},{"actual":[18,820],"check":"just under tier","expected":[12,880],"passed":false},{"actual":[18,840],"check":"half cent discount","expected":[18,840],"passed":true},{"actual":[25,700],"check":"minimum capped by list","expected":[25,700],"passed":true},{"actual":[25,750],"check":"top tier","expected":[25,750],"passed":true},{"actual":[0,2000],"check":"generated mix 7","expected":[0,2000],"passed":true},{"actual":[25,937],"check":"generated mix 15","expected":[25,937],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"tier edge\", \"actual\": [18, 820], \"expected\": [18, 820], \"passed\": true}, {\"check\": \"generated mix 1\", \"actual\": [12, 616], \"expected\": [0, 700], \"passed\": false}, {\"check\": \"just under tier\", \"actual\": [18, 820], \"expected\": [12, 880], \"passed\": false}, {\"check\": \"half cent discount\", \"actual\": [18, 840], \"expected\": [18, 840], \"passed\": true}, {\"check\": \"minimum capped by list\", \"actual\": [25, 700], \"expected\": [25, 700], \"passed\": true}, {\"check\": \"top tier\", \"actual\": [25, 750], \"expected\": [25, 750], \"passed\": true}, {\"check\": \"generated mix 7\", \"actual\": [0, 2000], \"expected\": [0, 2000], \"passed\": true}, {\"check\": \"generated mix 15\", \"actual\": [25, 937], \"expected\": [25, 937], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.927,"exit_code":1,"observations":[{"actual":[12,880],"check":"tier edge","expected":[18,820],"passed":false},{"actual":[0,700],"check":"generated mix 1","expected":[0,700],"passed":true},{"actual":[12,880],"check":"just under tier","expected":[12,880],"passed":true},{"actual":[12,902],"check":"half cent discount","expected":[18,840],"passed":false},{"actual":[25,700],"check":"minimum capped by list","expected":[25,700],"passed":true},{"actual":[25,750],"check":"top tier","expected":[25,750],"passed":true},{"actual":[0,2000],"check":"generated mix 7","expected":[0,2000],"passed":true},{"actual":[25,937],"check":"generated mix 15","expected":[25,937],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"tier edge\", \"actual\": [12, 880], \"expected\": [18, 820], \"passed\": false}, {\"check\": \"generated mix 1\", \"actual\": [0, 700], \"expected\": [0, 700], \"passed\": true}, {\"check\": \"just under tier\", \"actual\": [12, 880], \"expected\": [12, 880], \"passed\": true}, {\"check\": \"half cent discount\", \"actual\": [12, 902], \"expected\": [18, 840], \"passed\": false}, {\"check\": \"minimum capped by list\", \"actual\": [25, 700], \"expected\": [25, 700], \"passed\": true}, {\"check\": \"top tier\", \"actual\": [25, 750], \"expected\": [25, 750], \"passed\": true}, {\"check\": \"generated mix 7\", \"actual\": [0, 2000], \"expected\": [0, 2000], \"passed\": true}, {\"check\": \"generated mix 15\", \"actual\": [25, 937], \"expected\": [25, 937], \"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."}}