FA-95611 / Shipping rate zone lookup / Open access
Cubic tiers: side limit on raw measurement · case 01
An 18.2 inch side that measures 18 after rounding is refused cubic pricing.
ROOT CAUSE
The longest side test uses raw dimensions instead of rounded ones.
VERIFIED REPAIR
Apply the 18 inch limit to the rounded dimensions.
Unsuccessful approach: An inclusive limit refuses sides of exactly 18 inches.
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(dims) > 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 = [[['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['side exactly 18', [[18, 10, 4], 3], ['CUBIC', 5]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['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]], ['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]]], [['generated mix 5', [[18.2, 6.3, 6], 20], ['CUBIC', 4]], ['generated mix 43', [[3, 18, 12], 19.9], ['CUBIC', 4]], ['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 8', [[10, 18.2, 9.9], 20.5], ['WEIGHT', 21]], ['generated mix 16', [[4.6, 6.3, 8.2], 2], ['CUBIC', 2]]], [['generated mix 51', [[18.2, 10, 3], 2], ['CUBIC', 4]], ['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]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['generated mix 19', [[18, 18, 6.3], 7.3], ['WEIGHT', 8]], ['generated mix 27', [[10, 8.2, 8], 20.5], ['WEIGHT', 21]]], [['generated mix 4', [[3, 18.2, 4.6], 0.5], ['CUBIC', 2]], ['generated mix 43', [[3, 18, 12], 19.9], ['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]], ['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 30', [[18, 6.3, 6], 20.5], ['WEIGHT', 21]], ['generated mix 38', [[8.2, 10, 19], 0.5], ['WEIGHT', 1]]], [['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]], ['side exactly 18', [[18, 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]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 42', [[18, 6.3, 9.9], 2], ['WEIGHT', 2]], ['generated mix 50', [[18, 3, 19], 19.9], ['WEIGHT', 20]]]]
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 |
|---|---|---|---|
| side rounds to 18 | ['WEIGHT', 3] | ['CUBIC', 5] | Failed |
| side exactly 18 | ['CUBIC', 5] | ['CUBIC', 5] | Passed |
| one cubic foot | ['WEIGHT', 5] | ['WEIGHT', 5] | Passed |
| quarter inch down | ['CUBIC', 3] | ['CUBIC', 3] | Passed |
| weight over 20 | ['WEIGHT', 21] | ['WEIGHT', 21] | Passed |
| tier half | ['CUBIC', 3] | ['CUBIC', 3] | Passed |
| small cube | ['CUBIC', 2] | ['CUBIC', 2] | Passed |
| generated mix 6 | ['WEIGHT', 8] | ['CUBIC', 5] | Failed |
SHA-256 / 10d24632b605bd67b80b8a46ea06eb6693873fb77872ebd4311b440f2343160e
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 = [[['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['side exactly 18', [[18, 10, 4], 3], ['CUBIC', 5]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['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]], ['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]]], [['generated mix 5', [[18.2, 6.3, 6], 20], ['CUBIC', 4]], ['generated mix 43', [[3, 18, 12], 19.9], ['CUBIC', 4]], ['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 8', [[10, 18.2, 9.9], 20.5], ['WEIGHT', 21]], ['generated mix 16', [[4.6, 6.3, 8.2], 2], ['CUBIC', 2]]], [['generated mix 51', [[18.2, 10, 3], 2], ['CUBIC', 4]], ['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]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['generated mix 19', [[18, 18, 6.3], 7.3], ['WEIGHT', 8]], ['generated mix 27', [[10, 8.2, 8], 20.5], ['WEIGHT', 21]]], [['generated mix 4', [[3, 18.2, 4.6], 0.5], ['CUBIC', 2]], ['generated mix 43', [[3, 18, 12], 19.9], ['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]], ['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 30', [[18, 6.3, 6], 20.5], ['WEIGHT', 21]], ['generated mix 38', [[8.2, 10, 19], 0.5], ['WEIGHT', 1]]], [['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]], ['side exactly 18', [[18, 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]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 42', [[18, 6.3, 9.9], 2], ['WEIGHT', 2]], ['generated mix 50', [[18, 3, 19], 19.9], ['WEIGHT', 20]]]]
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 |
|---|---|---|---|
| side rounds to 18 | ['WEIGHT', 3] | ['CUBIC', 5] | Failed |
| side exactly 18 | ['WEIGHT', 3] | ['CUBIC', 5] | Failed |
| one cubic foot | ['WEIGHT', 5] | ['WEIGHT', 5] | Passed |
| quarter inch down | ['CUBIC', 3] | ['CUBIC', 3] | Passed |
| weight over 20 | ['WEIGHT', 21] | ['WEIGHT', 21] | Passed |
| tier half | ['CUBIC', 3] | ['CUBIC', 3] | Passed |
| small cube | ['CUBIC', 2] | ['CUBIC', 2] | Passed |
| generated mix 6 | ['WEIGHT', 8] | ['CUBIC', 5] | Failed |
SHA-256 / 6dbfe3329592941d42c6a3236c19423f166a90d4c6ea1b9e0105b971faf0f3b0
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 = [[['side rounds to 18', [[18.2, 10, 4], 3], ['CUBIC', 5]], ['side exactly 18', [[18, 10, 4], 3], ['CUBIC', 5]], ['one cubic foot', [[12, 12, 12], 5], ['WEIGHT', 5]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['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]], ['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]]], [['generated mix 5', [[18.2, 6.3, 6], 20], ['CUBIC', 4]], ['generated mix 43', [[3, 18, 12], 19.9], ['CUBIC', 4]], ['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 8', [[10, 18.2, 9.9], 20.5], ['WEIGHT', 21]], ['generated mix 16', [[4.6, 6.3, 8.2], 2], ['CUBIC', 2]]], [['generated mix 51', [[18.2, 10, 3], 2], ['CUBIC', 4]], ['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]], ['weight 20', [[6, 6, 6], 20], ['CUBIC', 2]], ['generated mix 19', [[18, 18, 6.3], 7.3], ['WEIGHT', 8]], ['generated mix 27', [[10, 8.2, 8], 20.5], ['WEIGHT', 21]]], [['generated mix 4', [[3, 18.2, 4.6], 0.5], ['CUBIC', 2]], ['generated mix 43', [[3, 18, 12], 19.9], ['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]], ['weight over 20', [[6, 6, 6], 20.5], ['WEIGHT', 21]], ['generated mix 30', [[18, 6.3, 6], 20.5], ['WEIGHT', 21]], ['generated mix 38', [[8.2, 10, 19], 0.5], ['WEIGHT', 1]]], [['generated mix 6', [[10, 18.2, 4.6], 7.3], ['CUBIC', 5]], ['side exactly 18', [[18, 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]], ['quarter inch down', [[8.2, 8.2, 8.2], 2], ['CUBIC', 3]], ['generated mix 42', [[18, 6.3, 9.9], 2], ['WEIGHT', 2]], ['generated mix 50', [[18, 3, 19], 19.9], ['WEIGHT', 20]]]]
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 |
|---|---|---|---|
| side rounds to 18 | ['CUBIC', 5] | ['CUBIC', 5] | Passed |
| side exactly 18 | ['CUBIC', 5] | ['CUBIC', 5] | Passed |
| one cubic foot | ['WEIGHT', 5] | ['WEIGHT', 5] | Passed |
| quarter inch down | ['CUBIC', 3] | ['CUBIC', 3] | Passed |
| weight over 20 | ['WEIGHT', 21] | ['WEIGHT', 21] | Passed |
| tier half | ['CUBIC', 3] | ['CUBIC', 3] | Passed |
| small cube | ['CUBIC', 2] | ['CUBIC', 2] | Passed |
| generated mix 6 | ['CUBIC', 5] | ['CUBIC', 5] | Passed |
SHA-256 / 55cd6f0c3cd0f74fc6cb39e9fdde1b94f9a1115562ff622199cc3b79c84aefa0
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.245784+00:00.
Case digest / ce84117270f5d9a4e62f25953c41b69938aad575b6ea584f915732739fec8ba1