FAILURE MAP
← Case archive

FA-95621 / Shipping rate zone lookup / Open access

Cubic tiers: tier above 0.5 cubic feet priced cubic · case 01

Large parcels are quoted non-existent cubic tiers above 0.5.

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

ROOT CAUSE

The maximum cubic tier is never enforced.

VERIFIED REPAIR

Send tiers above 5 to weight pricing.

Unsuccessful approach: Clamping to tier 5 underprices large parcels as the top tier.

Case contract

dims inches, each rounded down to the quarter inch; weight lb. Eligible for cubic pricing when weight <= 20 and the longest rounded side <= 18. Cubic feet = product/1728, tier = tenths of a cubic foot rounded up (minimum 1); tiers above 5 are not cubic. Return ["CUBIC", tier] or ["WEIGHT", lb rounded up, minimum 1].

Why this case matters

Cubic pricing rates small dense parcels by volume tier instead of weight.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(dims, weight):
    q = [Fraction(math.floor(d * 4), 4) for d in dims]
    lb = max(1, math.ceil(weight))
    if weight > 20 or max(q) > 18:
        return ['WEIGHT', lb]
    cf = q[0] * q[1] * q[2] / 1728
    tenths = math.ceil(cf * 10)
    return ['CUBIC', max(1, tenths)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['small cube', [[6, 6, 6], 2], ['CUBIC', 2]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['tier half', [[12, 12, 3], 1], ['CUBIC', 3]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]]], [['generated mix 14', [[8.2, 17.9, 10], 7.3], ['WEIGHT', 8]], ['generated mix 13', [[8.2, 17.9, 18], 0.5], ['WEIGHT', 1]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['generated mix 7', [[10, 17.9, 4.6], 7.3], ['CUBIC', 5]], ['generated mix 17', [[6, 19, 18], 19.9], ['WEIGHT', 20]]], [['generated mix 42', [[18, 6.3, 9.9], 2], ['WEIGHT', 2]], ['generated mix 36', [[8, 18, 8.2], 20], ['WEIGHT', 20]], ['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['tier half', [[12, 12, 3], 1], ['CUBIC', 3]], ['small cube', [[6, 6, 6], 2], ['CUBIC', 2]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['generated mix 18', [[12, 3, 19], 19.9], ['WEIGHT', 20]], ['generated mix 26', [[12, 17.9, 12], 20.5], ['WEIGHT', 21]]], [['generated mix 60', [[18, 18.2, 8], 20], ['WEIGHT', 20]], ['generated mix 46', [[18, 10, 9.9], 19.9], ['WEIGHT', 20]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['side exactly 18', [[18, 10, 4], 3], ['CUBIC', 5]], ['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 29', [[12, 6, 4.6], 2], ['CUBIC', 2]], ['generated mix 37', [[6.3, 18.2, 10], 7.3], ['WEIGHT', 8]]], [['generated mix 79', [[8, 8, 18], 20], ['WEIGHT', 20]], ['generated mix 60', [[18, 18.2, 8], 20], ['WEIGHT', 20]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['generated mix 40', [[3, 19, 8.2], 2], ['WEIGHT', 2]], ['generated mix 48', [[3, 6, 18], 7.3], ['CUBIC', 2]]]]
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
one cubic foot['CUBIC', 10]['WEIGHT', 5]Failed
tier over cap['CUBIC', 6]['WEIGHT', 1]Failed
small cube['CUBIC', 2]['CUBIC', 2]Passed
side rounds to 18['CUBIC', 5]['CUBIC', 5]Passed
weight 20['CUBIC', 2]['CUBIC', 2]Passed
tier half['CUBIC', 3]['CUBIC', 3]Passed
quarter inch down['CUBIC', 3]['CUBIC', 3]Passed
generated mix 6['CUBIC', 5]['CUBIC', 5]Passed

SHA-256 / dd8ecf29fa98b62ce4e69c1ab2e38e2268274303b5b7e3d22467d1efe1af3d13

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(dims, weight):
    q = [Fraction(math.floor(d * 4), 4) for d in dims]
    lb = max(1, math.ceil(weight))
    if weight > 20 or max(q) > 18:
        return ['WEIGHT', lb]
    cf = q[0] * q[1] * q[2] / 1728
    tenths = math.ceil(cf * 10)
    tenths = min(tenths, 5)
    return ['CUBIC', max(1, tenths)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['small cube', [[6, 6, 6], 2], ['CUBIC', 2]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['tier half', [[12, 12, 3], 1], ['CUBIC', 3]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]]], [['generated mix 14', [[8.2, 17.9, 10], 7.3], ['WEIGHT', 8]], ['generated mix 13', [[8.2, 17.9, 18], 0.5], ['WEIGHT', 1]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['generated mix 7', [[10, 17.9, 4.6], 7.3], ['CUBIC', 5]], ['generated mix 17', [[6, 19, 18], 19.9], ['WEIGHT', 20]]], [['generated mix 42', [[18, 6.3, 9.9], 2], ['WEIGHT', 2]], ['generated mix 36', [[8, 18, 8.2], 20], ['WEIGHT', 20]], ['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['tier half', [[12, 12, 3], 1], ['CUBIC', 3]], ['small cube', [[6, 6, 6], 2], ['CUBIC', 2]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['generated mix 18', [[12, 3, 19], 19.9], ['WEIGHT', 20]], ['generated mix 26', [[12, 17.9, 12], 20.5], ['WEIGHT', 21]]], [['generated mix 60', [[18, 18.2, 8], 20], ['WEIGHT', 20]], ['generated mix 46', [[18, 10, 9.9], 19.9], ['WEIGHT', 20]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['side exactly 18', [[18, 10, 4], 3], ['CUBIC', 5]], ['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 29', [[12, 6, 4.6], 2], ['CUBIC', 2]], ['generated mix 37', [[6.3, 18.2, 10], 7.3], ['WEIGHT', 8]]], [['generated mix 79', [[8, 8, 18], 20], ['WEIGHT', 20]], ['generated mix 60', [[18, 18.2, 8], 20], ['WEIGHT', 20]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['generated mix 40', [[3, 19, 8.2], 2], ['WEIGHT', 2]], ['generated mix 48', [[3, 6, 18], 7.3], ['CUBIC', 2]]]]
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
one cubic foot['CUBIC', 5]['WEIGHT', 5]Failed
tier over cap['CUBIC', 5]['WEIGHT', 1]Failed
small cube['CUBIC', 2]['CUBIC', 2]Passed
side rounds to 18['CUBIC', 5]['CUBIC', 5]Passed
weight 20['CUBIC', 2]['CUBIC', 2]Passed
tier half['CUBIC', 3]['CUBIC', 3]Passed
quarter inch down['CUBIC', 3]['CUBIC', 3]Passed
generated mix 6['CUBIC', 5]['CUBIC', 5]Passed

SHA-256 / bb74a706a8a23ddb01c6122f3ee4cada77c4e495bbfe3ca48d821e09fbf888da

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
from fractions import Fraction
N = 1
observations = []
def solve(dims, weight):
    q = [Fraction(math.floor(d * 4), 4) for d in dims]
    lb = max(1, math.ceil(weight))
    if weight > 20 or max(q) > 18:
        return ['WEIGHT', lb]
    cf = q[0] * q[1] * q[2] / 1728
    tenths = math.ceil(cf * 10)
    if tenths > 5:
        return ['WEIGHT', lb]
    return ['CUBIC', max(1, tenths)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['small cube', [[6, 6, 6], 2], ['CUBIC', 2]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['tier half', [[12, 12, 3], 1], ['CUBIC', 3]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]]], [['generated mix 14', [[8.2, 17.9, 10], 7.3], ['WEIGHT', 8]], ['generated mix 13', [[8.2, 17.9, 18], 0.5], ['WEIGHT', 1]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['generated mix 7', [[10, 17.9, 4.6], 7.3], ['CUBIC', 5]], ['generated mix 17', [[6, 19, 18], 19.9], ['WEIGHT', 20]]], [['generated mix 42', [[18, 6.3, 9.9], 2], ['WEIGHT', 2]], ['generated mix 36', [[8, 18, 8.2], 20], ['WEIGHT', 20]], ['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['tier half', [[12, 12, 3], 1], ['CUBIC', 3]], ['small cube', [[6, 6, 6], 2], ['CUBIC', 2]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['generated mix 18', [[12, 3, 19], 19.9], ['WEIGHT', 20]], ['generated mix 26', [[12, 17.9, 12], 20.5], ['WEIGHT', 21]]], [['generated mix 60', [[18, 18.2, 8], 20], ['WEIGHT', 20]], ['generated mix 46', [[18, 10, 9.9], 19.9], ['WEIGHT', 20]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['side exactly 18', [[18, 10, 4], 3], ['CUBIC', 5]], ['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 29', [[12, 6, 4.6], 2], ['CUBIC', 2]], ['generated mix 37', [[6.3, 18.2, 10], 7.3], ['WEIGHT', 8]]], [['generated mix 79', [[8, 8, 18], 20], ['WEIGHT', 20]], ['generated mix 60', [[18, 18.2, 8], 20], ['WEIGHT', 20]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['generated mix 40', [[3, 19, 8.2], 2], ['WEIGHT', 2]], ['generated mix 48', [[3, 6, 18], 7.3], ['CUBIC', 2]]]]
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
one cubic foot['WEIGHT', 5]['WEIGHT', 5]Passed
tier over cap['WEIGHT', 1]['WEIGHT', 1]Passed
small cube['CUBIC', 2]['CUBIC', 2]Passed
side rounds to 18['CUBIC', 5]['CUBIC', 5]Passed
weight 20['CUBIC', 2]['CUBIC', 2]Passed
tier half['CUBIC', 3]['CUBIC', 3]Passed
quarter inch down['CUBIC', 3]['CUBIC', 3]Passed
generated mix 6['CUBIC', 5]['CUBIC', 5]Passed

SHA-256 / bd05aa6c17797bb52537c8be389f0af16302b9174918e41fe73fe488548d72cb

Verification & scope

Stipulated tier sizes and eligibility. 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:15.417853+00:00.

Case digest / d3a1600050b23ea343b8494ed647e82b1d74b4d2d626bc723cf29d9f4170f817