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

N = 1
observations = []
def solve(x):
    v0 = [min(o,r) if a else o for o,r,a in zip(x["old"],x["requested"],x["accepted"])]
    v1 = [0 if e else q for e,q in zip(x["exited"],x["requested"])]
    v2 = [p if a else old for p,old,a in zip(x["prices"],x["previous_prices"],x["accepted"])]
    v3 = [min(q,c) for q,c in zip(x["requested"],x["caps"])]
    v4 = [max(0,q-s) for q,s in zip(x["old"],x["supply"])]
    v5 = [i for i,(q,s) in enumerate(zip(x["old"],x["supply"])) if q>s]
    v6 = [d if p>=w else o for d,p,w,o in zip(x["deferred"],x["prices"],x["withdrawal_prices"],x["old"])]
    v7 = all(q<=s for q,s in zip(x["old"],x["supply"]))
    v8 = x["accepted"]
    v9 = x["old"] if x["round"]<=x["last_round"] else x["requested"]
    return {'accepted-reduction':v0,'irreversible-exit':v1,'posted-price-lock':v2,'demand-cap':v3,'excess-demand':v4,'clock-step-selection':v5,'deferred-exit-trigger':v6,'round-clearing-quiescence':v7,'price-change-ack':v8,'round-demand-replay':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('all accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, True], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('price unchanged', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [8, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[False, False], [False, False], [False, False], [False, False], [False, False]]), ('exit at trigger', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [9, 25], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('none accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [False, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[False, False], [False, False], [False, False], [False, False], [False, False]]), ('normal contract', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('unequal demand caps', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('no exited lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, False], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('auction reopened', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': True, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]])]
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))['price-change-ack'], 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(o,r) if a else o for o,r,a in zip(x["old"],x["requested"],x["accepted"])]
    v1 = [0 if e else q for e,q in zip(x["exited"],x["requested"])]
    v2 = [p if a else old for p,old,a in zip(x["prices"],x["previous_prices"],x["accepted"])]
    v3 = [min(q,c) for q,c in zip(x["requested"],x["caps"])]
    v4 = [max(0,q-s) for q,s in zip(x["old"],x["supply"])]
    v5 = [i for i,(q,s) in enumerate(zip(x["old"],x["supply"])) if q>s]
    v6 = [d if p>=w else o for d,p,w,o in zip(x["deferred"],x["prices"],x["withdrawal_prices"],x["old"])]
    v7 = all(q<=s for q,s in zip(x["old"],x["supply"]))
    v8 = [p!=o for p,o in zip(x["prices"],x["previous_prices"])]
    v9 = x["old"] if x["round"]<=x["last_round"] else x["requested"]
    return {'accepted-reduction':v0,'irreversible-exit':v1,'posted-price-lock':v2,'demand-cap':v3,'excess-demand':v4,'clock-step-selection':v5,'deferred-exit-trigger':v6,'round-clearing-quiescence':v7,'price-change-ack':v8,'round-demand-replay':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('all accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, True], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('price unchanged', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [8, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[False, False], [False, False], [False, False], [False, False], [False, False]]), ('exit at trigger', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [9, 25], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('none accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [False, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[False, False], [False, False], [False, False], [False, False], [False, False]]), ('normal contract', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('unequal demand caps', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('no exited lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, False], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]]), ('auction reopened', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': True, 'round': 2, 'last_round': 1}, [[True, False], [True, False], [True, False], [True, False], [True, False]])]
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))['price-change-ack'], 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:
Clock acknowledgment reports a new price when no accepted change occurred.

