FAILURE MAP
← Case archive

FA-95616 / Shipping rate zone lookup / Open access

Cubic tiers: heavy parcels cubic priced · case 01

Dense parcels over 20 lb get cubic pricing.

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

ROOT CAUSE

The weight eligibility limit is not checked.

THE FAILURE

The weight eligibility limit is not checked.

Unsuccessful approach: An inclusive weight limit refuses parcels of exactly 20 lb.

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 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 = [[['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 5', [[18.2, 6.3, 6], 20], ['CUBIC', 4]], ['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]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['small cube', [[6, 6, 6], 2], ['CUBIC', 2]], ['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]]], [['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 9', [[18, 12, 6.3], 0.5], ['WEIGHT', 1]], ['generated mix 17', [[6, 19, 18], 19.9], ['WEIGHT', 20]]], [['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 71', [[3, 3, 3], 20], ['CUBIC', 1]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['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]], ['generated mix 19', [[18, 18, 6.3], 7.3], ['WEIGHT', 8]], ['generated mix 27', [[10, 8.2, 8], 20.5], ['WEIGHT', 21]]], [['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 70', [[3, 12, 8.2], 20], ['CUBIC', 2]], ['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]], ['generated mix 30', [[18, 6.3, 6], 20.5], ['WEIGHT', 21]], ['generated mix 38', [[8.2, 10, 19], 0.5], ['WEIGHT', 1]]], [['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 68', [[12, 3, 8.2], 20], ['CUBIC', 2]], ['side exactly 18', [[18, 10, 4], 3], ['CUBIC', 5]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 41', [[18.2, 18.2, 8], 19.9], ['WEIGHT', 20]], ['generated mix 49', [[19, 6, 8.2], 0.5], ['WEIGHT', 1]]]]
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
weight over 20['CUBIC', 2]['WEIGHT', 21]Failed
generated mix 5['CUBIC', 4]['CUBIC', 4]Passed
one cubic foot['WEIGHT', 5]['WEIGHT', 5]Passed
quarter inch down['CUBIC', 3]['CUBIC', 3]Passed
side exactly 18['CUBIC', 5]['CUBIC', 5]Passed
tier over cap['WEIGHT', 1]['WEIGHT', 1]Passed
small cube['CUBIC', 2]['CUBIC', 2]Passed
generated mix 6['CUBIC', 5]['CUBIC', 5]Passed

SHA-256 / 61e314ec4e6feff430e81f7f5520402cf79cc1afbb09633d471680b31c138b46

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)
    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 = [[['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 5', [[18.2, 6.3, 6], 20], ['CUBIC', 4]], ['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]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['small cube', [[6, 6, 6], 2], ['CUBIC', 2]], ['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]]], [['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 9', [[18, 12, 6.3], 0.5], ['WEIGHT', 1]], ['generated mix 17', [[6, 19, 18], 19.9], ['WEIGHT', 20]]], [['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 71', [[3, 3, 3], 20], ['CUBIC', 1]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['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]], ['generated mix 19', [[18, 18, 6.3], 7.3], ['WEIGHT', 8]], ['generated mix 27', [[10, 8.2, 8], 20.5], ['WEIGHT', 21]]], [['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 70', [[3, 12, 8.2], 20], ['CUBIC', 2]], ['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]], ['generated mix 30', [[18, 6.3, 6], 20.5], ['WEIGHT', 21]], ['generated mix 38', [[8.2, 10, 19], 0.5], ['WEIGHT', 1]]], [['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 68', [[12, 3, 8.2], 20], ['CUBIC', 2]], ['side exactly 18', [[18, 10, 4], 3], ['CUBIC', 5]], ['tier over cap', [[10, 10, 10], 1], ['WEIGHT', 1]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 41', [[18.2, 18.2, 8], 19.9], ['WEIGHT', 20]], ['generated mix 49', [[19, 6, 8.2], 0.5], ['WEIGHT', 1]]]]
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
weight over 20['WEIGHT', 21]['WEIGHT', 21]Passed
generated mix 5['WEIGHT', 20]['CUBIC', 4]Failed
one cubic foot['WEIGHT', 5]['WEIGHT', 5]Passed
quarter inch down['CUBIC', 3]['CUBIC', 3]Passed
side exactly 18['CUBIC', 5]['CUBIC', 5]Passed
tier over cap['WEIGHT', 1]['WEIGHT', 1]Passed
small cube['CUBIC', 2]['CUBIC', 2]Passed
generated mix 6['CUBIC', 5]['CUBIC', 5]Passed

SHA-256 / b6946916d54b94028a6920430da23271762117cce00ba6dd227b5f0241ba8d2a

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

Case digest / 46f53ceb6a18d0f4b4e842496dbc103ad30b972ce78240236ae527654fe30d8c