FA-95656 / Shipping rate zone lookup / Open access
Destination zones: 996 rated as remote Alaska · case 01
Alaska ZIP3 996 is charged the remote zone.
ROOT CAUSE
The Alaska split excludes 996 from zone 17.
VERIFIED REPAIR
Zone 17 covers 995 and 996; 997-999 are zone 18.
Unsuccessful approach: Extending zone 17 to 997 under-charges remote destinations.
Case contract
Military states AA/AE/AP are served only by POSTAL ("MILITARY") else "NO_SERVICE". HI must be ZIP3 967-968 (zone 14); AK must be 995-999 with 995-996 zone 17 and 997-999 zone 18; PR and VI must be 006-009 (zone 22). A state/ZIP3 conflict is "MISMATCH". Other states return base_zone.
Why this case matters
Noncontiguous and military destinations have their own zones and service restrictions.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(zip5, state, base_zone, service):
z3 = int(zip5[:3])
if state in ('AA', 'AE', 'AP'):
return 'MILITARY' if service == 'POSTAL' else 'NO_SERVICE'
if state == 'HI':
return 14 if 967 <= z3 <= 968 else 'MISMATCH'
if state == 'AK':
if not 995 <= z3 <= 999:
return 'MISMATCH'
return 17 if z3 < 996 else 18
if state in ('PR', 'VI'):
return 22 if 6 <= z3 <= 9 else 'MISMATCH'
return base_zone
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['generated mix 5', ['99701', 'AK', 3, 'AIR'], 18], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['hawaii mismatch', ['96901', 'HI', 8, 'GROUND'], 'MISMATCH'], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['military ground', ['96201', 'AP', 5, 'GROUND'], 'NO_SERVICE'], ['generated mix 3', ['96701', 'HI', 2, 'AIR'], 14]], [['generated mix 46', ['99601', 'AK', 4, 'POSTAL'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['contiguous', ['10001', 'NY', 5, 'GROUND'], 5], ['generated mix 6', ['10001', 'NY', 2, 'GROUND'], 2], ['generated mix 14', ['34001', 'AA', 6, 'AIR'], 'NO_SERVICE']], [['generated mix 40', ['99601', 'AK', 7, 'POSTAL'], 17], ['generated mix 23', ['99701', 'AK', 3, 'AIR'], 18], ['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['contiguous', ['10001', 'NY', 5, 'GROUND'], 5], ['military ground', ['96201', 'AP', 5, 'GROUND'], 'NO_SERVICE'], ['generated mix 16', ['00601', 'PR', 2, 'GROUND'], 22], ['generated mix 25', ['99601', 'AK', 6, 'POSTAL'], 17]], [['generated mix 25', ['99601', 'AK', 6, 'POSTAL'], 17], ['generated mix 5', ['99701', 'AK', 3, 'AIR'], 18], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['hawaii mismatch', ['96901', 'HI', 8, 'GROUND'], 'MISMATCH'], ['generated mix 29', ['99901', 'AK', 3, 'AIR'], 18], ['generated mix 37', ['90001', 'CA', 3, 'AIR'], 3]], [['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['generated mix 40', ['99601', 'AK', 7, 'POSTAL'], 17], ['generated mix 48', ['00901', 'PR', 2, 'POSTAL'], 22]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| ak 996 | 18 | 17 | Failed |
| generated mix 5 | 18 | 18 | Passed |
| military postal | MILITARY | MILITARY | Passed |
| americas military | MILITARY | MILITARY | Passed |
| hawaii mismatch | MISMATCH | MISMATCH | Passed |
| ak remote | 18 | 18 | Passed |
| military ground | NO_SERVICE | NO_SERVICE | Passed |
| generated mix 3 | 14 | 14 | Passed |
SHA-256 / fd4d8b9d6393d84d7dc8226a71e27396fb1d30d8132cdc22ec43b287b7e0f041
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(zip5, state, base_zone, service):
z3 = int(zip5[:3])
if state in ('AA', 'AE', 'AP'):
return 'MILITARY' if service == 'POSTAL' else 'NO_SERVICE'
if state == 'HI':
return 14 if 967 <= z3 <= 968 else 'MISMATCH'
if state == 'AK':
if not 995 <= z3 <= 999:
return 'MISMATCH'
return 17 if z3 <= 997 else 18
if state in ('PR', 'VI'):
return 22 if 6 <= z3 <= 9 else 'MISMATCH'
return base_zone
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['generated mix 5', ['99701', 'AK', 3, 'AIR'], 18], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['hawaii mismatch', ['96901', 'HI', 8, 'GROUND'], 'MISMATCH'], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['military ground', ['96201', 'AP', 5, 'GROUND'], 'NO_SERVICE'], ['generated mix 3', ['96701', 'HI', 2, 'AIR'], 14]], [['generated mix 46', ['99601', 'AK', 4, 'POSTAL'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['contiguous', ['10001', 'NY', 5, 'GROUND'], 5], ['generated mix 6', ['10001', 'NY', 2, 'GROUND'], 2], ['generated mix 14', ['34001', 'AA', 6, 'AIR'], 'NO_SERVICE']], [['generated mix 40', ['99601', 'AK', 7, 'POSTAL'], 17], ['generated mix 23', ['99701', 'AK', 3, 'AIR'], 18], ['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['contiguous', ['10001', 'NY', 5, 'GROUND'], 5], ['military ground', ['96201', 'AP', 5, 'GROUND'], 'NO_SERVICE'], ['generated mix 16', ['00601', 'PR', 2, 'GROUND'], 22], ['generated mix 25', ['99601', 'AK', 6, 'POSTAL'], 17]], [['generated mix 25', ['99601', 'AK', 6, 'POSTAL'], 17], ['generated mix 5', ['99701', 'AK', 3, 'AIR'], 18], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['hawaii mismatch', ['96901', 'HI', 8, 'GROUND'], 'MISMATCH'], ['generated mix 29', ['99901', 'AK', 3, 'AIR'], 18], ['generated mix 37', ['90001', 'CA', 3, 'AIR'], 3]], [['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['generated mix 40', ['99601', 'AK', 7, 'POSTAL'], 17], ['generated mix 48', ['00901', 'PR', 2, 'POSTAL'], 22]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| ak 996 | 17 | 17 | Passed |
| generated mix 5 | 17 | 18 | Failed |
| military postal | MILITARY | MILITARY | Passed |
| americas military | MILITARY | MILITARY | Passed |
| hawaii mismatch | MISMATCH | MISMATCH | Passed |
| ak remote | 17 | 18 | Failed |
| military ground | NO_SERVICE | NO_SERVICE | Passed |
| generated mix 3 | 14 | 14 | Passed |
SHA-256 / e65af19e1bae3db741fae3d8ece741a404153e3f379dc1b16b73130bd8b91e40
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(zip5, state, base_zone, service):
z3 = int(zip5[:3])
if state in ('AA', 'AE', 'AP'):
return 'MILITARY' if service == 'POSTAL' else 'NO_SERVICE'
if state == 'HI':
return 14 if 967 <= z3 <= 968 else 'MISMATCH'
if state == 'AK':
if not 995 <= z3 <= 999:
return 'MISMATCH'
return 17 if z3 <= 996 else 18
if state in ('PR', 'VI'):
return 22 if 6 <= z3 <= 9 else 'MISMATCH'
return base_zone
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['generated mix 5', ['99701', 'AK', 3, 'AIR'], 18], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['hawaii mismatch', ['96901', 'HI', 8, 'GROUND'], 'MISMATCH'], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['military ground', ['96201', 'AP', 5, 'GROUND'], 'NO_SERVICE'], ['generated mix 3', ['96701', 'HI', 2, 'AIR'], 14]], [['generated mix 46', ['99601', 'AK', 4, 'POSTAL'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['contiguous', ['10001', 'NY', 5, 'GROUND'], 5], ['generated mix 6', ['10001', 'NY', 2, 'GROUND'], 2], ['generated mix 14', ['34001', 'AA', 6, 'AIR'], 'NO_SERVICE']], [['generated mix 40', ['99601', 'AK', 7, 'POSTAL'], 17], ['generated mix 23', ['99701', 'AK', 3, 'AIR'], 18], ['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['contiguous', ['10001', 'NY', 5, 'GROUND'], 5], ['military ground', ['96201', 'AP', 5, 'GROUND'], 'NO_SERVICE'], ['generated mix 16', ['00601', 'PR', 2, 'GROUND'], 22], ['generated mix 25', ['99601', 'AK', 6, 'POSTAL'], 17]], [['generated mix 25', ['99601', 'AK', 6, 'POSTAL'], 17], ['generated mix 5', ['99701', 'AK', 3, 'AIR'], 18], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['hawaii mismatch', ['96901', 'HI', 8, 'GROUND'], 'MISMATCH'], ['generated mix 29', ['99901', 'AK', 3, 'AIR'], 18], ['generated mix 37', ['90001', 'CA', 3, 'AIR'], 3]], [['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['generated mix 40', ['99601', 'AK', 7, 'POSTAL'], 17], ['generated mix 48', ['00901', 'PR', 2, 'POSTAL'], 22]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| ak 996 | 17 | 17 | Passed |
| generated mix 5 | 18 | 18 | Passed |
| military postal | MILITARY | MILITARY | Passed |
| americas military | MILITARY | MILITARY | Passed |
| hawaii mismatch | MISMATCH | MISMATCH | Passed |
| ak remote | 18 | 18 | Passed |
| military ground | NO_SERVICE | NO_SERVICE | Passed |
| generated mix 3 | 14 | 14 | Passed |
SHA-256 / f2538b329001635cc691507b70d19ae89f6fa27da6b5ed62633a63b0bc68535c
Verification & scope
Stipulated ZIP3 ranges and zone numbers. 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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:52:15.620027+00:00.
Case digest / 03c808e8d16dad5b7f8eeff4b5c53f4605d9c3db30730816522cac8ef3432780