FAILURE MAP
← Case archive

FA-95371 / Shipping rate zone lookup / Open access

Billable weight: half inches rounded to even · case 01

A 12.5 inch side is measured as 12 inches, under-billing dimensional weight.

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

ROOT CAUSE

Dimensions use banker rounding, so .5 values round to the even inch.

VERIFIED REPAIR

Round each dimension half up to a whole inch.

Unsuccessful approach: Always rounding up bills 11.4 inches as 12.

Case contract

dims inches (each rounded half up to a whole inch), actual lb rounded up (minimum 1). Dim weight = ceil(L*W*H/divisor) using rounded dims, only when the rounded cube exceeds 1728 cubic inches. Return [billable, "DIM"] if dim weight strictly exceeds rounded actual, else [actual, "ACTUAL"].

Why this case matters

Carriers bill the greater of actual and dimensional weight before zone rating.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(dims, actual, divisor):
    r = [round(d) for d in dims]
    cube = r[0] * r[1] * r[2]
    act = max(1, math.ceil(actual))
    dimw = -(-cube // divisor) if cube > 1728 else 0
    if dimw > act:
        return [dimw, 'DIM']
    return [act, 'ACTUAL']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['generated mix 22', [[24.5, 11.4, 20], 2.1, 166], [34, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 8', [[18.5, 11.4, 11.4], 9, 166], [14, 'DIM']]], [['generated mix 13', [[24.5, 13.5, 12], 14, 166], [26, 'DIM']], ['generated mix 52', [[20, 10.5, 11.4], 0.2, 166], [15, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 9', [[12, 12, 13.5], 30, 139], [30, 'ACTUAL']], ['generated mix 18', [[13.5, 18.5, 10], 1, 139], [20, 'DIM']], ['generated mix 26', [[10, 18.5, 12], 5, 166], [14, 'DIM']]], [['generated mix 30', [[13.5, 18.5, 12], 5, 139], [23, 'DIM']], ['generated mix 8', [[18.5, 11.4, 11.4], 9, 166], [14, 'DIM']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 21', [[12.5, 20, 10], 30, 166], [30, 'ACTUAL']], ['generated mix 29', [[12, 10, 24.5], 0.2, 166], [19, 'DIM']], ['generated mix 38', [[24.5, 11.4, 10.5], 9, 139], [22, 'DIM']]], [['generated mix 40', [[24.5, 20, 18.5], 5, 139], [69, 'DIM']], ['generated mix 51', [[10, 11.4, 18.5], 2.1, 139], [16, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 31', [[12.5, 13.5, 12.5], 14, 139], [18, 'DIM']], ['generated mix 39', [[13.5, 24.5, 16], 7.5, 139], [41, 'DIM']], ['generated mix 48', [[18.5, 10.5, 20], 30, 139], [31, 'DIM']]], [['generated mix 51', [[10, 11.4, 18.5], 2.1, 139], [16, 'DIM']], ['generated mix 75', [[11.4, 20, 13.5], 0.2, 139], [23, 'DIM']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 42', [[10.5, 18.5, 13.5], 1, 139], [22, 'DIM']], ['generated mix 50', [[12, 12.5, 10], 20.01, 166], [21, 'ACTUAL']], ['generated mix 59', [[18.5, 18.5, 16], 9, 139], [42, 'DIM']]]]
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
half inch rounds up[5, 'ACTUAL'][14, 'DIM']Failed
generated mix 22[32, 'DIM'][34, 'DIM']Failed
cube threshold exact[1, 'ACTUAL'][1, 'ACTUAL']Passed
actual fraction up[8, 'ACTUAL'][8, 'ACTUAL']Passed
dim ceil[14, 'DIM'][14, 'DIM']Passed
just above threshold[12, 'DIM'][12, 'DIM']Passed
tie goes actual[58, 'ACTUAL'][58, 'ACTUAL']Passed
generated mix 8[14, 'DIM'][14, 'DIM']Passed

SHA-256 / a194f5d77b41fac0d04303da523e8ea7bf23fa7c8fe50f8a07618e7140fff9b4

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(dims, actual, divisor):
    r = [math.ceil(d) for d in dims]
    cube = r[0] * r[1] * r[2]
    act = max(1, math.ceil(actual))
    dimw = -(-cube // divisor) if cube > 1728 else 0
    if dimw > act:
        return [dimw, 'DIM']
    return [act, 'ACTUAL']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['generated mix 22', [[24.5, 11.4, 20], 2.1, 166], [34, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 8', [[18.5, 11.4, 11.4], 9, 166], [14, 'DIM']]], [['generated mix 13', [[24.5, 13.5, 12], 14, 166], [26, 'DIM']], ['generated mix 52', [[20, 10.5, 11.4], 0.2, 166], [15, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 9', [[12, 12, 13.5], 30, 139], [30, 'ACTUAL']], ['generated mix 18', [[13.5, 18.5, 10], 1, 139], [20, 'DIM']], ['generated mix 26', [[10, 18.5, 12], 5, 166], [14, 'DIM']]], [['generated mix 30', [[13.5, 18.5, 12], 5, 139], [23, 'DIM']], ['generated mix 8', [[18.5, 11.4, 11.4], 9, 166], [14, 'DIM']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 21', [[12.5, 20, 10], 30, 166], [30, 'ACTUAL']], ['generated mix 29', [[12, 10, 24.5], 0.2, 166], [19, 'DIM']], ['generated mix 38', [[24.5, 11.4, 10.5], 9, 139], [22, 'DIM']]], [['generated mix 40', [[24.5, 20, 18.5], 5, 139], [69, 'DIM']], ['generated mix 51', [[10, 11.4, 18.5], 2.1, 139], [16, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 31', [[12.5, 13.5, 12.5], 14, 139], [18, 'DIM']], ['generated mix 39', [[13.5, 24.5, 16], 7.5, 139], [41, 'DIM']], ['generated mix 48', [[18.5, 10.5, 20], 30, 139], [31, 'DIM']]], [['generated mix 51', [[10, 11.4, 18.5], 2.1, 139], [16, 'DIM']], ['generated mix 75', [[11.4, 20, 13.5], 0.2, 139], [23, 'DIM']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 42', [[10.5, 18.5, 13.5], 1, 139], [22, 'DIM']], ['generated mix 50', [[12, 12.5, 10], 20.01, 166], [21, 'ACTUAL']], ['generated mix 59', [[18.5, 18.5, 16], 9, 139], [42, 'DIM']]]]
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
half inch rounds up[14, 'DIM'][14, 'DIM']Passed
generated mix 22[37, 'DIM'][34, 'DIM']Failed
cube threshold exact[1, 'ACTUAL'][1, 'ACTUAL']Passed
actual fraction up[8, 'ACTUAL'][8, 'ACTUAL']Passed
dim ceil[14, 'DIM'][14, 'DIM']Passed
just above threshold[12, 'DIM'][12, 'DIM']Passed
tie goes actual[58, 'ACTUAL'][58, 'ACTUAL']Passed
generated mix 8[17, 'DIM'][14, 'DIM']Failed

SHA-256 / 96e56d98b7f41b75a34dc92a6bc0c420212672d47532f1040c87d111e374aaae

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(dims, actual, divisor):
    r = [int(math.floor(d + 0.5)) for d in dims]
    cube = r[0] * r[1] * r[2]
    act = max(1, math.ceil(actual))
    dimw = -(-cube // divisor) if cube > 1728 else 0
    if dimw > act:
        return [dimw, 'DIM']
    return [act, 'ACTUAL']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['generated mix 22', [[24.5, 11.4, 20], 2.1, 166], [34, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 8', [[18.5, 11.4, 11.4], 9, 166], [14, 'DIM']]], [['generated mix 13', [[24.5, 13.5, 12], 14, 166], [26, 'DIM']], ['generated mix 52', [[20, 10.5, 11.4], 0.2, 166], [15, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 9', [[12, 12, 13.5], 30, 139], [30, 'ACTUAL']], ['generated mix 18', [[13.5, 18.5, 10], 1, 139], [20, 'DIM']], ['generated mix 26', [[10, 18.5, 12], 5, 166], [14, 'DIM']]], [['generated mix 30', [[13.5, 18.5, 12], 5, 139], [23, 'DIM']], ['generated mix 8', [[18.5, 11.4, 11.4], 9, 166], [14, 'DIM']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 21', [[12.5, 20, 10], 30, 166], [30, 'ACTUAL']], ['generated mix 29', [[12, 10, 24.5], 0.2, 166], [19, 'DIM']], ['generated mix 38', [[24.5, 11.4, 10.5], 9, 139], [22, 'DIM']]], [['generated mix 40', [[24.5, 20, 18.5], 5, 139], [69, 'DIM']], ['generated mix 51', [[10, 11.4, 18.5], 2.1, 139], [16, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 31', [[12.5, 13.5, 12.5], 14, 139], [18, 'DIM']], ['generated mix 39', [[13.5, 24.5, 16], 7.5, 139], [41, 'DIM']], ['generated mix 48', [[18.5, 10.5, 20], 30, 139], [31, 'DIM']]], [['generated mix 51', [[10, 11.4, 18.5], 2.1, 139], [16, 'DIM']], ['generated mix 75', [[11.4, 20, 13.5], 0.2, 139], [23, 'DIM']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 42', [[10.5, 18.5, 13.5], 1, 139], [22, 'DIM']], ['generated mix 50', [[12, 12.5, 10], 20.01, 166], [21, 'ACTUAL']], ['generated mix 59', [[18.5, 18.5, 16], 9, 139], [42, 'DIM']]]]
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
half inch rounds up[14, 'DIM'][14, 'DIM']Passed
generated mix 22[34, 'DIM'][34, 'DIM']Passed
cube threshold exact[1, 'ACTUAL'][1, 'ACTUAL']Passed
actual fraction up[8, 'ACTUAL'][8, 'ACTUAL']Passed
dim ceil[14, 'DIM'][14, 'DIM']Passed
just above threshold[12, 'DIM'][12, 'DIM']Passed
tie goes actual[58, 'ACTUAL'][58, 'ACTUAL']Passed
generated mix 8[14, 'DIM'][14, 'DIM']Passed

SHA-256 / 855f945a28833b7a8a7946eb88d588af32ed0bb50643a42cb00b5d6514fa28cb

Verification & scope

Stipulated divisor and threshold; no carrier specific exceptions. 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.076216+00:00.

Case digest / 3d41432a8d36f6180b3b54b9e5a55e8e54eb20db8b70740ed9000ccbe6f953c3