FAILURE MAP
← Case archive

FA-95666 / Shipping rate zone lookup / Open access

Destination zones: San Juan and USVI rejected · case 01

Puerto Rico 009 and Virgin Islands 008 addresses are flagged mismatched.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The Caribbean ZIP3 range stops at 007.

THE FAILURE

The Caribbean ZIP3 range stops at 007.

Unsuccessful approach: Listing only 006 and 009 still rejects 007 and 008.

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 <= 7 else 'MISMATCH'
    return base_zone
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['generated mix 11', ['00801', 'VI', 5, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['hawaii mismatch', ['96901', 'HI', 8, 'GROUND'], 'MISMATCH'], ['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['military ground', ['96201', 'AP', 5, 'GROUND'], 'NO_SERVICE'], ['generated mix 3', ['96701', 'HI', 2, 'AIR'], 14]], [['generated mix 48', ['00901', 'PR', 2, 'POSTAL'], 22], ['generated mix 79', ['00801', 'VI', 8, 'GROUND'], 22], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['generated mix 5', ['99701', 'AK', 3, 'AIR'], 18], ['generated mix 13', ['34001', 'AA', 4, 'AIR'], 'NO_SERVICE']], [['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['generated mix 49', ['00801', 'VI', 4, 'GROUND'], 22], ['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['generated mix 17', ['10001', 'NY', 2, 'POSTAL'], 2], ['generated mix 25', ['99601', 'AK', 6, 'POSTAL'], 17]], [['generated mix 48', ['00901', 'PR', 2, 'POSTAL'], 22], ['generated mix 26', ['00801', 'VI', 2, 'POSTAL'], 22], ['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 28', ['99901', 'AK', 3, 'GROUND'], 18], ['generated mix 36', ['34001', 'AA', 7, 'GROUND'], 'NO_SERVICE']], [['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['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 fixtureActualExpectedOutcome
san juanMISMATCH22Failed
generated mix 11MISMATCH22Failed
military postalMILITARYMILITARYPassed
americas militaryMILITARYMILITARYPassed
hawaii mismatchMISMATCHMISMATCHPassed
ak 9961717Passed
military groundNO_SERVICENO_SERVICEPassed
generated mix 31414Passed

SHA-256 / 64a2bf482bd0b868e67b67cef8eb9c8730110fd720fdc970153577582a8828b3

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 <= 996 else 18
    if state in ('PR', 'VI'):
        return 22 if z3 in (6, 9) else 'MISMATCH'
    return base_zone
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['generated mix 11', ['00801', 'VI', 5, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['hawaii mismatch', ['96901', 'HI', 8, 'GROUND'], 'MISMATCH'], ['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['military ground', ['96201', 'AP', 5, 'GROUND'], 'NO_SERVICE'], ['generated mix 3', ['96701', 'HI', 2, 'AIR'], 14]], [['generated mix 48', ['00901', 'PR', 2, 'POSTAL'], 22], ['generated mix 79', ['00801', 'VI', 8, 'GROUND'], 22], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['generated mix 5', ['99701', 'AK', 3, 'AIR'], 18], ['generated mix 13', ['34001', 'AA', 4, 'AIR'], 'NO_SERVICE']], [['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['generated mix 49', ['00801', 'VI', 4, 'GROUND'], 22], ['ak 996', ['99601', 'AK', 8, 'GROUND'], 17], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['military postal', ['09001', 'AE', 5, 'POSTAL'], 'MILITARY'], ['americas military', ['34001', 'AA', 5, 'POSTAL'], 'MILITARY'], ['generated mix 17', ['10001', 'NY', 2, 'POSTAL'], 2], ['generated mix 25', ['99601', 'AK', 6, 'POSTAL'], 17]], [['generated mix 48', ['00901', 'PR', 2, 'POSTAL'], 22], ['generated mix 26', ['00801', 'VI', 2, 'POSTAL'], 22], ['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 28', ['99901', 'AK', 3, 'GROUND'], 18], ['generated mix 36', ['34001', 'AA', 7, 'GROUND'], 'NO_SERVICE']], [['san juan', ['00901', 'PR', 8, 'GROUND'], 22], ['virgin islands', ['00801', 'VI', 8, 'GROUND'], 22], ['honolulu', ['96813', 'HI', 8, 'GROUND'], 14], ['anchorage', ['99501', 'AK', 8, 'GROUND'], 17], ['ak remote', ['99701', 'AK', 8, 'GROUND'], 18], ['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 fixtureActualExpectedOutcome
san juan2222Passed
generated mix 11MISMATCH22Failed
military postalMILITARYMILITARYPassed
americas militaryMILITARYMILITARYPassed
hawaii mismatchMISMATCHMISMATCHPassed
ak 9961717Passed
military groundNO_SERVICENO_SERVICEPassed
generated mix 31414Passed

SHA-256 / ce2d01eb4f9ae39c3693a62e6bd948228fae45b81935e5ccef58bb8345685b36

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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.704158+00:00.

Case digest / 4150a37e860566a98e6b03afd99e5d5cefb6c5e3a8c73fccd2b18cd401400ecc