FA-95476 / Shipping rate zone lookup / Open access
Size classes: 50 lb exactly treated as heavy · case 01
Parcels of exactly 50 lb are charged the weight handling fee.
ROOT CAUSE
The weight handling threshold is inclusive.
VERIFIED REPAIR
Apply AHS_WEIGHT only above 50 lb.
Unsuccessful approach: Truncating the weight misses parcels between 50 and 51 lb.
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 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 = [[['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['generated mix 21', [[49, 48, 10], 50.5], ['OVERSIZE', 'AHS_WEIGHT']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 6', [[110, 108, 110], 70], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['generated mix 10', [[20, 110, 110], 151], ['UNSHIPPABLE']], ['generated mix 18', [[60, 100, 108], 50], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['generated mix 21', [[49, 48, 10], 50.5], ['OVERSIZE', 'AHS_WEIGHT']], ['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 20', [[100, 60, 60], 50.5], ['UNSHIPPABLE']], ['generated mix 29', [[60, 20, 40], 50], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['length edge', [[48, 20, 10], 5], []], ['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 32', [[108, 80, 31], 151], ['UNSHIPPABLE']], ['generated mix 40', [[48, 110, 30], 50.5], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['generated mix 21', [[49, 48, 10], 50.5], ['OVERSIZE', 'AHS_WEIGHT']], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['generated mix 43', [[31, 20, 80], 5], ['UNSHIPPABLE']], ['generated mix 51', [[100, 49, 48], 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| generated mix 1 | ['OVERSIZE', 'AHS_WEIGHT'] | ['OVERSIZE'] | Failed |
| generated mix 21 | ['OVERSIZE', 'AHS_WEIGHT'] | ['OVERSIZE', 'AHS_WEIGHT'] | Passed |
| oversize | ['OVERSIZE'] | ['OVERSIZE'] | Passed |
| length edge | [] | [] | Passed |
| oversize and heavy | ['OVERSIZE', 'AHS_WEIGHT'] | ['OVERSIZE', 'AHS_WEIGHT'] | Passed |
| girth limit | ['UNSHIPPABLE'] | ['UNSHIPPABLE'] | Passed |
| second side | ['AHS_DIM'] | ['AHS_DIM'] | Passed |
| generated mix 6 | ['UNSHIPPABLE'] | ['UNSHIPPABLE'] | Passed |
SHA-256 / 84e35c712a24866f9365d47365282ee4d83e9ff162aa447dcfc325a2c998b919
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:
return ['UNSHIPPABLE']
codes = []
if size > 130:
codes.append('OVERSIZE')
elif L > 48 or s2 > 30:
codes.append('AHS_DIM')
if int(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 = [[['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['generated mix 21', [[49, 48, 10], 50.5], ['OVERSIZE', 'AHS_WEIGHT']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 6', [[110, 108, 110], 70], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['generated mix 10', [[20, 110, 110], 151], ['UNSHIPPABLE']], ['generated mix 18', [[60, 100, 108], 50], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['generated mix 21', [[49, 48, 10], 50.5], ['OVERSIZE', 'AHS_WEIGHT']], ['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 20', [[100, 60, 60], 50.5], ['UNSHIPPABLE']], ['generated mix 29', [[60, 20, 40], 50], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['length edge', [[48, 20, 10], 5], []], ['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 32', [[108, 80, 31], 151], ['UNSHIPPABLE']], ['generated mix 40', [[48, 110, 30], 50.5], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['generated mix 21', [[49, 48, 10], 50.5], ['OVERSIZE', 'AHS_WEIGHT']], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['generated mix 43', [[31, 20, 80], 5], ['UNSHIPPABLE']], ['generated mix 51', [[100, 49, 48], 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| generated mix 1 | ['OVERSIZE'] | ['OVERSIZE'] | Passed |
| generated mix 21 | ['OVERSIZE'] | ['OVERSIZE', 'AHS_WEIGHT'] | Failed |
| oversize | ['OVERSIZE'] | ['OVERSIZE'] | Passed |
| length edge | [] | [] | Passed |
| oversize and heavy | ['OVERSIZE', 'AHS_WEIGHT'] | ['OVERSIZE', 'AHS_WEIGHT'] | Passed |
| girth limit | ['UNSHIPPABLE'] | ['UNSHIPPABLE'] | Passed |
| second side | ['AHS_DIM'] | ['AHS_DIM'] | Passed |
| generated mix 6 | ['UNSHIPPABLE'] | ['UNSHIPPABLE'] | Passed |
SHA-256 / 49e8041d125b628797dceec3e4867e875355599b254d10f4a2af55c47309ea1d
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 = [[['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['generated mix 21', [[49, 48, 10], 50.5], ['OVERSIZE', 'AHS_WEIGHT']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 6', [[110, 108, 110], 70], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['generated mix 10', [[20, 110, 110], 151], ['UNSHIPPABLE']], ['generated mix 18', [[60, 100, 108], 50], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['generated mix 21', [[49, 48, 10], 50.5], ['OVERSIZE', 'AHS_WEIGHT']], ['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 20', [[100, 60, 60], 50.5], ['UNSHIPPABLE']], ['generated mix 29', [[60, 20, 40], 50], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['weight flags both', [[49, 10, 10], 50.5], ['AHS_DIM', 'AHS_WEIGHT']], ['length edge', [[48, 20, 10], 5], []], ['too heavy', [[10, 10, 10], 151], ['UNSHIPPABLE']], ['exact 130', [[50, 20, 20], 5], ['AHS_DIM']], ['second side', [[40, 31, 10], 5], ['AHS_DIM']], ['generated mix 32', [[108, 80, 31], 151], ['UNSHIPPABLE']], ['generated mix 40', [[48, 110, 30], 50.5], ['UNSHIPPABLE']]], [['generated mix 1', [[10, 40, 40], 50], ['OVERSIZE']], ['generated mix 21', [[49, 48, 10], 50.5], ['OVERSIZE', 'AHS_WEIGHT']], ['oversize and heavy', [[60, 20, 20], 70], ['OVERSIZE', 'AHS_WEIGHT']], ['girth limit', [[110, 10, 10], 5], ['UNSHIPPABLE']], ['oversize', [[10, 60, 30], 10], ['OVERSIZE']], ['length edge', [[48, 20, 10], 5], []], ['generated mix 43', [[31, 20, 80], 5], ['UNSHIPPABLE']], ['generated mix 51', [[100, 49, 48], 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| generated mix 1 | ['OVERSIZE'] | ['OVERSIZE'] | Passed |
| generated mix 21 | ['OVERSIZE', 'AHS_WEIGHT'] | ['OVERSIZE', 'AHS_WEIGHT'] | Passed |
| oversize | ['OVERSIZE'] | ['OVERSIZE'] | Passed |
| length edge | [] | [] | Passed |
| oversize and heavy | ['OVERSIZE', 'AHS_WEIGHT'] | ['OVERSIZE', 'AHS_WEIGHT'] | Passed |
| girth limit | ['UNSHIPPABLE'] | ['UNSHIPPABLE'] | Passed |
| second side | ['AHS_DIM'] | ['AHS_DIM'] | Passed |
| generated mix 6 | ['UNSHIPPABLE'] | ['UNSHIPPABLE'] | Passed |
SHA-256 / c0ed4c04a031fab86122370d9bea803519dd7734823912f22edcbe8c9460fd89
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:13.980168+00:00.
Case digest / 79204ba5f6e8c1a1de207a5c9d5c97ac7b777fad2dcd04f0444b5a0d812e3ed9