FA-95706 / Shipping rate zone lookup / Open access
Rate shopping: exclusions case-sensitive · case 01
A carrier blocked by the shipper is still selected when the block list uses different case.
ROOT CAUSE
Exclusions are matched with exact case.
THE FAILURE
Exclusions are matched with exact case.
Unsuccessful approach: Lower-casing only the carrier fails for upper-case block entries.
Case contract
quotes [[carrier, service, price_cents, transit_days, max_lb]]. Eligible when weight <= max_lb, transit <= deadline and the carrier is not excluded (case-insensitive). Choose lowest price, then fewest days, then carrier, then service. Return [carrier, service, price] or None.
Why this case matters
Rate shopping chooses the cheapest eligible carrier service for a delivery promise.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(quotes, weight, deadline, excluded):
excl = {e.lower() for e in excluded}
best = None
for carrier, service, price, days, max_lb in quotes:
if weight > max_lb or days > deadline:
continue
if carrier in excluded:
continue
key = (price, days, carrier, service)
if best is None or key < best:
best = key
return [best[2], best[3], best[0]] if best else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['excluded lowercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['excluded mixed case', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['faster on price tie', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, []], ['USP', 'PRIORITY', 1200]], ['weight at limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 6, []], ['DHL', 'GROUND', 1100]], ['excluded uppercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['DHL']], ['USP', 'PRIORITY', 1200]], ['deadline inclusive', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, []], ['DHL', 'GROUND', 1100]], ['generated mix 6', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 70.2, 5, ['Usp']], ['FDX', 'EXPRESS', 2500]], ['generated mix 14', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 5, ['DHL']], ['USP', 'PRIORITY', 1200]]], [['generated mix 68', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['generated mix 45', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 120, 6, ['upx', 'FDX']], None], ['weight over limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 6, []], ['USP', 'PRIORITY', 1200]], ['excluded uppercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['DHL']], ['USP', 'PRIORITY', 1200]], ['nothing', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 0, []], None], ['deadline inclusive', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, []], ['DHL', 'GROUND', 1100]], ['generated mix 8', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['generated mix 16', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 70.2, 7, ['dhl']], ['FDX', 'EXPRESS', 2500]]], [['generated mix 59', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 70, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['generated mix 71', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 7, ['DHL']], ['USP', 'PRIORITY', 1200]], ['excluded mixed case', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['faster on price tie', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, []], ['USP', 'PRIORITY', 1200]], ['weight at limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 6, []], ['DHL', 'GROUND', 1100]], ['excluded lowercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['generated mix 19', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['DHL']], ['USP', 'PRIORITY', 1200]], ['generated mix 27', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 1, 5, ['dhl']], ['USP', 'PRIORITY', 1200]]], [['excluded mixed case', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['weight at limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 6, []], ['DHL', 'GROUND', 1100]], ['excluded lowercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['nothing', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 0, []], None], ['deadline inclusive', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, []], ['DHL', 'GROUND', 1100]], ['generated mix 31', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 1, ['upx', 'FDX']], None], ['generated mix 39', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 5, []], ['USP', 'PRIORITY', 1200]], ['generated mix 47', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 5, ['DHL']], ['USP', 'PRIORITY', 1200]]], [['generated mix 73', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['generated mix 45', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 120, 6, ['upx', 'FDX']], None], ['excluded lowercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['excluded mixed case', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['faster on price tie', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, []], ['USP', 'PRIORITY', 1200]], ['weight at limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 6, []], ['DHL', 'GROUND', 1100]], ['generated mix 41', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 120, 6, []], ['FDX', 'EXPRESS', 2500]], ['generated mix 50', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 70.2, 6, ['DHL']], ['FDX', 'EXPRESS', 2500]]]]
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 |
|---|---|---|---|
| excluded lowercase | ['DHL', 'GROUND', 1100] | ['USP', 'PRIORITY', 1200] | Failed |
| excluded mixed case | ['USP', 'PRIORITY', 1200] | ['UPX', 'GROUND', 1200] | Failed |
| faster on price tie | ['USP', 'PRIORITY', 1200] | ['USP', 'PRIORITY', 1200] | Passed |
| weight at limit | ['DHL', 'GROUND', 1100] | ['DHL', 'GROUND', 1100] | Passed |
| excluded uppercase | ['USP', 'PRIORITY', 1200] | ['USP', 'PRIORITY', 1200] | Passed |
| deadline inclusive | ['DHL', 'GROUND', 1100] | ['DHL', 'GROUND', 1100] | Passed |
| generated mix 6 | ['FDX', 'EXPRESS', 2500] | ['FDX', 'EXPRESS', 2500] | Passed |
| generated mix 14 | ['USP', 'PRIORITY', 1200] | ['USP', 'PRIORITY', 1200] | Passed |
SHA-256 / 62f6a0e97d7604256ff94226949d1f74e5557b0efd39b5b65be8a40172f82723
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(quotes, weight, deadline, excluded):
excl = {e.lower() for e in excluded}
best = None
for carrier, service, price, days, max_lb in quotes:
if weight > max_lb or days > deadline:
continue
if carrier.lower() in excluded:
continue
key = (price, days, carrier, service)
if best is None or key < best:
best = key
return [best[2], best[3], best[0]] if best else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['excluded lowercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['excluded mixed case', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['faster on price tie', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, []], ['USP', 'PRIORITY', 1200]], ['weight at limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 6, []], ['DHL', 'GROUND', 1100]], ['excluded uppercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['DHL']], ['USP', 'PRIORITY', 1200]], ['deadline inclusive', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, []], ['DHL', 'GROUND', 1100]], ['generated mix 6', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 70.2, 5, ['Usp']], ['FDX', 'EXPRESS', 2500]], ['generated mix 14', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 5, ['DHL']], ['USP', 'PRIORITY', 1200]]], [['generated mix 68', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['generated mix 45', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 120, 6, ['upx', 'FDX']], None], ['weight over limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 6, []], ['USP', 'PRIORITY', 1200]], ['excluded uppercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['DHL']], ['USP', 'PRIORITY', 1200]], ['nothing', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 0, []], None], ['deadline inclusive', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, []], ['DHL', 'GROUND', 1100]], ['generated mix 8', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['generated mix 16', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 70.2, 7, ['dhl']], ['FDX', 'EXPRESS', 2500]]], [['generated mix 59', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 70, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['generated mix 71', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 7, ['DHL']], ['USP', 'PRIORITY', 1200]], ['excluded mixed case', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['faster on price tie', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, []], ['USP', 'PRIORITY', 1200]], ['weight at limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 6, []], ['DHL', 'GROUND', 1100]], ['excluded lowercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['generated mix 19', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['DHL']], ['USP', 'PRIORITY', 1200]], ['generated mix 27', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 1, 5, ['dhl']], ['USP', 'PRIORITY', 1200]]], [['excluded mixed case', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['weight at limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 6, []], ['DHL', 'GROUND', 1100]], ['excluded lowercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['nothing', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 0, []], None], ['deadline inclusive', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, []], ['DHL', 'GROUND', 1100]], ['generated mix 31', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 1, ['upx', 'FDX']], None], ['generated mix 39', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 5, []], ['USP', 'PRIORITY', 1200]], ['generated mix 47', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 5, ['DHL']], ['USP', 'PRIORITY', 1200]]], [['generated mix 73', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50.5, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['generated mix 45', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 120, 6, ['upx', 'FDX']], None], ['excluded lowercase', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 6, ['dhl']], ['USP', 'PRIORITY', 1200]], ['excluded mixed case', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, ['Usp']], ['UPX', 'GROUND', 1200]], ['faster on price tie', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 10, 5, []], ['USP', 'PRIORITY', 1200]], ['weight at limit', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 50, 6, []], ['DHL', 'GROUND', 1100]], ['generated mix 41', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 120, 6, []], ['FDX', 'EXPRESS', 2500]], ['generated mix 50', [[['UPX', 'GROUND', 1200, 5, 70], ['FDX', 'EXPRESS', 2500, 1, 150], ['USP', 'PRIORITY', 1200, 3, 70], ['DHL', 'GROUND', 1100, 6, 50]], 70.2, 6, ['DHL']], ['FDX', 'EXPRESS', 2500]]]]
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 |
|---|---|---|---|
| excluded lowercase | ['USP', 'PRIORITY', 1200] | ['USP', 'PRIORITY', 1200] | Passed |
| excluded mixed case | ['USP', 'PRIORITY', 1200] | ['UPX', 'GROUND', 1200] | Failed |
| faster on price tie | ['USP', 'PRIORITY', 1200] | ['USP', 'PRIORITY', 1200] | Passed |
| weight at limit | ['DHL', 'GROUND', 1100] | ['DHL', 'GROUND', 1100] | Passed |
| excluded uppercase | ['DHL', 'GROUND', 1100] | ['USP', 'PRIORITY', 1200] | Failed |
| deadline inclusive | ['DHL', 'GROUND', 1100] | ['DHL', 'GROUND', 1100] | Passed |
| generated mix 6 | ['FDX', 'EXPRESS', 2500] | ['FDX', 'EXPRESS', 2500] | Passed |
| generated mix 14 | ['USP', 'PRIORITY', 1200] | ['USP', 'PRIORITY', 1200] | Passed |
SHA-256 / dcbd5556c37a73360c0c8433db14dff6a4d8fc05c3fdfc444286481fdfa16e71
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 quote list; no service guarantees or surcharges. 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:16.171701+00:00.
Case digest / 0ab57b9b9a3163e56181df7279f84ab03e4a303af3c9ff849ab4af3c53ab3828