FAILURE MAP
← Case archive

FA-95396 / Shipping rate zone lookup / Open access

Billable weight: tie labelled dimensional · case 01

Parcels whose dim weight equals actual weight are labelled DIM, triggering dim audits.

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

ROOT CAUSE

The DIM label comparison is inclusive.

THE FAILURE

The DIM label comparison is inclusive.

Unsuccessful approach: Labelling every large parcel DIM ignores which weight actually billed.

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 = [[['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 4', [[24.5, 10, 12], 20.01, 166], [21, 'ACTUAL']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['generated mix 9', [[12, 12, 13.5], 30, 139], [30, 'ACTUAL']]], [['generated mix 33', [[18.5, 16, 10.5], 20.01, 166], [21, 'ACTUAL']], ['generated mix 24', [[16, 11.4, 10], 30, 166], [30, 'ACTUAL']], ['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 17', [[12, 12, 10.5], 2.1, 139], [3, 'ACTUAL']], ['generated mix 26', [[10, 18.5, 12], 5, 166], [14, 'DIM']]], [['generated mix 64', [[13.5, 12, 20], 20.01, 166], [21, 'ACTUAL']], ['generated mix 56', [[12, 13.5, 16], 30, 166], [30, 'ACTUAL']], ['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 20', [[12, 10.5, 10], 30, 166], [30, 'ACTUAL']], ['generated mix 28', [[18.5, 12, 11.4], 2.1, 166], [16, 'DIM']], ['generated mix 36', [[20, 18.5, 12], 2.1, 166], [28, 'DIM']]], [['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 74', [[24.5, 11.4, 11.4], 30, 139], [30, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, '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 41', [[10, 16, 10], 14, 139], [14, 'ACTUAL']]], [['generated mix 33', [[18.5, 16, 10.5], 20.01, 166], [21, 'ACTUAL']], ['generated mix 5', [[11.4, 12.5, 12.5], 30, 166], [30, 'ACTUAL']], ['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 44', [[16, 10.5, 24.5], 2.1, 166], [27, 'DIM']], ['generated mix 52', [[20, 10.5, 11.4], 0.2, 166], [15, 'DIM']], ['generated mix 60', [[18.5, 11.4, 18.5], 14, 139], [29, '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
tie goes actual[58, 'DIM'][58, 'ACTUAL']Failed
generated mix 4[21, 'ACTUAL'][21, 'ACTUAL']Passed
half inch rounds up[14, 'DIM'][14, 'DIM']Passed
just above threshold[12, 'DIM'][12, 'DIM']Passed
dim ceil[14, 'DIM'][14, 'DIM']Passed
cube threshold exact[1, 'ACTUAL'][1, 'ACTUAL']Passed
actual fraction up[8, 'ACTUAL'][8, 'ACTUAL']Passed
generated mix 9[30, 'ACTUAL'][30, 'ACTUAL']Passed

SHA-256 / 02f0fdfc937481215acafceb2e1df22cafec79b94abf0ab669cc3dcafe437463

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 cube > 1728 else 0
    if dimw > act or cube > 1728:
        return [dimw, 'DIM']
    return [act, 'ACTUAL']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 4', [[24.5, 10, 12], 20.01, 166], [21, 'ACTUAL']], ['half inch rounds up', [[12.5, 12, 12], 5, 139], [14, 'DIM']], ['just above threshold', [[12, 12, 13], 1, 166], [12, 'DIM']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, 'ACTUAL']], ['generated mix 9', [[12, 12, 13.5], 30, 139], [30, 'ACTUAL']]], [['generated mix 33', [[18.5, 16, 10.5], 20.01, 166], [21, 'ACTUAL']], ['generated mix 24', [[16, 11.4, 10], 30, 166], [30, 'ACTUAL']], ['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 17', [[12, 12, 10.5], 2.1, 139], [3, 'ACTUAL']], ['generated mix 26', [[10, 18.5, 12], 5, 166], [14, 'DIM']]], [['generated mix 64', [[13.5, 12, 20], 20.01, 166], [21, 'ACTUAL']], ['generated mix 56', [[12, 13.5, 16], 30, 166], [30, 'ACTUAL']], ['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 20', [[12, 10.5, 10], 30, 166], [30, 'ACTUAL']], ['generated mix 28', [[18.5, 12, 11.4], 2.1, 166], [16, 'DIM']], ['generated mix 36', [[20, 18.5, 12], 2.1, 166], [28, 'DIM']]], [['tie goes actual', [[20, 20, 20], 58, 139], [58, 'ACTUAL']], ['generated mix 74', [[24.5, 11.4, 11.4], 30, 139], [30, 'ACTUAL']], ['dim ceil', [[18, 12, 10], 1, 166], [14, 'DIM']], ['cube threshold exact', [[12, 12, 12], 1, 139], [1, 'ACTUAL']], ['actual fraction up', [[10, 10, 10], 7.2, 139], [8, '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 41', [[10, 16, 10], 14, 139], [14, 'ACTUAL']]], [['generated mix 33', [[18.5, 16, 10.5], 20.01, 166], [21, 'ACTUAL']], ['generated mix 5', [[11.4, 12.5, 12.5], 30, 166], [30, 'ACTUAL']], ['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 44', [[16, 10.5, 24.5], 2.1, 166], [27, 'DIM']], ['generated mix 52', [[20, 10.5, 11.4], 0.2, 166], [15, 'DIM']], ['generated mix 60', [[18.5, 11.4, 18.5], 14, 139], [29, '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
tie goes actual[58, 'DIM'][58, 'ACTUAL']Failed
generated mix 4[19, 'DIM'][21, 'ACTUAL']Failed
half inch rounds up[14, 'DIM'][14, 'DIM']Passed
just above threshold[12, 'DIM'][12, 'DIM']Passed
dim ceil[14, 'DIM'][14, 'DIM']Passed
cube threshold exact[1, 'ACTUAL'][1, 'ACTUAL']Passed
actual fraction up[8, 'ACTUAL'][8, 'ACTUAL']Passed
generated mix 9[15, 'DIM'][30, 'ACTUAL']Failed

SHA-256 / f75150b1151864d6ef13f993a57df6bed7b336774389202b8bd2aa58abd775de

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

Case digest / 99210f46c4f2f53edc54a78c0e4cf414101834d7712dbadf9276872e2c57bb8d