{"abstract":"Valid but unlisted countries are reported INVALID instead of rest of world.","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":"Defaulting the lookup to 9 also accepts malformed codes.","family":"w2-shipping-zone-intl-groups-rest-of-world","id":"FA-95541","implementations":{"attempt":{"sha256":"1d0aa3e651ffab91f5cdca3250511136c14c308db03de5edaebd5f444475b808","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 == 'UK':\n        code = 'GB'\n    if code in DOMESTIC:\n        return 'DOMESTIC'\n    if code in EMBARGO:\n        return 'BLOCKED'\n    zone = GROUPS.get(code, 9)\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 = [[['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['territory', ['PR', 'ECON'], 'DOMESTIC'], ['priority rest of world', ['ZA', 'PRIORITY'], 'Z9'], ['embargo lowercase', ['cu', 'PRIORITY'], 'BLOCKED'], ['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 5', ['\\tcu ', 'ECON'], 'BLOCKED']], [['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['generated mix 24', ['USA ', 'PRIORITY'], 'INVALID'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['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']], [['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['generated mix 53', [' USA ', 'ECON'], 'INVALID'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['canada econ', ['CA', 'ECON'], 'Z1'], ['uk alias', ['uk', 'ECON'], 'Z3'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['generated mix 18', [' US\\n', 'ECON'], 'DOMESTIC'], ['generated mix 26', ['\\tau\\n', 'PRIORITY'], 'Z5']], [['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['uk alias', ['uk', 'ECON'], 'Z3'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['alpha3 invalid', ['USA', 'PRIORITY'], 'INVALID'], ['canada econ', ['CA', 'ECON'], 'Z1'], ['generated mix 30', ['JP\\n', 'PRIORITY'], 'Z4'], ['generated mix 38', ['\\tBR\\n', 'PRIORITY'], 'Z6']], [['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['generated mix 24', ['USA ', 'PRIORITY'], 'INVALID'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['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":"fef6270b3dff531ed865c5826ed9c5c0c6d318b88db88b7a180a007580f04439","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 == 'UK':\n        code = 'GB'\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            return 'INVALID'\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 = [[['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['padded lowercase', [' gb ', 'PRIORITY'], 'Z3'], ['territory', ['PR', 'ECON'], 'DOMESTIC'], ['priority rest of world', ['ZA', 'PRIORITY'], 'Z9'], ['embargo lowercase', ['cu', 'PRIORITY'], 'BLOCKED'], ['uk alias', ['uk', 'ECON'], 'Z3'], ['generated mix 5', ['\\tcu ', 'ECON'], 'BLOCKED']], [['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['generated mix 24', ['USA ', 'PRIORITY'], 'INVALID'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['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']], [['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['generated mix 53', [' USA ', 'ECON'], 'INVALID'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['canada econ', ['CA', 'ECON'], 'Z1'], ['uk alias', ['uk', 'ECON'], 'Z3'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['generated mix 18', [' US\\n', 'ECON'], 'DOMESTIC'], ['generated mix 26', ['\\tau\\n', 'PRIORITY'], 'Z5']], [['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['digits invalid', ['12', 'PRIORITY'], 'INVALID'], ['uk alias', ['uk', 'ECON'], 'Z3'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['alpha3 invalid', ['USA', 'PRIORITY'], 'INVALID'], ['canada econ', ['CA', 'ECON'], 'Z1'], ['generated mix 30', ['JP\\n', 'PRIORITY'], 'Z4'], ['generated mix 38', ['\\tBR\\n', 'PRIORITY'], 'Z6']], [['econ rest of world', ['ZA', 'ECON'], 'NO_SERVICE'], ['generated mix 24', ['USA ', 'PRIORITY'], 'INVALID'], ['pacific territory', ['GU', 'PRIORITY'], 'DOMESTIC'], ['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-rest-of-world","generated_at":"2026-09-29T14:52:14.617494+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 rest-of-world fallback is replaced by rejection.","sha256":"99c9717412a6097bfc8baffa5f927bd1d806bb63aca4d29de877591e9804238c","title":"International zones: unlisted countries rejected · 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":39.539,"exit_code":1,"observations":[{"actual":"NO_SERVICE","check":"econ rest of world","expected":"NO_SERVICE","passed":true},{"actual":"Z9","check":"digits invalid","expected":"INVALID","passed":false},{"actual":"Z3","check":"padded lowercase","expected":"Z3","passed":true},{"actual":"DOMESTIC","check":"territory","expected":"DOMESTIC","passed":true},{"actual":"Z9","check":"priority rest of world","expected":"Z9","passed":true},{"actual":"BLOCKED","check":"embargo lowercase","expected":"BLOCKED","passed":true},{"actual":"Z3","check":"uk alias","expected":"Z3","passed":true},{"actual":"BLOCKED","check":"generated mix 5","expected":"BLOCKED","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"econ rest of world\", \"actual\": \"NO_SERVICE\", \"expected\": \"NO_SERVICE\", \"passed\": true}, {\"check\": \"digits invalid\", \"actual\": \"Z9\", \"expected\": \"INVALID\", \"passed\": false}, {\"check\": \"padded lowercase\", \"actual\": \"Z3\", \"expected\": \"Z3\", \"passed\": true}, {\"check\": \"territory\", \"actual\": \"DOMESTIC\", \"expected\": \"DOMESTIC\", \"passed\": true}, {\"check\": \"priority rest of world\", \"actual\": \"Z9\", \"expected\": \"Z9\", \"passed\": true}, {\"check\": \"embargo lowercase\", \"actual\": \"BLOCKED\", \"expected\": \"BLOCKED\", \"passed\": true}, {\"check\": \"uk alias\", \"actual\": \"Z3\", \"expected\": \"Z3\", \"passed\": true}, {\"check\": \"generated mix 5\", \"actual\": \"BLOCKED\", \"expected\": \"BLOCKED\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.178,"exit_code":1,"observations":[{"actual":"INVALID","check":"econ rest of world","expected":"NO_SERVICE","passed":false},{"actual":"INVALID","check":"digits invalid","expected":"INVALID","passed":true},{"actual":"Z3","check":"padded lowercase","expected":"Z3","passed":true},{"actual":"DOMESTIC","check":"territory","expected":"DOMESTIC","passed":true},{"actual":"INVALID","check":"priority rest of world","expected":"Z9","passed":false},{"actual":"BLOCKED","check":"embargo lowercase","expected":"BLOCKED","passed":true},{"actual":"Z3","check":"uk alias","expected":"Z3","passed":true},{"actual":"BLOCKED","check":"generated mix 5","expected":"BLOCKED","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"econ rest of world\", \"actual\": \"INVALID\", \"expected\": \"NO_SERVICE\", \"passed\": false}, {\"check\": \"digits invalid\", \"actual\": \"INVALID\", \"expected\": \"INVALID\", \"passed\": true}, {\"check\": \"padded lowercase\", \"actual\": \"Z3\", \"expected\": \"Z3\", \"passed\": true}, {\"check\": \"territory\", \"actual\": \"DOMESTIC\", \"expected\": \"DOMESTIC\", \"passed\": true}, {\"check\": \"priority rest of world\", \"actual\": \"INVALID\", \"expected\": \"Z9\", \"passed\": false}, {\"check\": \"embargo lowercase\", \"actual\": \"BLOCKED\", \"expected\": \"BLOCKED\", \"passed\": true}, {\"check\": \"uk alias\", \"actual\": \"Z3\", \"expected\": \"Z3\", \"passed\": true}, {\"check\": \"generated mix 5\", \"actual\": \"BLOCKED\", \"expected\": \"BLOCKED\", \"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."}}