FAILURE MAP
← Case archive

FA-95571 / Shipping rate zone lookup / Open access

Hundredweight: minimum not multiplied by pieces · case 01

Light multi-piece shipments are billed below the per-piece minimum.

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

ROOT CAUSE

The minimum charge is applied once per shipment instead of per piece.

THE FAILURE

The minimum charge is applied once per shipment instead of per piece.

Unsuccessful approach: Taking the minimum of the two caps the charge instead of flooring it.

Case contract

pieces lb; each piece rounds up to a whole lb and the shipment total is their sum. Qualifies when there are at least 2 pieces, total >= 200 lb and average piece weight >= 10 lb (total >= 10*n); otherwise ["PARCEL", total]. Charge = ceil(total * cents per cwt / 100) for zone (rates list zones 2-8), at least min_piece * pieces. Return [total, charge].

Why this case matters

Hundredweight programs price qualifying multi-piece shipments by aggregate weight.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(pieces, zone, rates, min_piece):
    ws = [math.ceil(w) for w in pieces]
    total = sum(ws)
    n = len(ws)
    if n < 2 or total < 200 or total < 10 * n:
        return ['PARCEL', total]
    rate = rates[zone - 2]
    charge = -(-total * rate // 100)
    return [total, max(charge, min_piece)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['minimum charge', [[100, 100], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 5000], [200, 10000]], ['threshold via rounding', [[99.5, 100], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [200, 8074]], ['per piece round', [[100.2, 100.2], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [202, 8155]], ['light average', [[150, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 200]], ['many one pound pieces', [[120, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 4, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], ['PARCEL', 210]], ['two exact', [[100, 100], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [200, 15110]], ['single piece', [[250], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 250]], ['generated mix 6', [[10, 10.4, 10.4], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 500], ['PARCEL', 32]]], [['generated mix 61', [[19.2, 9.2, 9.6, 9.2, 9.2, 9.2, 9.6, 9.2, 9.2, 9.2, 9.2, 9.2, 9.6, 9.6, 10.2, 10.2, 9.6, 10.2, 19.2, 10.2, 9.6, 9.2, 10.2, 9.2, 9.2], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], [275, 150000]], ['generated mix 2', [[40.9, 40.5, 50.5, 40.9, 40.5], 7, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 3000], [215, 15000]], ['light average', [[150, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 200]], ['average exactly 10', [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], [200, 9024]], ['rounded pieces reach average', [[9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], [250, 14103]], ['per piece round', [[100.2, 100.2], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [202, 8155]], ['generated mix 8', [[11, 10.4], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 22]], ['generated mix 16', [[67.3, 67.3, 76.3], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 3000], [213, 9611]]], [['generated mix 38', [[10.4, 10, 10, 20, 11, 11, 10, 10, 11, 10.4, 20, 20, 11, 11, 11, 10, 20, 10, 10.4, 11], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [250, 30000]], ['generated mix 22', [[150, 160], 7, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [310, 21412]], ['many one pound pieces', [[120, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 4, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], ['PARCEL', 210]], ['two exact', [[100, 100], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [200, 15110]], ['threshold via rounding', [[99.5, 100], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [200, 8074]], ['light average', [[150, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 200]], ['generated mix 18', [[20, 11, 10, 10.4, 10, 10, 10, 10, 10.4, 10, 20, 11, 10, 11, 20, 10, 11, 10.4, 10.4, 10.4, 10, 20, 11, 10, 20], 6, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [310, 37500]], ['generated mix 27', [[11, 11, 1, 2, 1, 1, 2, 1.4, 1.4, 11, 2, 1.4, 11, 1.4, 2, 2, 1, 11, 2, 2, 2, 1.4, 1.4, 1, 2], 7, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], ['PARCEL', 90]]], [['generated mix 75', [[66.3, 67.3, 76.3, 66.3, 76.3, 67.3, 66.3, 66.3, 67.3, 66.3, 66.7, 66.7, 66.3, 67.3, 76.3, 76.3, 66.7, 66.7, 76.3, 66.7], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 3000], [1394, 60000]], ['generated mix 39', [[40.9, 40.9, 50.5, 40.5, 40.5, 40.5, 40.5, 40.5, 50.5, 40.9, 41.5, 50.5, 40.9, 40.9, 50.5, 40.5, 50.5, 41.5, 40.5, 50.5], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 3000], [882, 60000]], ['per piece round', [[100.2, 100.2], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [202, 8155]], ['single piece', [[250], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 250]], ['minimum charge', [[100, 100], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 5000], [200, 10000]], ['many one pound pieces', [[120, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 4, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], ['PARCEL', 210]], ['generated mix 29', [[151], 6, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], ['PARCEL', 151]], ['generated mix 37', [[1.4, 11, 11], 6, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 24]]], [['generated mix 44', [[110.2, 100.2, 100.2], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], [313, 18000]], ['generated mix 45', [[66.7, 66.3, 76.3, 67.3, 67.3], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [347, 14009]], ['light average', [[150, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 200]], ['average exactly 10', [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], [200, 9024]], ['rounded pieces reach average', [[9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], [250, 14103]], ['per piece round', [[100.2, 100.2], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [202, 8155]], ['generated mix 40', [[66.7, 76.3], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 144]], ['generated mix 50', [[150, 150], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], [300, 13536]]]]
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
minimum charge[200, 8074][200, 10000]Failed
threshold via rounding[200, 8074][200, 8074]Passed
per piece round[202, 8155][202, 8155]Passed
light average['PARCEL', 200]['PARCEL', 200]Passed
many one pound pieces['PARCEL', 210]['PARCEL', 210]Passed
two exact[200, 15110][200, 15110]Passed
single piece['PARCEL', 250]['PARCEL', 250]Passed
generated mix 6['PARCEL', 32]['PARCEL', 32]Passed

SHA-256 / 5bae870b335430fb5a93dc88ff8bc3927f744a4cd92f913d90aab70af62b227b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(pieces, zone, rates, min_piece):
    ws = [math.ceil(w) for w in pieces]
    total = sum(ws)
    n = len(ws)
    if n < 2 or total < 200 or total < 10 * n:
        return ['PARCEL', total]
    rate = rates[zone - 2]
    charge = -(-total * rate // 100)
    return [total, min(charge, min_piece * n)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['minimum charge', [[100, 100], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 5000], [200, 10000]], ['threshold via rounding', [[99.5, 100], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [200, 8074]], ['per piece round', [[100.2, 100.2], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [202, 8155]], ['light average', [[150, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 200]], ['many one pound pieces', [[120, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 4, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], ['PARCEL', 210]], ['two exact', [[100, 100], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [200, 15110]], ['single piece', [[250], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 250]], ['generated mix 6', [[10, 10.4, 10.4], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 500], ['PARCEL', 32]]], [['generated mix 61', [[19.2, 9.2, 9.6, 9.2, 9.2, 9.2, 9.6, 9.2, 9.2, 9.2, 9.2, 9.2, 9.6, 9.6, 10.2, 10.2, 9.6, 10.2, 19.2, 10.2, 9.6, 9.2, 10.2, 9.2, 9.2], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], [275, 150000]], ['generated mix 2', [[40.9, 40.5, 50.5, 40.9, 40.5], 7, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 3000], [215, 15000]], ['light average', [[150, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 200]], ['average exactly 10', [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], [200, 9024]], ['rounded pieces reach average', [[9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], [250, 14103]], ['per piece round', [[100.2, 100.2], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [202, 8155]], ['generated mix 8', [[11, 10.4], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 22]], ['generated mix 16', [[67.3, 67.3, 76.3], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 3000], [213, 9611]]], [['generated mix 38', [[10.4, 10, 10, 20, 11, 11, 10, 10, 11, 10.4, 20, 20, 11, 11, 11, 10, 20, 10, 10.4, 11], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [250, 30000]], ['generated mix 22', [[150, 160], 7, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [310, 21412]], ['many one pound pieces', [[120, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 4, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], ['PARCEL', 210]], ['two exact', [[100, 100], 8, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [200, 15110]], ['threshold via rounding', [[99.5, 100], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [200, 8074]], ['light average', [[150, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 200]], ['generated mix 18', [[20, 11, 10, 10.4, 10, 10, 10, 10, 10.4, 10, 20, 11, 10, 11, 20, 10, 11, 10.4, 10.4, 10.4, 10, 20, 11, 10, 20], 6, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [310, 37500]], ['generated mix 27', [[11, 11, 1, 2, 1, 1, 2, 1.4, 1.4, 11, 2, 1.4, 11, 1.4, 2, 2, 1, 11, 2, 2, 2, 1.4, 1.4, 1, 2], 7, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], ['PARCEL', 90]]], [['generated mix 75', [[66.3, 67.3, 76.3, 66.3, 76.3, 67.3, 66.3, 66.3, 67.3, 66.3, 66.7, 66.7, 66.3, 67.3, 76.3, 76.3, 66.7, 66.7, 76.3, 66.7], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 3000], [1394, 60000]], ['generated mix 39', [[40.9, 40.9, 50.5, 40.5, 40.5, 40.5, 40.5, 40.5, 50.5, 40.9, 41.5, 50.5, 40.9, 40.9, 50.5, 40.5, 50.5, 41.5, 40.5, 50.5], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 3000], [882, 60000]], ['per piece round', [[100.2, 100.2], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [202, 8155]], ['single piece', [[250], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 250]], ['minimum charge', [[100, 100], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 5000], [200, 10000]], ['many one pound pieces', [[120, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 4, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], ['PARCEL', 210]], ['generated mix 29', [[151], 6, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], ['PARCEL', 151]], ['generated mix 37', [[1.4, 11, 11], 6, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 24]]], [['generated mix 44', [[110.2, 100.2, 100.2], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], [313, 18000]], ['generated mix 45', [[66.7, 66.3, 76.3, 67.3, 67.3], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [347, 14009]], ['light average', [[150, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 200]], ['average exactly 10', [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], [200, 9024]], ['rounded pieces reach average', [[9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2, 9.2], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 100], [250, 14103]], ['per piece round', [[100.2, 100.2], 2, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], [202, 8155]], ['generated mix 40', [[66.7, 76.3], 5, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 1500], ['PARCEL', 144]], ['generated mix 50', [[150, 150], 3, [4037, 4512, 5093, 5641, 6218, 6907, 7555], 6000], [300, 13536]]]]
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
minimum charge[200, 8074][200, 10000]Failed
threshold via rounding[200, 3000][200, 8074]Failed
per piece round[202, 3000][202, 8155]Failed
light average['PARCEL', 200]['PARCEL', 200]Passed
many one pound pieces['PARCEL', 210]['PARCEL', 210]Passed
two exact[200, 3000][200, 15110]Failed
single piece['PARCEL', 250]['PARCEL', 250]Passed
generated mix 6['PARCEL', 32]['PARCEL', 32]Passed

SHA-256 / 490689cbaa0902008f1a5fbcd0f51964ba57cfe38ee5ce59086201de783747e3

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 qualification and rate rules. 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:14.913563+00:00.

Case digest / fbf797a256848879f16b5b83bdf7a0891e1ca86331ff8338467fc3ce98658539