One bounded clock-auction round maintains per-lot demand at posted prices. Demand reductions become binding only at accepted clock prices; exits cannot be undone; deferred reductions are reconsidered against the new price. Arrays are aligned by lot and values are nonnegative integers. Named decision price-change-ack: Report only accepted price changes.

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = [min(o,r) if a else o for o,r,a in zip(x["old"],x["requested"],x["accepted"])]
    v1 = [0 if e else q for e,q in zip(x["exited"],x["requested"])]
    v2 = [p if a else old for p,old,a in zip(x["prices"],x["previous_prices"],x["accepted"])]
    v3 = [min(q,c) for q,c in zip(x["requested"],x["caps"])]
    v4 = [max(0,q-s) for q,s in zip(x["old"],x["supply"])]
    v5 = [i for i,(q,s) in enumerate(zip(x["old"],x["supply"])) if q>s]
    v6 = [d if p>=w else o for d,p,w,o in zip(x["deferred"],x["prices"],x["withdrawal_prices"],x["old"])]
    v7 = all(q<=s for q,s in zip(x["old"],x["supply"]))
    v8 = [a and p!=o for a,p,o in zip(x["accepted"],x["prices"],x["previous_prices"])]
    v9 = x["requested"]
    return {'accepted-reduction':v0,'irreversible-exit':v1,'posted-price-lock':v2,'demand-cap':v3,'excess-demand':v4,'clock-step-selection':v5,'deferred-exit-trigger':v6,'round-clearing-quiescence':v7,'price-change-ack':v8,'round-demand-replay':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('replayed round', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 1, 'last_round': 1}, [[5, 3], [10, 6], [15, 9], [20, 12], [25, 15]]), ('unequal demand caps / replayed round', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 1, 'last_round': 1}, [[5, 3], [10, 6], [15, 9], [20, 12], [25, 15]]), ('normal contract', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('unequal demand caps', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('exit at trigger', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [9, 25], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('all accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, True], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('none accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [False, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('no exited lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, False], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('auction reopened', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': True, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]])]
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))['round-demand-replay'], 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(o,r) if a else o for o,r,a in zip(x["old"],x["requested"],x["accepted"])]
    v1 = [0 if e else q for e,q in zip(x["exited"],x["requested"])]
    v2 = [p if a else old for p,old,a in zip(x["prices"],x["previous_prices"],x["accepted"])]
    v3 = [min(q,c) for q,c in zip(x["requested"],x["caps"])]
    v4 = [max(0,q-s) for q,s in zip(x["old"],x["supply"])]
    v5 = [i for i,(q,s) in enumerate(zip(x["old"],x["supply"])) if q>s]
    v6 = [d if p>=w else o for d,p,w,o in zip(x["deferred"],x["prices"],x["withdrawal_prices"],x["old"])]
    v7 = all(q<=s for q,s in zip(x["old"],x["supply"]))
    v8 = [a and p!=o for a,p,o in zip(x["accepted"],x["prices"],x["previous_prices"])]
    v9 = x["old"]
    return {'accepted-reduction':v0,'irreversible-exit':v1,'posted-price-lock':v2,'demand-cap':v3,'excess-demand':v4,'clock-step-selection':v5,'deferred-exit-trigger':v6,'round-clearing-quiescence':v7,'price-change-ack':v8,'round-demand-replay':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('replayed round', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 1, 'last_round': 1}, [[5, 3], [10, 6], [15, 9], [20, 12], [25, 15]]), ('unequal demand caps / replayed round', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 1, 'last_round': 1}, [[5, 3], [10, 6], [15, 9], [20, 12], [25, 15]]), ('normal contract', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('unequal demand caps', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [1, 5], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('balanced lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [5, 3], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('cross lot surplus', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 9], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('exit at trigger', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [9, 25], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('all accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, True], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('none accepted', {'old': [5, 3], 'requested': [2, 4], 'accepted': [False, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('no exited lots', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, False], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': False, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]]), ('auction reopened', {'old': [5, 3], 'requested': [2, 4], 'accepted': [True, False], 'exited': [False, True], 'prices': [10, 20], 'previous_prices': [8, 20], 'caps': [3, 3], 'supply': [4, 2], 'deferred': [1, 2], 'withdrawal_prices': [9, 25], 'reopened': True, 'round': 2, 'last_round': 1}, [[2, 4], [4, 8], [6, 12], [8, 16], [10, 20]])]
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))['round-demand-replay'], 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:
Replayed clock-round submissions replace current demand again.

One bounded clock-auction round maintains per-lot demand at posted prices. Demand reductions become binding only at accepted clock prices; exits cannot be undone; deferred reductions are reconsidered against the new price. Arrays are aligned by lot and values are nonnegative integers. Named decision round-demand-replay: Ignore old rounds while processing a genuinely new round.

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = 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"]] 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}, [16, 32, 48, 64, 80]), ('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}, [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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65])]
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))['bounded-next-offer'], 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["ceiling"]
    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"]] 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}, [16, 32, 48, 64, 80]), ('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}, [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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65]), ('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}, [13, 26, 39, 52, 65])]
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))['bounded-next-offer'], 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 steps jump past the authorized ceiling.

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 bounded-next-offer: For bounded next offer, apply the stipulated decision min(x["ceiling"],x["current"]+x["increment"]).

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"]
    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"]] 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}, [False, False, False, False, False]), ('zero increment', {'current': 10, 'ceiling': 16, 'increment': 0, '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}, [False, False, False, False, False]), ('step exceeds ceiling / zero increment', {'current': 15, 'ceiling': 16, 'increment': 0, '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}, [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]), ('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]), ('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}, [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]), ('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}, [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))['ceiling-exhaustion'], 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"]
    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"]] 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}, [False, False, False, False, False]), ('zero increment', {'current': 10, 'ceiling': 16, 'increment': 0, '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}, [False, False, False, False, False]), ('step exceeds ceiling / zero increment', {'current': 15, 'ceiling': 16, 'increment': 0, '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}, [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]), ('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]), ('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}, [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]), ('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}, [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))['ceiling-exhaustion'], 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 emits an offer after its authorization is exhausted.

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 ceiling-exhaustion: For ceiling exhaustion, apply the stipulated decision x["current"]<x["ceiling"] and x["increment"]>0.

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 = x["quantity"]
    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"]] 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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15])]
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))['remaining-proxy-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 = 0 if x["filled"] else x["quantity"]
    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"]] 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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15]), ('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, 15])]
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))['remaining-proxy-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:
A partially filled proxy resubmits its original full size.

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 remaining-proxy-size: For remaining proxy size, apply the stipulated decision max(0,x["quantity"]-x["filled"]).

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"]
    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"]] 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 = [('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}, [False, False, False, False, False]), ('ceiling reached / owner controls bid', {'current': 16, '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}, [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]), ('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]), ('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}, [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))['manual-control-handoff'], 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 = 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"]] 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 = [('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}, [False, False, False, False, False]), ('ceiling reached / owner controls bid', {'current': 16, '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}, [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]), ('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]), ('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}, [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))['manual-control-handoff'], 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 and present owner both submit after control handoff.

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-control-handoff: For manual control handoff, apply the stipulated decision x["enabled"] and not x["owner_present"].

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 = [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"]] 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 = [('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}, [[], [], [], [], []]), ('ceiling reached / token replay', {'current': 16, '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}, [[], [], [], [], []]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['B'], ['B'], ['B'], ['B'], ['B']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']])]
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))['one-trigger-submission'], 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 = []
    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"]] 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 = [('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}, [[], [], [], [], []]), ('ceiling reached / token replay', {'current': 16, '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}, [[], [], [], [], []]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['B'], ['B'], ['B'], ['B'], ['B']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('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}, [['A'], ['A'], ['A'], ['A'], ['A']])]
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))['one-trigger-submission'], 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:
One-use proxy trigger creates repeated auction offers.

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 one-trigger-submission: For one trigger submission, apply the stipulated decision [] if x["token"]==x["last_token"] else [x["lot"]].

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 = True
    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"]] 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 = [('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}, [False, False, False, False, False]), ('ceiling reached / wrong lot', {'current': 16, '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}, [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]), ('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}, [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]), ('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}, [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))['lot-mandate'], 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 = bool(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"]] 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 = [('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}, [False, False, False, False, False]), ('ceiling reached / wrong lot', {'current': 16, '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}, [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]), ('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}, [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]), ('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}, [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))['lot-mandate'], 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 acts on a lot outside its instruction mandate.

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 lot-mandate: For lot mandate, apply the stipulated decision x["lot"] in x["authorized_lots"].

split: open-access