{"abstract":"Deliveries within the same ZIP3 are rated as regional zone 2.","category":"Shipping rate zone lookup","checks":8,"contract":"origin and dest are five-digit ZIP strings. Same ZIP3 -> zone 1. regions [[lo3, hi3, region]] inclusive. Unknown region -> \"NO_ZONE\". Same region -> zone 2. Otherwise the matrix [[region_a, region_b, zone]] lists each pair once and applies in both directions; unlisted pair -> \"NO_ZONE\".","evaluation_group":"w2-shipping-zone-region-matrix","failed_approach":"Checking locality only inside the same-region branch fails for ZIP3s outside the region table.","family":"w2-shipping-zone-region-matrix-local-zone","id":"FA-95741","implementations":{"attempt":{"sha256":"64d2ff1a30c04990b02cd385e40f57b174e1b05f64cab9c29392700bbcce4c34","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(origin, dest, regions, matrix):\n    def region(z3):\n        for lo, hi, r in regions:\n            if lo <= z3 <= hi:\n                return r\n        return None\n    o = int(origin[:3])\n    d = int(dest[:3])\n    ro, rd = region(o), region(d)\n    if ro is None or rd is None:\n        return 'NO_ZONE'\n    if ro == rd:\n        return 1 if o == d else 2\n    for a, b, zone in matrix:\n        if (a, b) == (ro, rd) or (a, b) == (rd, ro):\n            return zone\n    return 'NO_ZONE'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 6', ['20001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1]], [['generated mix 54', ['01001', '01001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 9', ['60001', '39999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 17', ['19999', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 6', ['20001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 21', ['20001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 29', ['40001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 58', ['01001', '01001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['generated mix 31', ['59901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 39', ['60001', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2]], [['generated mix 24', ['39999', '39999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 43', ['80001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 51', ['10001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4]]]\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":"a965e35146dcbcdcdce0b73c693f6c1b8c4326d00dce69a440c64a2df7702670","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(origin, dest, regions, matrix):\n    def region(z3):\n        for lo, hi, r in regions:\n            if lo <= z3 <= hi:\n                return r\n        return None\n    o = int(origin[:3])\n    d = int(dest[:3])\n    ro, rd = region(o), region(d)\n    if ro is None or rd is None:\n        return 'NO_ZONE'\n    if ro == rd:\n        return 2\n    for a, b, zone in matrix:\n        if (a, b) == (ro, rd) or (a, b) == (rd, ro):\n            return zone\n    return 'NO_ZONE'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 6', ['20001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1]], [['generated mix 54', ['01001', '01001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 9', ['60001', '39999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 17', ['19999', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 6', ['20001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 21', ['20001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 29', ['40001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 58', ['01001', '01001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['generated mix 31', ['59901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 39', ['60001', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2]], [['generated mix 24', ['39999', '39999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 43', ['80001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 51', ['10001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4]]]\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"},"fixed":{"sha256":"ddca83549fc9468b9e50d68e6bb2d6caa69ab2a8f8f1d3cdebeb6b7abd305dc2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(origin, dest, regions, matrix):\n    def region(z3):\n        for lo, hi, r in regions:\n            if lo <= z3 <= hi:\n                return r\n        return None\n    o = int(origin[:3])\n    d = int(dest[:3])\n    if o == d:\n        return 1\n    ro, rd = region(o), region(d)\n    if ro is None or rd is None:\n        return 'NO_ZONE'\n    if ro == rd:\n        return 2\n    for a, b, zone in matrix:\n        if (a, b) == (ro, rd) or (a, b) == (rd, ro):\n            return zone\n    return 'NO_ZONE'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 6', ['20001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1]], [['generated mix 54', ['01001', '01001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 9', ['60001', '39999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 17', ['19999', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 6', ['20001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 21', ['20001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 29', ['40001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 58', ['01001', '01001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['generated mix 31', ['59901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 39', ['60001', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2]], [['generated mix 24', ['39999', '39999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 43', ['80001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 51', ['10001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4]]]\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 regions and matrix. 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-region-matrix-local-zone","generated_at":"2026-09-29T14:52:16.434366+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Regional carriers rate by origin and destination region matrices.","repair":"Return zone 1 whenever origin and destination share a ZIP3, before region lookup.","root_cause":"The same-ZIP3 local zone rule is missing.","sha256":"ee98b08536b318bed62d442c077149cf768f24fedc6350f5ef4dcdaea2a5bedd","title":"Region matrix: same ZIP3 not local · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.233,"exit_code":1,"observations":[{"actual":1,"check":"same zip3","expected":1,"passed":true},{"actual":"NO_ZONE","check":"generated mix 19","expected":1,"passed":false},{"actual":2,"check":"same region","expected":2,"passed":true},{"actual":4,"check":"reverse pair","expected":4,"passed":true},{"actual":5,"check":"reverse listing","expected":5,"passed":true},{"actual":"NO_ZONE","check":"local outside regions","expected":1,"passed":false},{"actual":4,"check":"listed pair","expected":4,"passed":true},{"actual":1,"check":"generated mix 6","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same zip3\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"generated mix 19\", \"actual\": \"NO_ZONE\", \"expected\": 1, \"passed\": false}, {\"check\": \"same region\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"reverse pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"reverse listing\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"local outside regions\", \"actual\": \"NO_ZONE\", \"expected\": 1, \"passed\": false}, {\"check\": \"listed pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.29,"exit_code":1,"observations":[{"actual":2,"check":"same zip3","expected":1,"passed":false},{"actual":"NO_ZONE","check":"generated mix 19","expected":1,"passed":false},{"actual":2,"check":"same region","expected":2,"passed":true},{"actual":4,"check":"reverse pair","expected":4,"passed":true},{"actual":5,"check":"reverse listing","expected":5,"passed":true},{"actual":"NO_ZONE","check":"local outside regions","expected":1,"passed":false},{"actual":4,"check":"listed pair","expected":4,"passed":true},{"actual":2,"check":"generated mix 6","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same zip3\", \"actual\": 2, \"expected\": 1, \"passed\": false}, {\"check\": \"generated mix 19\", \"actual\": \"NO_ZONE\", \"expected\": 1, \"passed\": false}, {\"check\": \"same region\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"reverse pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"reverse listing\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"local outside regions\", \"actual\": \"NO_ZONE\", \"expected\": 1, \"passed\": false}, {\"check\": \"listed pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": 2, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.805,"exit_code":0,"observations":[{"actual":1,"check":"same zip3","expected":1,"passed":true},{"actual":1,"check":"generated mix 19","expected":1,"passed":true},{"actual":2,"check":"same region","expected":2,"passed":true},{"actual":4,"check":"reverse pair","expected":4,"passed":true},{"actual":5,"check":"reverse listing","expected":5,"passed":true},{"actual":1,"check":"local outside regions","expected":1,"passed":true},{"actual":4,"check":"listed pair","expected":4,"passed":true},{"actual":1,"check":"generated mix 6","expected":1,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same zip3\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"generated mix 19\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"same region\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"reverse pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"reverse listing\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"local outside regions\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"listed pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}