{"abstract":"Shipments entered with country \"UK\" are rated as rest of world or refused for economy.","category":"Shipping rate zone lookup","checks":8,"contract":"country is an ISO alpha-2 code in any case with optional whitespace; \"UK\" is an alias of GB. US territories (US, PR, GU, VI, AS, MP) are DOMESTIC; embargoed CU, KP, IR, SY are BLOCKED. Listed countries map to groups 1-6; any other two-letter code is group 9; anything else INVALID. ECON is not offered to group 9 (NO_SERVICE). Return \"Z<group>\".","contract_signature":"country, service","evaluation_group":"w2-shipping-zone-intl-groups","failed_approach":"Mapping GB to UK breaks the canonical code instead.","family":"w2-shipping-zone-intl-groups-uk-alias","id":"FA-95521","implementations":{"attempt":{"sha256":"af975f788079c2488a6cef349bebaa8ab1ebd95ca887bc521962d645df56bd78","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(country, service):\n    GROUPS = {'CA': 1, 'MX': 2, 'GB': 3, 'DE': 3, 'FR': 3, 'IE': 3, 'NL': 3, 'JP': 4, 'AU': 5, 'BR': 6}\n    DOMESTIC = {'US', 'PR', 'GU', 'VI', 'AS', 'MP'}\n    EMBARGO = {'CU', 'KP', 'IR', 'SY'}\n    code = country.strip().upper()\n    if code == 'GB':\n        code = 'UK'\n    if code in DOMESTIC:\n        return 'DOMESTIC'\n    if code in EMBARGO:\n        return 'BLOCKED'\n    zone = GROUPS.get(code)\n    if zone is None:\n        if len(code) == 2 and code.isalpha():\n            zone = 9\n        else:\n            return 'INVALID'\n    if service == 'ECON' and zone == 9:\n        return 'NO_SERVICE'\n    return 'Z%d' % zone\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['uk alias', ['uk', 'ECON'], 'Z3'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['priority rest of world', ['ZA', 'PRIORITY'], 'Z9'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['territory', ['PR', 'ECON'], 'DOMESTIC'], ['generated mix 4', [' 12 ', 'ECON'], 'INVALID'], ['generated mix 12', ['PR ', 'ECON'], 'DOMESTIC']], [['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 17', [' Uk', 'PRIORITY'], 'Z3'], ['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['alpha3 invalid', ['USA', 'PRIORITY'], 'INVALID'], ['embargo lowercase', ['cu', 'PRIORITY'], 'BLOCKED'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['generated mix 7', ['uk\\n', 'ECON'], 'Z3'], ['generated mix 15', ['\\tBR', 'PRIORITY'], 'Z6']], [['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 43', ['\\tgb\\n', 'PRIORITY'], 'Z3'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['canada econ', ['CA', 'ECON'], 'Z1'], ['territory', ['PR', 'ECON'], 'DOMESTIC'], ['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['generated mix 18', [' US\\n', 'ECON'], 'DOMESTIC'], ['generated mix 26', ['\\tau\\n', 'PRIORITY'], 'Z5']], [['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 6', ['\\tUK', 'PRIORITY'], 'Z3'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['priority rest of world', ['ZA', 'PRIORITY'], 'Z9'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['generated mix 30', ['JP\\n', 'PRIORITY'], 'Z4'], ['generated mix 38', ['\\tBR\\n', 'PRIORITY'], 'Z6']], [['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 28', ['\\tgb\\n', 'ECON'], 'Z3'], ['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['alpha3 invalid', ['USA', 'PRIORITY'], 'INVALID'], ['embargo lowercase', ['cu', 'PRIORITY'], 'BLOCKED'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['generated mix 41', [' ZA ', 'PRIORITY'], 'Z9'], ['generated mix 49', [' de', 'ECON'], 'Z3']]]\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":"8e6b2f965468fcb3b7c148c881e7a4f46b32161bbe2c08dc4d8dd4d9c64279b8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(country, service):\n    GROUPS = {'CA': 1, 'MX': 2, 'GB': 3, 'DE': 3, 'FR': 3, 'IE': 3, 'NL': 3, 'JP': 4, 'AU': 5, 'BR': 6}\n    DOMESTIC = {'US', 'PR', 'GU', 'VI', 'AS', 'MP'}\n    EMBARGO = {'CU', 'KP', 'IR', 'SY'}\n    code = country.strip().upper()\n    if code in DOMESTIC:\n        return 'DOMESTIC'\n    if code in EMBARGO:\n        return 'BLOCKED'\n    zone = GROUPS.get(code)\n    if zone is None:\n        if len(code) == 2 and code.isalpha():\n            zone = 9\n        else:\n            return 'INVALID'\n    if service == 'ECON' and zone == 9:\n        return 'NO_SERVICE'\n    return 'Z%d' % zone\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['uk alias', ['uk', 'ECON'], 'Z3'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['priority rest of world', ['ZA', 'PRIORITY'], 'Z9'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['territory', ['PR', 'ECON'], 'DOMESTIC'], ['generated mix 4', [' 12 ', 'ECON'], 'INVALID'], ['generated mix 12', ['PR ', 'ECON'], 'DOMESTIC']], [['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 17', [' Uk', 'PRIORITY'], 'Z3'], ['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['alpha3 invalid', ['USA', 'PRIORITY'], 'INVALID'], ['embargo lowercase', ['cu', 'PRIORITY'], 'BLOCKED'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['generated mix 7', ['uk\\n', 'ECON'], 'Z3'], ['generated mix 15', ['\\tBR', 'PRIORITY'], 'Z6']], [['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 43', ['\\tgb\\n', 'PRIORITY'], 'Z3'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['canada econ', ['CA', 'ECON'], 'Z1'], ['territory', ['PR', 'ECON'], 'DOMESTIC'], ['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['generated mix 18', [' US\\n', 'ECON'], 'DOMESTIC'], ['generated mix 26', ['\\tau\\n', 'PRIORITY'], 'Z5']], [['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 6', ['\\tUK', 'PRIORITY'], 'Z3'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['priority rest of world', ['ZA', 'PRIORITY'], 'Z9'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['generated mix 30', ['JP\\n', 'PRIORITY'], 'Z4'], ['generated mix 38', ['\\tBR\\n', 'PRIORITY'], 'Z6']], [['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 28', ['\\tgb\\n', 'ECON'], 'Z3'], ['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['alpha3 invalid', ['USA', 'PRIORITY'], 'INVALID'], ['embargo lowercase', ['cu', 'PRIORITY'], 'BLOCKED'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['generated mix 41', [' ZA ', 'PRIORITY'], 'Z9'], ['generated mix 49', [' de', 'ECON'], 'Z3']]]\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 country table; not a sanctions or carrier coverage list. 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-intl-groups-uk-alias","generated_at":"2026-09-29T14:52:14.393975+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"International rating maps destination countries to zone groups.","root_cause":"The common UK alias is not mapped to GB.","sha256":"fe8beccbd7030c6eeae0ece36d4d13f9f150c0ac24ffbe3590b668435ff3cf14","title":"International zones: UK treated as unknown country · 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":43.041,"exit_code":1,"observations":[{"actual":"NO_SERVICE","check":"uk alias","expected":"Z3","passed":false},{"actual":"Z9","check":"padded lowercase","expected":"Z3","passed":false},{"actual":"DOMESTIC","check":"pacific territory","expected":"DOMESTIC","passed":true},{"actual":"Z9","check":"priority rest of world","expected":"Z9","passed":true},{"actual":"INVALID","check":"digits invalid","expected":"INVALID","passed":true},{"actual":"DOMESTIC","check":"territory","expected":"DOMESTIC","passed":true},{"actual":"INVALID","check":"generated mix 4","expected":"INVALID","passed":true},{"actual":"DOMESTIC","check":"generated mix 12","expected":"DOMESTIC","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"uk alias\", \"actual\": \"NO_SERVICE\", \"expected\": \"Z3\", \"passed\": false}, {\"check\": \"padded lowercase\", \"actual\": \"Z9\", \"expected\": \"Z3\", \"passed\": false}, {\"check\": \"pacific territory\", \"actual\": \"DOMESTIC\", \"expected\": \"DOMESTIC\", \"passed\": true}, {\"check\": \"priority rest of world\", \"actual\": \"Z9\", \"expected\": \"Z9\", \"passed\": true}, {\"check\": \"digits invalid\", \"actual\": \"INVALID\", \"expected\": \"INVALID\", \"passed\": true}, {\"check\": \"territory\", \"actual\": \"DOMESTIC\", \"expected\": \"DOMESTIC\", \"passed\": true}, {\"check\": \"generated mix 4\", \"actual\": \"INVALID\", \"expected\": \"INVALID\", \"passed\": true}, {\"check\": \"generated mix 12\", \"actual\": \"DOMESTIC\", \"expected\": \"DOMESTIC\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.802,"exit_code":1,"observations":[{"actual":"NO_SERVICE","check":"uk alias","expected":"Z3","passed":false},{"actual":"Z3","check":"padded lowercase","expected":"Z3","passed":true},{"actual":"DOMESTIC","check":"pacific territory","expected":"DOMESTIC","passed":true},{"actual":"Z9","check":"priority rest of world","expected":"Z9","passed":true},{"actual":"INVALID","check":"digits invalid","expected":"INVALID","passed":true},{"actual":"DOMESTIC","check":"territory","expected":"DOMESTIC","passed":true},{"actual":"INVALID","check":"generated mix 4","expected":"INVALID","passed":true},{"actual":"DOMESTIC","check":"generated mix 12","expected":"DOMESTIC","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"uk alias\", \"actual\": \"NO_SERVICE\", \"expected\": \"Z3\", \"passed\": false}, {\"check\": \"padded lowercase\", \"actual\": \"Z3\", \"expected\": \"Z3\", \"passed\": true}, {\"check\": \"pacific territory\", \"actual\": \"DOMESTIC\", \"expected\": \"DOMESTIC\", \"passed\": true}, {\"check\": \"priority rest of world\", \"actual\": \"Z9\", \"expected\": \"Z9\", \"passed\": true}, {\"check\": \"digits invalid\", \"actual\": \"INVALID\", \"expected\": \"INVALID\", \"passed\": true}, {\"check\": \"territory\", \"actual\": \"DOMESTIC\", \"expected\": \"DOMESTIC\", \"passed\": true}, {\"check\": \"generated mix 4\", \"actual\": \"INVALID\", \"expected\": \"INVALID\", \"passed\": true}, {\"check\": \"generated mix 12\", \"actual\": \"DOMESTIC\", \"expected\": \"DOMESTIC\", \"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."}}