FAILURE MAP
← Case archive

FA-95481 / Shipping rate zone lookup / Open access

Size classes: overweight parcel accepted · case 01

A 151 lb parcel is quoted as a heavy parcel instead of refused.

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

ROOT CAUSE

The weight limit is missing from the unshippable test.

VERIFIED REPAIR

Refuse parcels over 150 lb regardless of size.

Unsuccessful approach: Joining the weight limit to the size test only refuses overweight oversize parcels.

Case contract

dims inches (any order), weight lb. length = longest side, girth = 2*(other two). UNSHIPPABLE if length > 108, length+girth > 165 or weight > 150. Otherwise OVERSIZE if length+girth > 130; else AHS_DIM if length > 48 or second-longest > 30. AHS_WEIGHT if weight > 50 (independent). Return list of codes.

Why this case matters

Size and weight classes decide handling fees and service eligibility.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(dims, weight):
    L, s2, s3 = sorted(dims, reverse=True)
    size = L + 2 * (s2 + s3)
    if L > 108 or size > 165:
        return ['UNSHIPPABLE']
    codes = []
    if size > 130:
        codes.append('OVERSIZE')
    elif L > 48 or s2 > 30:
        codes.append('AHS_DIM')
    if weight > 50:
        codes.append('AHS_WEIGHT')
    return codes
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 6', [[110, 108, 110], 70], ['UNSHIPPABLE']], ['generated mix 14', [[80, 80, 40], 70], ['UNSHIPPABLE']]], [['generated mix 78', [[40, 60, 10], 151], ['UNSHIPPABLE']], ['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['generated mix 9', [[40, 40, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['generated mix 17', [[80, 80, 100], 70], ['UNSHIPPABLE']]], [['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['generated mix 20', [[100, 60, 60], 50.5], ['UNSHIPPABLE']], ['generated mix 28', [[100, 31, 40], 5], ['UNSHIPPABLE']], ['generated mix 36', [[80, 60, 80], 151], ['UNSHIPPABLE']]], [['generated mix 78', [[40, 60, 10], 151], ['UNSHIPPABLE']], ['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 31', [[48, 30, 10], 150], ['AHS_WEIGHT']], ['generated mix 39', [[60, 60, 49], 70], ['UNSHIPPABLE']]], [['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['generated mix 42', [[80, 60, 49], 49.5], ['UNSHIPPABLE']], ['generated mix 50', [[48, 10, 60], 151], ['UNSHIPPABLE']], ['generated mix 58', [[108, 80, 49], 50.5], ['UNSHIPPABLE']]]]
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
too heavy['AHS_WEIGHT']['UNSHIPPABLE']Failed
oversize['OVERSIZE']['OVERSIZE']Passed
length edge[][]Passed
oversize and heavy['OVERSIZE', 'AHS_WEIGHT']['OVERSIZE', 'AHS_WEIGHT']Passed
exact 130['AHS_DIM']['AHS_DIM']Passed
second side['AHS_DIM']['AHS_DIM']Passed
generated mix 6['UNSHIPPABLE']['UNSHIPPABLE']Passed
generated mix 14['UNSHIPPABLE']['UNSHIPPABLE']Passed

SHA-256 / f80c407f8a85f2aa276035805ffac8a9809c1565d85c7073c5d8c3e17fd3420e

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(dims, weight):
    L, s2, s3 = sorted(dims, reverse=True)
    size = L + 2 * (s2 + s3)
    if L > 108 or size > 165 or weight > 150 and size > 130:
        return ['UNSHIPPABLE']
    codes = []
    if size > 130:
        codes.append('OVERSIZE')
    elif L > 48 or s2 > 30:
        codes.append('AHS_DIM')
    if weight > 50:
        codes.append('AHS_WEIGHT')
    return codes
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 6', [[110, 108, 110], 70], ['UNSHIPPABLE']], ['generated mix 14', [[80, 80, 40], 70], ['UNSHIPPABLE']]], [['generated mix 78', [[40, 60, 10], 151], ['UNSHIPPABLE']], ['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['generated mix 9', [[40, 40, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['generated mix 17', [[80, 80, 100], 70], ['UNSHIPPABLE']]], [['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['generated mix 20', [[100, 60, 60], 50.5], ['UNSHIPPABLE']], ['generated mix 28', [[100, 31, 40], 5], ['UNSHIPPABLE']], ['generated mix 36', [[80, 60, 80], 151], ['UNSHIPPABLE']]], [['generated mix 78', [[40, 60, 10], 151], ['UNSHIPPABLE']], ['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 31', [[48, 30, 10], 150], ['AHS_WEIGHT']], ['generated mix 39', [[60, 60, 49], 70], ['UNSHIPPABLE']]], [['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['generated mix 42', [[80, 60, 49], 49.5], ['UNSHIPPABLE']], ['generated mix 50', [[48, 10, 60], 151], ['UNSHIPPABLE']], ['generated mix 58', [[108, 80, 49], 50.5], ['UNSHIPPABLE']]]]
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
too heavy['AHS_WEIGHT']['UNSHIPPABLE']Failed
oversize['OVERSIZE']['OVERSIZE']Passed
length edge[][]Passed
oversize and heavy['OVERSIZE', 'AHS_WEIGHT']['OVERSIZE', 'AHS_WEIGHT']Passed
exact 130['AHS_DIM']['AHS_DIM']Passed
second side['AHS_DIM']['AHS_DIM']Passed
generated mix 6['UNSHIPPABLE']['UNSHIPPABLE']Passed
generated mix 14['UNSHIPPABLE']['UNSHIPPABLE']Passed

SHA-256 / 29360c4923644e3f5f620d4092c45add3042cdff79b6e207c1a830c279b8b610

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(dims, weight):
    L, s2, s3 = sorted(dims, reverse=True)
    size = L + 2 * (s2 + s3)
    if L > 108 or size > 165 or weight > 150:
        return ['UNSHIPPABLE']
    codes = []
    if size > 130:
        codes.append('OVERSIZE')
    elif L > 48 or s2 > 30:
        codes.append('AHS_DIM')
    if weight > 50:
        codes.append('AHS_WEIGHT')
    return codes
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 6', [[110, 108, 110], 70], ['UNSHIPPABLE']], ['generated mix 14', [[80, 80, 40], 70], ['UNSHIPPABLE']]], [['generated mix 78', [[40, 60, 10], 151], ['UNSHIPPABLE']], ['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['generated mix 9', [[40, 40, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['generated mix 17', [[80, 80, 100], 70], ['UNSHIPPABLE']]], [['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['generated mix 20', [[100, 60, 60], 50.5], ['UNSHIPPABLE']], ['generated mix 28', [[100, 31, 40], 5], ['UNSHIPPABLE']], ['generated mix 36', [[80, 60, 80], 151], ['UNSHIPPABLE']]], [['generated mix 78', [[40, 60, 10], 151], ['UNSHIPPABLE']], ['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 31', [[48, 30, 10], 150], ['AHS_WEIGHT']], ['generated mix 39', [[60, 60, 49], 70], ['UNSHIPPABLE']]], [['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['generated mix 42', [[80, 60, 49], 49.5], ['UNSHIPPABLE']], ['generated mix 50', [[48, 10, 60], 151], ['UNSHIPPABLE']], ['generated mix 58', [[108, 80, 49], 50.5], ['UNSHIPPABLE']]]]
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
too heavy['UNSHIPPABLE']['UNSHIPPABLE']Passed
oversize['OVERSIZE']['OVERSIZE']Passed
length edge[][]Passed
oversize and heavy['OVERSIZE', 'AHS_WEIGHT']['OVERSIZE', 'AHS_WEIGHT']Passed
exact 130['AHS_DIM']['AHS_DIM']Passed
second side['AHS_DIM']['AHS_DIM']Passed
generated mix 6['UNSHIPPABLE']['UNSHIPPABLE']Passed
generated mix 14['UNSHIPPABLE']['UNSHIPPABLE']Passed

SHA-256 / ba2db51846e852dc3247ab53fed6458191753c0741bf62139aebe00a8aa00e32

Verification & scope

Stipulated thresholds; not a carrier service guide. 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:14.135925+00:00.

Case digest / beb32b7e04feac20e21371fe2e2f99c006bd3e68ee97981c74342bf037ed65be