broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = min(x["ceiling"],x["current"]+x["increment"])
    v1 = x["current"]<x["ceiling"] and x["increment"]>0
    v2 = max(0,x["quantity"]-x["filled"])
    v3 = x["enabled"] and not x["owner_present"]
    v4 = [] if x["token"]==x["last_token"] else [x["lot"]]
    v5 = x["lot"] in x["authorized_lots"]
    v6 = x["enabled"]
    v7 = x["manual_price"] if x["manual_active"] else x["current"]
    v8 = min(max(0,x["quantity"]-x["filled"]),x["credit"]//max(1,x["unit_hold"]))
    v9 = [t for t in x["triggers"] if t in x["allowed"]] if x["auction_open"] else []
    return {'bounded-next-offer':v0,'ceiling-exhaustion':v1,'remaining-proxy-size':v2,'manual-control-handoff':v3,'one-trigger-submission':v4,'lot-mandate':v5,'suspension-resume':v6,'manual-price-precedence':v7,'proxy-collateral-size':v8,'closed-auction-trigger':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('suspended', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [False, False, False, False, False]), ('ceiling reached / suspended', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [False, False, False, False, False]), ('disabled instruction', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [False, False, False, False, False]), ('ceiling reached / disabled instruction', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [False, False, False, False, False]), ('normal contract', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('ceiling reached', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('step exceeds ceiling', {'current': 15, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('owner controls bid', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': True, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('token replay', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't1', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('wrong lot', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'B', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('manual override absent', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['suspension-resume'], expected[N-1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = min(x["ceiling"],x["current"]+x["increment"])
    v1 = x["current"]<x["ceiling"] and x["increment"]>0
    v2 = max(0,x["quantity"]-x["filled"])
    v3 = x["enabled"] and not x["owner_present"]
    v4 = [] if x["token"]==x["last_token"] else [x["lot"]]
    v5 = x["lot"] in x["authorized_lots"]
    v6 = not x["suspended"]
    v7 = x["manual_price"] if x["manual_active"] else x["current"]
    v8 = min(max(0,x["quantity"]-x["filled"]),x["credit"]//max(1,x["unit_hold"]))
    v9 = [t for t in x["triggers"] if t in x["allowed"]] if x["auction_open"] else []
    return {'bounded-next-offer':v0,'ceiling-exhaustion':v1,'remaining-proxy-size':v2,'manual-control-handoff':v3,'one-trigger-submission':v4,'lot-mandate':v5,'suspension-resume':v6,'manual-price-precedence':v7,'proxy-collateral-size':v8,'closed-auction-trigger':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('suspended', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [False, False, False, False, False]), ('ceiling reached / suspended', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [False, False, False, False, False]), ('disabled instruction', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [False, False, False, False, False]), ('ceiling reached / disabled instruction', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [False, False, False, False, False]), ('normal contract', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('ceiling reached', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('step exceeds ceiling', {'current': 15, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('owner controls bid', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': True, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('token replay', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't1', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('wrong lot', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'B', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True]), ('manual override absent', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [True, True, True, True, True])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['suspension-resume'], expected[N-1])
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)

prompt:
Proxy suspension is lost or enables an otherwise disabled instruction.

A bidder authorizes a bounded proxy to submit offers for a specific lot. A proxy instruction specifies a price ceiling, per-step increment, remaining quantity, owner consent and a one-use trigger token. Outputs are actionable submissions, not an optimal bidding strategy. Named decision suspension-resume: For suspension resume, apply the stipulated decision x["enabled"] and not x["suspended"].

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = min(x["ceiling"],x["current"]+x["increment"])
    v1 = x["current"]<x["ceiling"] and x["increment"]>0
    v2 = max(0,x["quantity"]-x["filled"])
    v3 = x["enabled"] and not x["owner_present"]
    v4 = [] if x["token"]==x["last_token"] else [x["lot"]]
    v5 = x["lot"] in x["authorized_lots"]
    v6 = x["enabled"] and not x["suspended"]
    v7 = max(x["manual_price"],x["current"])
    v8 = min(max(0,x["quantity"]-x["filled"]),x["credit"]//max(1,x["unit_hold"]))
    v9 = [t for t in x["triggers"] if t in x["allowed"]] if x["auction_open"] else []
    return {'bounded-next-offer':v0,'ceiling-exhaustion':v1,'remaining-proxy-size':v2,'manual-control-handoff':v3,'one-trigger-submission':v4,'lot-mandate':v5,'suspension-resume':v6,'manual-price-precedence':v7,'proxy-collateral-size':v8,'closed-auction-trigger':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('ceiling reached', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('step exceeds ceiling', {'current': 15, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('manual override absent', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [10, 20, 30, 40, 50]), ('ceiling reached / manual override absent', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [16, 32, 48, 64, 80]), ('normal contract', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('disabled instruction', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('owner controls bid', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': True, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('token replay', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't1', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('wrong lot', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'B', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('suspended', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['manual-price-precedence'], expected[N-1])
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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = min(x["ceiling"],x["current"]+x["increment"])
    v1 = x["current"]<x["ceiling"] and x["increment"]>0
    v2 = max(0,x["quantity"]-x["filled"])
    v3 = x["enabled"] and not x["owner_present"]
    v4 = [] if x["token"]==x["last_token"] else [x["lot"]]
    v5 = x["lot"] in x["authorized_lots"]
    v6 = x["enabled"] and not x["suspended"]
    v7 = x["manual_price"]
    v8 = min(max(0,x["quantity"]-x["filled"]),x["credit"]//max(1,x["unit_hold"]))
    v9 = [t for t in x["triggers"] if t in x["allowed"]] if x["auction_open"] else []
    return {'bounded-next-offer':v0,'ceiling-exhaustion':v1,'remaining-proxy-size':v2,'manual-control-handoff':v3,'one-trigger-submission':v4,'lot-mandate':v5,'suspension-resume':v6,'manual-price-precedence':v7,'proxy-collateral-size':v8,'closed-auction-trigger':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('ceiling reached', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('step exceeds ceiling', {'current': 15, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('manual override absent', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [10, 20, 30, 40, 50]), ('ceiling reached / manual override absent', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [16, 32, 48, 64, 80]), ('normal contract', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('disabled instruction', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('owner controls bid', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': True, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('token replay', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't1', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('wrong lot', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'B', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60]), ('suspended', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [12, 24, 36, 48, 60])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['manual-price-precedence'], expected[N-1])
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)

prompt:
Inactive manual overrides change the proxy starting price.

A bidder authorizes a bounded proxy to submit offers for a specific lot. A proxy instruction specifies a price ceiling, per-step increment, remaining quantity, owner consent and a one-use trigger token. Outputs are actionable submissions, not an optimal bidding strategy. Named decision manual-price-precedence: For manual price precedence, apply the stipulated decision x["manual_price"] if x["manual_active"] else x["current"].

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = min(x["ceiling"],x["current"]+x["increment"])
    v1 = x["current"]<x["ceiling"] and x["increment"]>0
    v2 = max(0,x["quantity"]-x["filled"])
    v3 = x["enabled"] and not x["owner_present"]
    v4 = [] if x["token"]==x["last_token"] else [x["lot"]]
    v5 = x["lot"] in x["authorized_lots"]
    v6 = x["enabled"] and not x["suspended"]
    v7 = x["manual_price"] if x["manual_active"] else x["current"]
    v8 = x["credit"]//max(1,x["unit_hold"])
    v9 = [t for t in x["triggers"] if t in x["allowed"]] if x["auction_open"] else []
    return {'bounded-next-offer':v0,'ceiling-exhaustion':v1,'remaining-proxy-size':v2,'manual-control-handoff':v3,'one-trigger-submission':v4,'lot-mandate':v5,'suspension-resume':v6,'manual-price-precedence':v7,'proxy-collateral-size':v8,'closed-auction-trigger':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('ceiling reached', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('no credit', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 0, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [0, 0, 0, 0, 0]), ('ceiling reached / no credit', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 0, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [0, 0, 0, 0, 0]), ('step exceeds ceiling', {'current': 15, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('disabled instruction', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('owner controls bid', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': True, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('token replay', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't1', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('wrong lot', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'B', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('suspended', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('manual override absent', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('fully filled', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 5, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [0, 0, 0, 0, 0]), ('ceiling reached / fully filled', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 5, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [0, 0, 0, 0, 0])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['proxy-collateral-size'], expected[N-1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = min(x["ceiling"],x["current"]+x["increment"])
    v1 = x["current"]<x["ceiling"] and x["increment"]>0
    v2 = max(0,x["quantity"]-x["filled"])
    v3 = x["enabled"] and not x["owner_present"]
    v4 = [] if x["token"]==x["last_token"] else [x["lot"]]
    v5 = x["lot"] in x["authorized_lots"]
    v6 = x["enabled"] and not x["suspended"]
    v7 = x["manual_price"] if x["manual_active"] else x["current"]
    v8 = max(0,x["quantity"]-x["filled"])
    v9 = [t for t in x["triggers"] if t in x["allowed"]] if x["auction_open"] else []
    return {'bounded-next-offer':v0,'ceiling-exhaustion':v1,'remaining-proxy-size':v2,'manual-control-handoff':v3,'one-trigger-submission':v4,'lot-mandate':v5,'suspension-resume':v6,'manual-price-precedence':v7,'proxy-collateral-size':v8,'closed-auction-trigger':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('ceiling reached', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('no credit', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 0, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [0, 0, 0, 0, 0]), ('ceiling reached / no credit', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 0, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [0, 0, 0, 0, 0]), ('step exceeds ceiling', {'current': 15, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('disabled instruction', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('owner controls bid', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': True, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('token replay', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't1', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('wrong lot', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'B', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('suspended', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('manual override absent', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [3, 6, 9, 12, 12]), ('fully filled', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 5, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [0, 0, 0, 0, 0]), ('ceiling reached / fully filled', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 5, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [0, 0, 0, 0, 0])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['proxy-collateral-size'], expected[N-1])
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)

prompt:
Proxy quantity ignores either remaining authorization or collateral.

A bidder authorizes a bounded proxy to submit offers for a specific lot. A proxy instruction specifies a price ceiling, per-step increment, remaining quantity, owner consent and a one-use trigger token. Outputs are actionable submissions, not an optimal bidding strategy. Named decision proxy-collateral-size: For proxy collateral size, apply the stipulated decision min(max(0,x["quantity"]-x["filled"]),x["credit"]//max(1,x["unit_hold"])).

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = min(x["ceiling"],x["current"]+x["increment"])
    v1 = x["current"]<x["ceiling"] and x["increment"]>0
    v2 = max(0,x["quantity"]-x["filled"])
    v3 = x["enabled"] and not x["owner_present"]
    v4 = [] if x["token"]==x["last_token"] else [x["lot"]]
    v5 = x["lot"] in x["authorized_lots"]
    v6 = x["enabled"] and not x["suspended"]
    v7 = x["manual_price"] if x["manual_active"] else x["current"]
    v8 = min(max(0,x["quantity"]-x["filled"]),x["credit"]//max(1,x["unit_hold"]))
    v9 = x["triggers"] if x["auction_open"] else []
    return {'bounded-next-offer':v0,'ceiling-exhaustion':v1,'remaining-proxy-size':v2,'manual-control-handoff':v3,'one-trigger-submission':v4,'lot-mandate':v5,'suspension-resume':v6,'manual-price-precedence':v7,'proxy-collateral-size':v8,'closed-auction-trigger':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('ceiling reached', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('auction closed', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': False}, [[], [], [], [], []]), ('ceiling reached / auction closed', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': False}, [[], [], [], [], []]), ('step exceeds ceiling', {'current': 15, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('disabled instruction', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('owner controls bid', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': True, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('token replay', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't1', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('wrong lot', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'B', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('suspended', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('manual override absent', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['closed-auction-trigger'], expected[N-1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = min(x["ceiling"],x["current"]+x["increment"])
    v1 = x["current"]<x["ceiling"] and x["increment"]>0
    v2 = max(0,x["quantity"]-x["filled"])
    v3 = x["enabled"] and not x["owner_present"]
    v4 = [] if x["token"]==x["last_token"] else [x["lot"]]
    v5 = x["lot"] in x["authorized_lots"]
    v6 = x["enabled"] and not x["suspended"]
    v7 = x["manual_price"] if x["manual_active"] else x["current"]
    v8 = min(max(0,x["quantity"]-x["filled"]),x["credit"]//max(1,x["unit_hold"]))
    v9 = [t for t in x["triggers"] if t in x["allowed"]]
    return {'bounded-next-offer':v0,'ceiling-exhaustion':v1,'remaining-proxy-size':v2,'manual-control-handoff':v3,'one-trigger-submission':v4,'lot-mandate':v5,'suspension-resume':v6,'manual-price-precedence':v7,'proxy-collateral-size':v8,'closed-auction-trigger':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('ceiling reached', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('auction closed', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': False}, [[], [], [], [], []]), ('ceiling reached / auction closed', {'current': 16, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': False}, [[], [], [], [], []]), ('step exceeds ceiling', {'current': 15, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('disabled instruction', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': False, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('owner controls bid', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': True, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('token replay', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't1', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('wrong lot', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'B', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('suspended', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': True, 'manual_price': 12, 'manual_active': True, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']]), ('manual override absent', {'current': 10, 'ceiling': 16, 'increment': 3, 'quantity': 5, 'filled': 2, 'enabled': True, 'owner_present': False, 'token': 't2', 'last_token': 't1', 'lot': 'A', 'authorized_lots': ['A'], 'suspended': False, 'manual_price': 12, 'manual_active': False, 'credit': 100, 'unit_hold': 8, 'triggers': ['outbid', 'outbid', 'price'], 'allowed': ['outbid'], 'auction_open': True}, [['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid'], ['outbid', 'outbid']])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['closed-auction-trigger'], expected[N-1])
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)

prompt:
Trigger routing continues proxy offers after auction closure.

A bidder authorizes a bounded proxy to submit offers for a specific lot. A proxy instruction specifies a price ceiling, per-step increment, remaining quantity, owner consent and a one-use trigger token. Outputs are actionable submissions, not an optimal bidding strategy. Named decision closed-auction-trigger: For closed auction trigger, apply the stipulated decision [t for t in x["triggers"] if t in x["allowed"]] if x["auction_open"] else [].

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = x["now"]>=x["close"]-x["window"]
    v1 = max(x["close"],x["now"]+x["extension"])
    v2 = min(x["hard_stop"],x["close"]+x["extension"])
    v3 = x["close"]+x["extension"] if x["eligible"] and not x["withdrawn"] else x["close"]
    v4 = x["count"]<x["max_count"]
    v5 = x["submitted"]<x["close"]
    v6 = min(x["hard_stop"],x["close"]+x["pause_length"]) if x["paused"] else x["close"]
    v7 = max(x["close"],x["last_bid"]+x["grace"])
    v8 = len(set(x["batch_times"])-set(x["seen_times"]))
    v9 = not x["paused"] and x["now"]>=x["close"]
    return {'extension-window':v0,'extension-base':v1,'hard-stop-cap':v2,'eligible-bid-extension':v3,'extension-budget':v4,'timely-submission':v5,'paused-deadline':v6,'quiet-period-close':v7,'new-batch-extensions':v8,'paused-close-event':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('at deadline', {'close': 20, 'now': 20, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [False, False, False, False, False]), ('past deadline', {'close': 20, 'now': 21, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [False, False, False, False, False]), ('window start', {'close': 20, 'now': 17, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('submission exactly closing / window start', {'close': 20, 'now': 17, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('normal contract', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('submission exactly closing', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('quiet grace extends close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 19, 'grace': 4, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [False, False, False, False, False]), ('ineligible bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': False, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('hard stop near', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 22, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('no extensions left', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 3, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'max_count', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['extension-window'], expected[N-1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = x["close"]-x["window"]<x["now"]<x["close"]
    v1 = max(x["close"],x["now"]+x["extension"])
    v2 = min(x["hard_stop"],x["close"]+x["extension"])
    v3 = x["close"]+x["extension"] if x["eligible"] and not x["withdrawn"] else x["close"]
    v4 = x["count"]<x["max_count"]
    v5 = x["submitted"]<x["close"]
    v6 = min(x["hard_stop"],x["close"]+x["pause_length"]) if x["paused"] else x["close"]
    v7 = max(x["close"],x["last_bid"]+x["grace"])
    v8 = len(set(x["batch_times"])-set(x["seen_times"]))
    v9 = not x["paused"] and x["now"]>=x["close"]
    return {'extension-window':v0,'extension-base':v1,'hard-stop-cap':v2,'eligible-bid-extension':v3,'extension-budget':v4,'timely-submission':v5,'paused-deadline':v6,'quiet-period-close':v7,'new-batch-extensions':v8,'paused-close-event':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('at deadline', {'close': 20, 'now': 20, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [False, False, False, False, False]), ('past deadline', {'close': 20, 'now': 21, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [False, False, False, False, False]), ('window start', {'close': 20, 'now': 17, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('submission exactly closing / window start', {'close': 20, 'now': 17, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('normal contract', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('submission exactly closing', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('quiet grace extends close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 19, 'grace': 4, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [False, False, False, False, False]), ('ineligible bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': False, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('hard stop near', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 22, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True]), ('no extensions left', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 3, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [True, True, True, True, True])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'max_count', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['extension-window'], expected[N-1])
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)

prompt:
Late bids reopen an already closed soft-close window.

Toy soft-close auction scheduling uses integer ticks. Only eligible bids in the final extension window extend close, extending from the later existing deadline, with a fixed hard stop and a finite extension count. A batch carries submission and admission times separately. Named decision extension-window: For extension window, apply the stipulated decision x["close"]-x["window"]<=x["now"]<x["close"].

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = x["close"]-x["window"]<=x["now"]<x["close"]
    v1 = x["now"]+x["extension"]
    v2 = min(x["hard_stop"],x["close"]+x["extension"])
    v3 = x["close"]+x["extension"] if x["eligible"] and not x["withdrawn"] else x["close"]
    v4 = x["count"]<x["max_count"]
    v5 = x["submitted"]<x["close"]
    v6 = min(x["hard_stop"],x["close"]+x["pause_length"]) if x["paused"] else x["close"]
    v7 = max(x["close"],x["last_bid"]+x["grace"])
    v8 = len(set(x["batch_times"])-set(x["seen_times"]))
    v9 = not x["paused"] and x["now"]>=x["close"]
    return {'extension-window':v0,'extension-base':v1,'hard-stop-cap':v2,'eligible-bid-extension':v3,'extension-budget':v4,'timely-submission':v5,'paused-deadline':v6,'quiet-period-close':v7,'new-batch-extensions':v8,'paused-close-event':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('submission exactly closing / early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('normal contract', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('submission exactly closing', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('quiet grace extends close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 19, 'grace': 4, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('at deadline', {'close': 20, 'now': 20, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('past deadline', {'close': 20, 'now': 21, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [26, 52, 78, 104, 130]), ('ineligible bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': False, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('hard stop near', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 22, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('no extensions left', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 3, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'max_count', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['extension-base'], expected[N-1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = x["close"]-x["window"]<=x["now"]<x["close"]
    v1 = x["close"]+x["extension"]
    v2 = min(x["hard_stop"],x["close"]+x["extension"])
    v3 = x["close"]+x["extension"] if x["eligible"] and not x["withdrawn"] else x["close"]
    v4 = x["count"]<x["max_count"]
    v5 = x["submitted"]<x["close"]
    v6 = min(x["hard_stop"],x["close"]+x["pause_length"]) if x["paused"] else x["close"]
    v7 = max(x["close"],x["last_bid"]+x["grace"])
    v8 = len(set(x["batch_times"])-set(x["seen_times"]))
    v9 = not x["paused"] and x["now"]>=x["close"]
    return {'extension-window':v0,'extension-base':v1,'hard-stop-cap':v2,'eligible-bid-extension':v3,'extension-budget':v4,'timely-submission':v5,'paused-deadline':v6,'quiet-period-close':v7,'new-batch-extensions':v8,'paused-close-event':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('submission exactly closing / early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('normal contract', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('submission exactly closing', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('quiet grace extends close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 19, 'grace': 4, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('at deadline', {'close': 20, 'now': 20, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('past deadline', {'close': 20, 'now': 21, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [26, 52, 78, 104, 130]), ('ineligible bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': False, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('hard stop near', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 22, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115]), ('no extensions left', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 3, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [23, 46, 69, 92, 115])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'max_count', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['extension-base'], expected[N-1])
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)

prompt:
Deadline extension shortens an auction or overextends from an old deadline.

Toy soft-close auction scheduling uses integer ticks. Only eligible bids in the final extension window extend close, extending from the later existing deadline, with a fixed hard stop and a finite extension count. A batch carries submission and admission times separately. Named decision extension-base: For extension base, apply the stipulated decision max(x["close"],x["now"]+x["extension"]).

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = x["close"]-x["window"]<=x["now"]<x["close"]
    v1 = max(x["close"],x["now"]+x["extension"])
    v2 = x["close"]+x["extension"]
    v3 = x["close"]+x["extension"] if x["eligible"] and not x["withdrawn"] else x["close"]
    v4 = x["count"]<x["max_count"]
    v5 = x["submitted"]<x["close"]
    v6 = min(x["hard_stop"],x["close"]+x["pause_length"]) if x["paused"] else x["close"]
    v7 = max(x["close"],x["last_bid"]+x["grace"])
    v8 = len(set(x["batch_times"])-set(x["seen_times"]))
    v9 = not x["paused"] and x["now"]>=x["close"]
    return {'extension-window':v0,'extension-base':v1,'hard-stop-cap':v2,'eligible-bid-extension':v3,'extension-budget':v4,'timely-submission':v5,'paused-deadline':v6,'quiet-period-close':v7,'new-batch-extensions':v8,'paused-close-event':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('hard stop near', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 22, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [22, 44, 66, 88, 110]), ('hard stop below close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 19, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [19, 38, 57, 76, 95]), ('normal contract', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('submission exactly closing', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('quiet grace extends close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 19, 'grace': 4, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('at deadline', {'close': 20, 'now': 20, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('past deadline', {'close': 20, 'now': 21, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('ineligible bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': False, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('no extensions left', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 3, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'max_count', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['hard-stop-cap'], expected[N-1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = x["close"]-x["window"]<=x["now"]<x["close"]
    v1 = max(x["close"],x["now"]+x["extension"])
    v2 = max(x["hard_stop"],x["close"]+x["extension"])
    v3 = x["close"]+x["extension"] if x["eligible"] and not x["withdrawn"] else x["close"]
    v4 = x["count"]<x["max_count"]
    v5 = x["submitted"]<x["close"]
    v6 = min(x["hard_stop"],x["close"]+x["pause_length"]) if x["paused"] else x["close"]
    v7 = max(x["close"],x["last_bid"]+x["grace"])
    v8 = len(set(x["batch_times"])-set(x["seen_times"]))
    v9 = not x["paused"] and x["now"]>=x["close"]
    return {'extension-window':v0,'extension-base':v1,'hard-stop-cap':v2,'eligible-bid-extension':v3,'extension-budget':v4,'timely-submission':v5,'paused-deadline':v6,'quiet-period-close':v7,'new-batch-extensions':v8,'paused-close-event':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('hard stop near', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 22, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [22, 44, 66, 88, 110]), ('hard stop below close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 19, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [19, 38, 57, 76, 95]), ('normal contract', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('submission exactly closing', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('quiet grace extends close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 19, 'grace': 4, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('at deadline', {'close': 20, 'now': 20, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('past deadline', {'close': 20, 'now': 21, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('ineligible bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': False, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('no extensions left', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 3, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'max_count', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['hard-stop-cap'], expected[N-1])
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)

prompt:
Soft-close extensions overrun the immutable hard stop.

Toy soft-close auction scheduling uses integer ticks. Only eligible bids in the final extension window extend close, extending from the later existing deadline, with a fixed hard stop and a finite extension count. A batch carries submission and admission times separately. Named decision hard-stop-cap: For hard stop cap, apply the stipulated decision min(x["hard_stop"],x["close"]+x["extension"]).

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = x["close"]-x["window"]<=x["now"]<x["close"]
    v1 = max(x["close"],x["now"]+x["extension"])
    v2 = min(x["hard_stop"],x["close"]+x["extension"])
    v3 = x["close"]+x["extension"]
    v4 = x["count"]<x["max_count"]
    v5 = x["submitted"]<x["close"]
    v6 = min(x["hard_stop"],x["close"]+x["pause_length"]) if x["paused"] else x["close"]
    v7 = max(x["close"],x["last_bid"]+x["grace"])
    v8 = len(set(x["batch_times"])-set(x["seen_times"]))
    v9 = not x["paused"] and x["now"]>=x["close"]
    return {'extension-window':v0,'extension-base':v1,'hard-stop-cap':v2,'eligible-bid-extension':v3,'extension-budget':v4,'timely-submission':v5,'paused-deadline':v6,'quiet-period-close':v7,'new-batch-extensions':v8,'paused-close-event':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('ineligible bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': False, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('withdrawn bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': True, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('submission exactly closing / withdrawn bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': True, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('normal contract', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('submission exactly closing', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('quiet grace extends close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 19, 'grace': 4, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('at deadline', {'close': 20, 'now': 20, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('past deadline', {'close': 20, 'now': 21, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('hard stop near', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 22, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('no extensions left', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 3, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'max_count', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['eligible-bid-extension'], expected[N-1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    v0 = x["close"]-x["window"]<=x["now"]<x["close"]
    v1 = max(x["close"],x["now"]+x["extension"])
    v2 = min(x["hard_stop"],x["close"]+x["extension"])
    v3 = x["close"]+x["extension"] if x["eligible"] else x["close"]
    v4 = x["count"]<x["max_count"]
    v5 = x["submitted"]<x["close"]
    v6 = min(x["hard_stop"],x["close"]+x["pause_length"]) if x["paused"] else x["close"]
    v7 = max(x["close"],x["last_bid"]+x["grace"])
    v8 = len(set(x["batch_times"])-set(x["seen_times"]))
    v9 = not x["paused"] and x["now"]>=x["close"]
    return {'extension-window':v0,'extension-base':v1,'hard-stop-cap':v2,'eligible-bid-extension':v3,'extension-budget':v4,'timely-submission':v5,'paused-deadline':v6,'quiet-period-close':v7,'new-batch-extensions':v8,'paused-close-event':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('ineligible bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': False, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('withdrawn bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': True, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('submission exactly closing / withdrawn bid', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': True, 'batch_times': [17, 19], 'seen_times': [17]}, [20, 40, 60, 80, 100]), ('normal contract', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('submission exactly closing', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 20, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('quiet grace extends close', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 19, 'grace': 4, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('early bid', {'close': 20, 'now': 10, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('at deadline', {'close': 20, 'now': 20, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('past deadline', {'close': 20, 'now': 21, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('hard stop near', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 22, 'count': 1, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125]), ('no extensions left', {'close': 20, 'now': 18, 'window': 3, 'extension': 5, 'hard_stop': 30, 'count': 3, 'max_count': 3, 'eligible': True, 'submitted': 19, 'admitted': 21, 'paused': False, 'pause_length': 4, 'last_bid': 15, 'grace': 2, 'withdrawn': False, 'batch_times': [17, 19], 'seen_times': [17]}, [25, 50, 75, 100, 125])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'max_count', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['eligible-bid-extension'], expected[N-1])
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)

prompt:
Withdrawn or rejected offers keep postponing auction closure.

Toy soft-close auction scheduling uses integer ticks. Only eligible bids in the final extension window extend close, extending from the later existing deadline, with a fixed hard stop and a finite extension count. A batch carries submission and admission times separately. Named decision eligible-bid-extension: For eligible bid extension, apply the stipulated decision x["close"]+x["extension"] if x["eligible"] and not x["withdrawn"] else x["close"].

split: open-access