FA-95381 / Shipping rate zone lookup / Open access
Billable weight: one cubic foot parcels dim-rated · case 01
A parcel of exactly one cubic foot is charged dimensional weight.
ROOT CAUSE
The cube threshold is inclusive at 1728 cubic inches.
VERIFIED REPAIR
Apply dimensional weight only above 1728 cubic inches.
Unsuccessful approach: Testing unrounded dimensions against the threshold disagrees with the rounded cube used for billing.
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 = [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 = [[['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['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']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['generated mix 11', [[13.5, 24.5, 10.5], 0.2, 139], [28, 'DIM']], ['generated mix 19', [[24.5, 20, 16], 7.5, 139], [58, 'DIM']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['generated mix 22', [[24.5, 11.4, 20], 2.1, 166], [34, 'DIM']], ['generated mix 30', [[13.5, 18.5, 12], 5, 139], [23, 'DIM']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['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']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['generated mix 33', [[18.5, 16, 10.5], 20.01, 166], [21, 'ACTUAL']], ['generated mix 42', [[10.5, 18.5, 13.5], 1, 139], [22, 'DIM']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['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 45', [[10, 13.5, 16], 30, 139], [30, 'ACTUAL']], ['generated mix 53', [[12.5, 12, 12.5], 30, 166], [30, 'ACTUAL']]]]
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 |
|---|---|---|---|
| cube threshold exact | [13, 'DIM'] | [1, 'ACTUAL'] | Failed |
| generated mix 34 | [14, 'DIM'] | [14, 'DIM'] | Passed |
| half inch rounds up | [14, 'DIM'] | [14, 'DIM'] | 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 / 2e4a180c35a6f4c4ddd935edac5758ff104647bd7949c9dfa718c8d3f3fa0219
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 = [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 dims[0] * dims[1] * dims[2] > 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 = [[['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['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']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['generated mix 11', [[13.5, 24.5, 10.5], 0.2, 139], [28, 'DIM']], ['generated mix 19', [[24.5, 20, 16], 7.5, 139], [58, 'DIM']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['generated mix 22', [[24.5, 11.4, 20], 2.1, 166], [34, 'DIM']], ['generated mix 30', [[13.5, 18.5, 12], 5, 139], [23, 'DIM']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['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']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['generated mix 33', [[18.5, 16, 10.5], 20.01, 166], [21, 'ACTUAL']], ['generated mix 42', [[10.5, 18.5, 13.5], 1, 139], [22, 'DIM']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['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 45', [[10, 13.5, 16], 30, 139], [30, 'ACTUAL']], ['generated mix 53', [[12.5, 12, 12.5], 30, 166], [30, 'ACTUAL']]]]
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 |
|---|---|---|---|
| cube threshold exact | [1, 'ACTUAL'] | [1, 'ACTUAL'] | Passed |
| generated mix 34 | [5, 'ACTUAL'] | [14, 'DIM'] | Failed |
| half inch rounds up | [14, 'DIM'] | [14, 'DIM'] | 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 / 0b9f132524fc6c62b3676a460626d6a976979a9273a116c7d5059eb25507ecbe
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 = [[['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['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']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['generated mix 11', [[13.5, 24.5, 10.5], 0.2, 139], [28, 'DIM']], ['generated mix 19', [[24.5, 20, 16], 7.5, 139], [58, 'DIM']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['generated mix 22', [[24.5, 11.4, 20], 2.1, 166], [34, 'DIM']], ['generated mix 30', [[13.5, 18.5, 12], 5, 139], [23, 'DIM']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['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']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['generated mix 33', [[18.5, 16, 10.5], 20.01, 166], [21, 'ACTUAL']], ['generated mix 42', [[10.5, 18.5, 13.5], 1, 139], [22, 'DIM']]], [['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['generated mix 34', [[12.5, 12.5, 10.5], 5, 139], [14, 'DIM']], ['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 45', [[10, 13.5, 16], 30, 139], [30, 'ACTUAL']], ['generated mix 53', [[12.5, 12, 12.5], 30, 166], [30, 'ACTUAL']]]]
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 |
|---|---|---|---|
| cube threshold exact | [1, 'ACTUAL'] | [1, 'ACTUAL'] | Passed |
| generated mix 34 | [14, 'DIM'] | [14, 'DIM'] | Passed |
| half inch rounds up | [14, 'DIM'] | [14, 'DIM'] | 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 / 3431afa1474fb13a1c2648c3bf90f69609a4655181e1269a8a80551d1ec8dd3f
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.115038+00:00.
Case digest / 5a9fa4a1126c14b0c39385c9e2443edcf564575fe19573e63956cdfde2d442ff