{"abstract":"Diagonal destinations are rated one or two zones too far.","category":"Shipping rate zone lookup","checks":8,"contract":"dest [x, y] and points [[name, x, y, linehaul_cents]] on a mile grid. Distance = straight line rounded up to a whole mile. Zone bands (miles, inclusive upper): 50, 150, 300, 600, 1000, 1400, 1800 -> zones 1-7, beyond -> 8. Choose the point with the lowest zone, then linehaul, then name. Return [name, zone, miles] or None.","contract_signature":"dest, points","evaluation_group":"w2-shipping-zone-injection-zone","failed_approach":"Subtracting the destination x from the hub y compares the wrong axis.","family":"w2-shipping-zone-injection-zone-distance-metric","id":"FA-95591","implementations":{"attempt":{"sha256":"42b860eac65a3da05afd014076dce5b5b8ee9e78afe76560e617091bb4b27773","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(dest, points):\n    BANDS = [50, 150, 300, 600, 1000, 1400, 1800]\n    def zone_for(m):\n        for i, lim in enumerate(BANDS):\n            if m <= lim:\n                return i + 1\n        return 8\n    best = None\n    for name, x, y, lh in points:\n        sq = (x - dest[0]) ** 2 + (y - dest[0]) ** 2\n        s = math.isqrt(sq)\n        miles = s + (1 if s * s < sq else 0)\n        z = zone_for(miles)\n        key = (z, lh, name)\n        if best is None or key < best[0]:\n            best = (key, [name, z, miles])\n    return best[1] if best else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['exact 50 miles', [[0, 0], [['A', 30, 40, 500]]], ['A', 1, 50]], ['generated mix 2', [[-10, 3], [['IL', 2000, 41, 100], ['TX', 590, 150, 300]]], ['TX', 5, 618]], ['just over', [[0, 0], [['A', 30, 41, 500]]], ['A', 2, 51]], ['zone beats linehaul', [[0, 0], [['A', 40, 0, 900], ['B', 0, 120, 300]]], ['A', 1, 40]], ['far', [[0, 0], [['A', 2000, 0, 1]]], ['A', 8, 2000]], ['linehaul tiebreak', [[0, 0], [['A', 100, 0, 900], ['B', 0, 120, 300]]], ['B', 2, 120]], ['generated mix 7', [[5, 3], [['NJ', 0, 41, 300], ['NJ', 100, 400, 300], ['NJ', 0, 0, 100]]], ['NJ', 1, 6]], ['generated mix 15', [[5, 0], [['IL', 30, 40, 300], ['IL', 1500, 150, 300]]], ['IL', 1, 48]]], [['generated mix 6', [[0, 0], [['PA', 2000, 150, 100], ['OH', 40, 400, 300], ['IL', 290, 40, 300]]], ['IL', 3, 293]], ['generated mix 13', [[5, 0], [['GA', 301, 1, 300], ['PA', 1000, 400, 900], ['NJ', 300, 0, 100]]], ['NJ', 3, 295]], ['zone beats linehaul', [[0, 0], [['A', 40, 0, 900], ['B', 0, 120, 300]]], ['A', 1, 40]], ['far', [[0, 0], [['A', 2000, 0, 1]]], ['A', 8, 2000]], ['exact 50 miles', [[0, 0], [['A', 30, 40, 500]]], ['A', 1, 50]], ['linehaul tiebreak', [[0, 0], [['A', 100, 0, 900], ['B', 0, 120, 300]]], ['B', 2, 120]], ['generated mix 10', [[5, 0], [['GA', 2000, 400, 900], ['IL', 1500, 41, 300]]], ['IL', 7, 1496]], ['generated mix 19', [[5, 0], [['OH', 40, 1, 900], ['NJ', 2000, 150, 100], ['IL', 290, 0, 100], ['NJ', 40, 400, 100]]], ['OH', 1, 36]]], [['generated mix 15', [[5, 0], [['IL', 30, 40, 300], ['IL', 1500, 150, 300]]], ['IL', 1, 48]], ['generated mix 24', [[0, 3], [['PA', 40, 40, 300], ['TX', 1000, 150, 900]]], ['PA', 2, 55]], ['no points', [[0, 0], []], None], ['just over', [[0, 0], [['A', 30, 41, 500]]], ['A', 2, 51]], ['zone beats linehaul', [[0, 0], [['A', 40, 0, 900], ['B', 0, 120, 300]]], ['A', 1, 40]], ['far', [[0, 0], [['A', 2000, 0, 1]]], ['A', 8, 2000]], ['generated mix 21', [[5, 0], [['GA', 590, 41, 100], ['GA', 1500, 400, 900], ['PA', 100, 1, 100], ['GA', 2000, 40, 100]]], ['PA', 2, 96]], ['generated mix 30', [[-10, 3], [['OH', 0, 41, 300], ['PA', 300, 1, 300], ['NJ', 290, 40, 300]]], ['OH', 1, 40]]], [['generated mix 27', [[5, 0], [['IL', 0, 40, 900], ['NJ', 590, 150, 300], ['IL', 300, 41, 300]]], ['IL', 1, 41]], ['generated mix 32', [[-10, 0], [['TX', 0, 1, 300], ['TX', 120, 40, 100], ['GA', 40, 400, 900]]], ['TX', 1, 11]], ['linehaul tiebreak', [[0, 0], [['A', 100, 0, 900], ['B', 0, 120, 300]]], ['B', 2, 120]], ['name tiebreak', [[0, 0], [['Z', 10, 0, 100], ['M', 0, 10, 100]]], ['M', 1, 10]], ['no points', [[0, 0], []], None], ['just over', [[0, 0], [['A', 30, 41, 500]]], ['A', 2, 51]], ['generated mix 33', [[0, 3], [['GA', 1500, 150, 900], ['OH', 30, 1, 300]]], ['OH', 1, 31]], ['generated mix 41', [[0, 3], [['OH', 30, 0, 300], ['PA', 1500, 0, 300]]], ['OH', 1, 31]]], [['generated mix 35', [[0, 0], [['GA', 301, 1, 300], ['NJ', 40, 150, 900]]], ['NJ', 3, 156]], ['generated mix 41', [[0, 3], [['OH', 30, 0, 300], ['PA', 1500, 0, 300]]], ['OH', 1, 31]], ['far', [[0, 0], [['A', 2000, 0, 1]]], ['A', 8, 2000]], ['exact 50 miles', [[0, 0], [['A', 30, 40, 500]]], ['A', 1, 50]], ['linehaul tiebreak', [[0, 0], [['A', 100, 0, 900], ['B', 0, 120, 300]]], ['B', 2, 120]], ['name tiebreak', [[0, 0], [['Z', 10, 0, 100], ['M', 0, 10, 100]]], ['M', 1, 10]], ['generated mix 44', [[0, 3], [['NJ', 590, 1, 300], ['PA', 300, 40, 900]]], ['NJ', 4, 591]], ['generated mix 52', [[-10, 0], [['IL', 290, 400, 300]]], ['IL', 4, 500]]]]\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":"1708696c0adb4ca379cfdeba9dd7560bf3d415a5c04404b9fd8a2cbe9f30d5aa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(dest, points):\n    BANDS = [50, 150, 300, 600, 1000, 1400, 1800]\n    def zone_for(m):\n        for i, lim in enumerate(BANDS):\n            if m <= lim:\n                return i + 1\n        return 8\n    best = None\n    for name, x, y, lh in points:\n        sq = (abs(x - dest[0]) + abs(y - dest[1])) ** 2\n        s = math.isqrt(sq)\n        miles = s + (1 if s * s < sq else 0)\n        z = zone_for(miles)\n        key = (z, lh, name)\n        if best is None or key < best[0]:\n            best = (key, [name, z, miles])\n    return best[1] if best else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['exact 50 miles', [[0, 0], [['A', 30, 40, 500]]], ['A', 1, 50]], ['generated mix 2', [[-10, 3], [['IL', 2000, 41, 100], ['TX', 590, 150, 300]]], ['TX', 5, 618]], ['just over', [[0, 0], [['A', 30, 41, 500]]], ['A', 2, 51]], ['zone beats linehaul', [[0, 0], [['A', 40, 0, 900], ['B', 0, 120, 300]]], ['A', 1, 40]], ['far', [[0, 0], [['A', 2000, 0, 1]]], ['A', 8, 2000]], ['linehaul tiebreak', [[0, 0], [['A', 100, 0, 900], ['B', 0, 120, 300]]], ['B', 2, 120]], ['generated mix 7', [[5, 3], [['NJ', 0, 41, 300], ['NJ', 100, 400, 300], ['NJ', 0, 0, 100]]], ['NJ', 1, 6]], ['generated mix 15', [[5, 0], [['IL', 30, 40, 300], ['IL', 1500, 150, 300]]], ['IL', 1, 48]]], [['generated mix 6', [[0, 0], [['PA', 2000, 150, 100], ['OH', 40, 400, 300], ['IL', 290, 40, 300]]], ['IL', 3, 293]], ['generated mix 13', [[5, 0], [['GA', 301, 1, 300], ['PA', 1000, 400, 900], ['NJ', 300, 0, 100]]], ['NJ', 3, 295]], ['zone beats linehaul', [[0, 0], [['A', 40, 0, 900], ['B', 0, 120, 300]]], ['A', 1, 40]], ['far', [[0, 0], [['A', 2000, 0, 1]]], ['A', 8, 2000]], ['exact 50 miles', [[0, 0], [['A', 30, 40, 500]]], ['A', 1, 50]], ['linehaul tiebreak', [[0, 0], [['A', 100, 0, 900], ['B', 0, 120, 300]]], ['B', 2, 120]], ['generated mix 10', [[5, 0], [['GA', 2000, 400, 900], ['IL', 1500, 41, 300]]], ['IL', 7, 1496]], ['generated mix 19', [[5, 0], [['OH', 40, 1, 900], ['NJ', 2000, 150, 100], ['IL', 290, 0, 100], ['NJ', 40, 400, 100]]], ['OH', 1, 36]]], [['generated mix 15', [[5, 0], [['IL', 30, 40, 300], ['IL', 1500, 150, 300]]], ['IL', 1, 48]], ['generated mix 24', [[0, 3], [['PA', 40, 40, 300], ['TX', 1000, 150, 900]]], ['PA', 2, 55]], ['no points', [[0, 0], []], None], ['just over', [[0, 0], [['A', 30, 41, 500]]], ['A', 2, 51]], ['zone beats linehaul', [[0, 0], [['A', 40, 0, 900], ['B', 0, 120, 300]]], ['A', 1, 40]], ['far', [[0, 0], [['A', 2000, 0, 1]]], ['A', 8, 2000]], ['generated mix 21', [[5, 0], [['GA', 590, 41, 100], ['GA', 1500, 400, 900], ['PA', 100, 1, 100], ['GA', 2000, 40, 100]]], ['PA', 2, 96]], ['generated mix 30', [[-10, 3], [['OH', 0, 41, 300], ['PA', 300, 1, 300], ['NJ', 290, 40, 300]]], ['OH', 1, 40]]], [['generated mix 27', [[5, 0], [['IL', 0, 40, 900], ['NJ', 590, 150, 300], ['IL', 300, 41, 300]]], ['IL', 1, 41]], ['generated mix 32', [[-10, 0], [['TX', 0, 1, 300], ['TX', 120, 40, 100], ['GA', 40, 400, 900]]], ['TX', 1, 11]], ['linehaul tiebreak', [[0, 0], [['A', 100, 0, 900], ['B', 0, 120, 300]]], ['B', 2, 120]], ['name tiebreak', [[0, 0], [['Z', 10, 0, 100], ['M', 0, 10, 100]]], ['M', 1, 10]], ['no points', [[0, 0], []], None], ['just over', [[0, 0], [['A', 30, 41, 500]]], ['A', 2, 51]], ['generated mix 33', [[0, 3], [['GA', 1500, 150, 900], ['OH', 30, 1, 300]]], ['OH', 1, 31]], ['generated mix 41', [[0, 3], [['OH', 30, 0, 300], ['PA', 1500, 0, 300]]], ['OH', 1, 31]]], [['generated mix 35', [[0, 0], [['GA', 301, 1, 300], ['NJ', 40, 150, 900]]], ['NJ', 3, 156]], ['generated mix 41', [[0, 3], [['OH', 30, 0, 300], ['PA', 1500, 0, 300]]], ['OH', 1, 31]], ['far', [[0, 0], [['A', 2000, 0, 1]]], ['A', 8, 2000]], ['exact 50 miles', [[0, 0], [['A', 30, 40, 500]]], ['A', 1, 50]], ['linehaul tiebreak', [[0, 0], [['A', 100, 0, 900], ['B', 0, 120, 300]]], ['B', 2, 120]], ['name tiebreak', [[0, 0], [['Z', 10, 0, 100], ['M', 0, 10, 100]]], ['M', 1, 10]], ['generated mix 44', [[0, 3], [['NJ', 590, 1, 300], ['PA', 300, 40, 900]]], ['NJ', 4, 591]], ['generated mix 52', [[-10, 0], [['IL', 290, 400, 300]]], ['IL', 4, 500]]]]\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":"Grid distance stand-in; not geodesic distances. 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-injection-zone-distance-metric","generated_at":"2026-09-29T14:52:15.035503+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Zone skipping injects parcels at the hub that minimizes delivery zone and linehaul.","root_cause":"Distance is the sum of axis offsets (Manhattan) rather than straight line.","sha256":"ffab26f3d6c83981ed3bf1d1c93b8d27ae37a2e089f4b6149293d4aab5363aa4","title":"Injection zone: grid distance instead of straight line · 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.58,"exit_code":1,"observations":[{"actual":["A",1,50],"check":"exact 50 miles","expected":["A",1,50],"passed":true},{"actual":["TX",5,621],"check":"generated mix 2","expected":["TX",5,618],"passed":false},{"actual":["A",2,51],"check":"just over","expected":["A",2,51],"passed":true},{"actual":["A",1,40],"check":"zone beats linehaul","expected":["A",1,40],"passed":true},{"actual":["A",8,2000],"check":"far","expected":["A",8,2000],"passed":true},{"actual":["B",2,120],"check":"linehaul tiebreak","expected":["B",2,120],"passed":true},{"actual":["NJ",1,8],"check":"generated mix 7","expected":["NJ",1,6],"passed":false},{"actual":["IL",1,44],"check":"generated mix 15","expected":["IL",1,48],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact 50 miles\", \"actual\": [\"A\", 1, 50], \"expected\": [\"A\", 1, 50], \"passed\": true}, {\"check\": \"generated mix 2\", \"actual\": [\"TX\", 5, 621], \"expected\": [\"TX\", 5, 618], \"passed\": false}, {\"check\": \"just over\", \"actual\": [\"A\", 2, 51], \"expected\": [\"A\", 2, 51], \"passed\": true}, {\"check\": \"zone beats linehaul\", \"actual\": [\"A\", 1, 40], \"expected\": [\"A\", 1, 40], \"passed\": true}, {\"check\": \"far\", \"actual\": [\"A\", 8, 2000], \"expected\": [\"A\", 8, 2000], \"passed\": true}, {\"check\": \"linehaul tiebreak\", \"actual\": [\"B\", 2, 120], \"expected\": [\"B\", 2, 120], \"passed\": true}, {\"check\": \"generated mix 7\", \"actual\": [\"NJ\", 1, 8], \"expected\": [\"NJ\", 1, 6], \"passed\": false}, {\"check\": \"generated mix 15\", \"actual\": [\"IL\", 1, 44], \"expected\": [\"IL\", 1, 48], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.626,"exit_code":1,"observations":[{"actual":["A",2,70],"check":"exact 50 miles","expected":["A",1,50],"passed":false},{"actual":["TX",5,747],"check":"generated mix 2","expected":["TX",5,618],"passed":false},{"actual":["A",2,71],"check":"just over","expected":["A",2,51],"passed":false},{"actual":["A",1,40],"check":"zone beats linehaul","expected":["A",1,40],"passed":true},{"actual":["A",8,2000],"check":"far","expected":["A",8,2000],"passed":true},{"actual":["B",2,120],"check":"linehaul tiebreak","expected":["B",2,120],"passed":true},{"actual":["NJ",1,8],"check":"generated mix 7","expected":["NJ",1,6],"passed":false},{"actual":["IL",2,65],"check":"generated mix 15","expected":["IL",1,48],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exact 50 miles\", \"actual\": [\"A\", 2, 70], \"expected\": [\"A\", 1, 50], \"passed\": false}, {\"check\": \"generated mix 2\", \"actual\": [\"TX\", 5, 747], \"expected\": [\"TX\", 5, 618], \"passed\": false}, {\"check\": \"just over\", \"actual\": [\"A\", 2, 71], \"expected\": [\"A\", 2, 51], \"passed\": false}, {\"check\": \"zone beats linehaul\", \"actual\": [\"A\", 1, 40], \"expected\": [\"A\", 1, 40], \"passed\": true}, {\"check\": \"far\", \"actual\": [\"A\", 8, 2000], \"expected\": [\"A\", 8, 2000], \"passed\": true}, {\"check\": \"linehaul tiebreak\", \"actual\": [\"B\", 2, 120], \"expected\": [\"B\", 2, 120], \"passed\": true}, {\"check\": \"generated mix 7\", \"actual\": [\"NJ\", 1, 8], \"expected\": [\"NJ\", 1, 6], \"passed\": false}, {\"check\": \"generated mix 15\", \"actual\": [\"IL\", 2, 65], \"expected\": [\"IL\", 1, 48], \"passed\": false}], \"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."}}