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

N = 1
observations = []
def solve(x):
    v0 = {l:max(q,x["awarded"].get(l,0)) for l,q in x["new"].items()}
    v1 = {l:max(q,x["awarded"].get(l,0)+x["reserved"].get(l,0)) for l,q in x["new"].items()}
    v2 = {l:(min(q,x["old"][l]) if x["frozen"] else q) for l,q in x["new"].items()}
    v3 = x["new"] if x["approved"] else x["old"]
    v4 = {l:max(0,x["old"][l]-x["awarded"].get(l,0)-x["reserved"].get(l,0)) for l in x["withdrawn"]}
    v5 = {l:max(0,q-x["delivered"].get(l,0)) for l,q in x["old"].items()}
    v6 = all(max(0,x["new"][l]-x["old"][l])<=x["certified_additions"].get(l,0) for l in x["added"])
    v7 = list(x["new"])
    v8 = {l:q if l in x["consent"] else x["old"][l] for l,q in x["new"].items()}
    v9 = x["expected"]==x["revision"]
    return {'award-inventory-floor':v0,'reservation-inventory-floor':v1,'freeze-supply-increase':v2,'supply-approval-atomicity':v3,'withdrawal-unawarded-stock':v4,'delivered-stock-accounting':v5,'certified-added-quantity':v6,'seller-amendment-ownership':v7,'consented-supply-change':v8,'inventory-revision-guard':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('amendment approved', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('wrong actor', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'z', 'revision': 2, 'expected': 2}, [[], [], [], [], []]), ('both seller consents', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A', 'B'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('supply frozen', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': True, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('below awarded supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 2, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('unchanged supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 8, 'B': 5}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('all reserves released', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 0, 'B': 0}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('certified increase', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 3}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('all withdrawn', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A', 'B'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['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))['seller-amendment-ownership'], 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 = {l:max(q,x["awarded"].get(l,0)) for l,q in x["new"].items()}
    v1 = {l:max(q,x["awarded"].get(l,0)+x["reserved"].get(l,0)) for l,q in x["new"].items()}
    v2 = {l:(min(q,x["old"][l]) if x["frozen"] else q) for l,q in x["new"].items()}
    v3 = x["new"] if x["approved"] else x["old"]
    v4 = {l:max(0,x["old"][l]-x["awarded"].get(l,0)-x["reserved"].get(l,0)) for l in x["withdrawn"]}
    v5 = {l:max(0,q-x["delivered"].get(l,0)) for l,q in x["old"].items()}
    v6 = all(max(0,x["new"][l]-x["old"][l])<=x["certified_additions"].get(l,0) for l in x["added"])
    v7 = [l for l in x["new"] if l in x["consent"]]
    v8 = {l:q if l in x["consent"] else x["old"][l] for l,q in x["new"].items()}
    v9 = x["expected"]==x["revision"]
    return {'award-inventory-floor':v0,'reservation-inventory-floor':v1,'freeze-supply-increase':v2,'supply-approval-atomicity':v3,'withdrawal-unawarded-stock':v4,'delivered-stock-accounting':v5,'certified-added-quantity':v6,'seller-amendment-ownership':v7,'consented-supply-change':v8,'inventory-revision-guard':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('amendment approved', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('wrong actor', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'z', 'revision': 2, 'expected': 2}, [[], [], [], [], []]), ('both seller consents', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A', 'B'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('supply frozen', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': True, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('below awarded supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 2, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('unchanged supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 8, 'B': 5}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('all reserves released', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 0, 'B': 0}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('certified increase', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 3}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['A'], ['A'], ['A'], ['A'], ['A']]), ('all withdrawn', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A', 'B'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [['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))['seller-amendment-ownership'], 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 seller edits another seller auction lot inventory.

An auction seller may amend offered inventory before freeze. Confirmed awards and firm reservations form a floor; rejected amendments retain the previous inventory. Per-lot changes are simultaneous and cannot use removed supply to satisfy prior awards. Named decision seller-amendment-ownership: For seller amendment ownership, apply the stipulated decision [l for l in x["new"] if x["sellers"][l]==x["actor"]].

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = {l:max(q,x["awarded"].get(l,0)) for l,q in x["new"].items()}
    v1 = {l:max(q,x["awarded"].get(l,0)+x["reserved"].get(l,0)) for l,q in x["new"].items()}
    v2 = {l:(min(q,x["old"][l]) if x["frozen"] else q) for l,q in x["new"].items()}
    v3 = x["new"] if x["approved"] else x["old"]
    v4 = {l:max(0,x["old"][l]-x["awarded"].get(l,0)-x["reserved"].get(l,0)) for l in x["withdrawn"]}
    v5 = {l:max(0,q-x["delivered"].get(l,0)) for l,q in x["old"].items()}
    v6 = all(max(0,x["new"][l]-x["old"][l])<=x["certified_additions"].get(l,0) for l in x["added"])
    v7 = [l for l in x["new"] if x["sellers"][l]==x["actor"]]
    v8 = x["new"]
    v9 = x["expected"]==x["revision"]
    return {'award-inventory-floor':v0,'reservation-inventory-floor':v1,'freeze-supply-increase':v2,'supply-approval-atomicity':v3,'withdrawal-unawarded-stock':v4,'delivered-stock-accounting':v5,'certified-added-quantity':v6,'seller-amendment-ownership':v7,'consented-supply-change':v8,'inventory-revision-guard':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('amendment approved', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('supply frozen', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': True, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('below awarded supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 2, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 2, 'B': 5}, {'A': 4, 'B': 10}, {'A': 6, 'B': 15}, {'A': 8, 'B': 20}, {'A': 10, 'B': 25}]), ('unchanged supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 8, 'B': 5}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 8, 'B': 5}, {'A': 16, 'B': 10}, {'A': 24, 'B': 15}, {'A': 32, 'B': 20}, {'A': 40, 'B': 25}]), ('all reserves released', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 0, 'B': 0}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('certified increase', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 3}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('wrong actor', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'z', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('all withdrawn', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A', 'B'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}])]
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))['consented-supply-change'], 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 = {l:max(q,x["awarded"].get(l,0)) for l,q in x["new"].items()}
    v1 = {l:max(q,x["awarded"].get(l,0)+x["reserved"].get(l,0)) for l,q in x["new"].items()}
    v2 = {l:(min(q,x["old"][l]) if x["frozen"] else q) for l,q in x["new"].items()}
    v3 = x["new"] if x["approved"] else x["old"]
    v4 = {l:max(0,x["old"][l]-x["awarded"].get(l,0)-x["reserved"].get(l,0)) for l in x["withdrawn"]}
    v5 = {l:max(0,q-x["delivered"].get(l,0)) for l,q in x["old"].items()}
    v6 = all(max(0,x["new"][l]-x["old"][l])<=x["certified_additions"].get(l,0) for l in x["added"])
    v7 = [l for l in x["new"] if x["sellers"][l]==x["actor"]]
    v8 = x["old"]
    v9 = x["expected"]==x["revision"]
    return {'award-inventory-floor':v0,'reservation-inventory-floor':v1,'freeze-supply-increase':v2,'supply-approval-atomicity':v3,'withdrawal-unawarded-stock':v4,'delivered-stock-accounting':v5,'certified-added-quantity':v6,'seller-amendment-ownership':v7,'consented-supply-change':v8,'inventory-revision-guard':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('amendment approved', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('supply frozen', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': True, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('below awarded supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 2, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 2, 'B': 5}, {'A': 4, 'B': 10}, {'A': 6, 'B': 15}, {'A': 8, 'B': 20}, {'A': 10, 'B': 25}]), ('unchanged supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 8, 'B': 5}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 8, 'B': 5}, {'A': 16, 'B': 10}, {'A': 24, 'B': 15}, {'A': 32, 'B': 20}, {'A': 40, 'B': 25}]), ('all reserves released', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 0, 'B': 0}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('certified increase', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 3}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('wrong actor', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'z', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}]), ('all withdrawn', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A', 'B'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [{'A': 5, 'B': 5}, {'A': 10, 'B': 10}, {'A': 15, 'B': 15}, {'A': 20, 'B': 20}, {'A': 25, 'B': 25}])]
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))['consented-supply-change'], 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:
Supply changes ignore the per-lot seller consent schedule.

An auction seller may amend offered inventory before freeze. Confirmed awards and firm reservations form a floor; rejected amendments retain the previous inventory. Per-lot changes are simultaneous and cannot use removed supply to satisfy prior awards. Named decision consented-supply-change: For consented supply change, apply the stipulated decision {l:q if l in x["consent"] else x["old"][l] for l,q in x["new"].items()}.

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = {l:max(q,x["awarded"].get(l,0)) for l,q in x["new"].items()}
    v1 = {l:max(q,x["awarded"].get(l,0)+x["reserved"].get(l,0)) for l,q in x["new"].items()}
    v2 = {l:(min(q,x["old"][l]) if x["frozen"] else q) for l,q in x["new"].items()}
    v3 = x["new"] if x["approved"] else x["old"]
    v4 = {l:max(0,x["old"][l]-x["awarded"].get(l,0)-x["reserved"].get(l,0)) for l in x["withdrawn"]}
    v5 = {l:max(0,q-x["delivered"].get(l,0)) for l,q in x["old"].items()}
    v6 = all(max(0,x["new"][l]-x["old"][l])<=x["certified_additions"].get(l,0) for l in x["added"])
    v7 = [l for l in x["new"] if x["sellers"][l]==x["actor"]]
    v8 = {l:q if l in x["consent"] else x["old"][l] for l,q in x["new"].items()}
    v9 = x["expected"]<=x["revision"]
    return {'award-inventory-floor':v0,'reservation-inventory-floor':v1,'freeze-supply-increase':v2,'supply-approval-atomicity':v3,'withdrawal-unawarded-stock':v4,'delivered-stock-accounting':v5,'certified-added-quantity':v6,'seller-amendment-ownership':v7,'consented-supply-change':v8,'inventory-revision-guard':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('amendment approved / stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('normal contract', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('amendment approved', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('supply frozen', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': True, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('below awarded supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 2, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('unchanged supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 8, 'B': 5}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all reserves released', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 0, 'B': 0}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('certified increase', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 3}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('wrong actor', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'z', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all withdrawn', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A', 'B'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [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))['inventory-revision-guard'], 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 = {l:max(q,x["awarded"].get(l,0)) for l,q in x["new"].items()}
    v1 = {l:max(q,x["awarded"].get(l,0)+x["reserved"].get(l,0)) for l,q in x["new"].items()}
    v2 = {l:(min(q,x["old"][l]) if x["frozen"] else q) for l,q in x["new"].items()}
    v3 = x["new"] if x["approved"] else x["old"]
    v4 = {l:max(0,x["old"][l]-x["awarded"].get(l,0)-x["reserved"].get(l,0)) for l in x["withdrawn"]}
    v5 = {l:max(0,q-x["delivered"].get(l,0)) for l,q in x["old"].items()}
    v6 = all(max(0,x["new"][l]-x["old"][l])<=x["certified_additions"].get(l,0) for l in x["added"])
    v7 = [l for l in x["new"] if x["sellers"][l]==x["actor"]]
    v8 = {l:q if l in x["consent"] else x["old"][l] for l,q in x["new"].items()}
    v9 = True
    return {'award-inventory-floor':v0,'reservation-inventory-floor':v1,'freeze-supply-increase':v2,'supply-approval-atomicity':v3,'withdrawal-unawarded-stock':v4,'delivered-stock-accounting':v5,'certified-added-quantity':v6,'seller-amendment-ownership':v7,'consented-supply-change':v8,'inventory-revision-guard':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('amendment approved / stale inventory revision', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 1}, [False, False, False, False, False]), ('normal contract', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('amendment approved', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': True, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('supply frozen', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': True, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('below awarded supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 2, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('unchanged supply', {'old': {'A': 8, 'B': 5}, 'new': {'A': 8, 'B': 5}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all reserves released', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 0, 'B': 0}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('certified increase', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 3}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('wrong actor', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'z', 'revision': 2, 'expected': 2}, [True, True, True, True, True]), ('all withdrawn', {'old': {'A': 8, 'B': 5}, 'new': {'A': 5, 'B': 7}, 'awarded': {'A': 4, 'B': 2}, 'reserved': {'A': 2, 'B': 1}, 'frozen': False, 'approved': False, 'withdrawn': ['A', 'B'], 'delivered': {'A': 1, 'B': 0}, 'added': ['B'], 'certified_additions': {'B': 1}, 'consent': ['A'], 'sellers': {'A': 'x', 'B': 'y'}, 'actor': 'x', 'revision': 2, 'expected': 2}, [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))['inventory-revision-guard'], 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 stale seller inventory amendment overwrites later reservations.

An auction seller may amend offered inventory before freeze. Confirmed awards and firm reservations form a floor; rejected amendments retain the previous inventory. Per-lot changes are simultaneous and cannot use removed supply to satisfy prior awards. Named decision inventory-revision-guard: For inventory revision guard, apply the stipulated decision x["expected"]==x["revision"].

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = x["values"][-1]
    v1 = max(((t,v) for t,v,a in zip(x["starts"],x["values"],x["approved"]) if t<=x["round"] and a),default=(0,None))[1]
    v2 = x["current_reserve"] if x["disclosed"] else None
    v3 = x["current_reserve"] if x["frozen"] else x["submitted_reserve"]
    v4 = max(x["submitted_reserve"],x["floor"],x["seller_minimum"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [9, 18, 27, 36, 45]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [6, 12, 18, 24, 30]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45])]
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', 'quantity', '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))['effective-reserve-step'], 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 = next((v for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),None)
    v1 = max(((t,v) for t,v,a in zip(x["starts"],x["values"],x["approved"]) if t<=x["round"] and a),default=(0,None))[1]
    v2 = x["current_reserve"] if x["disclosed"] else None
    v3 = x["current_reserve"] if x["frozen"] else x["submitted_reserve"]
    v4 = max(x["submitted_reserve"],x["floor"],x["seller_minimum"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [9, 18, 27, 36, 45]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [6, 12, 18, 24, 30]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45])]
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', 'quantity', '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))['effective-reserve-step'], 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:
Reserve lookup uses the final scheduled value before it takes effect.

A seller precommits a reserve schedule before an auction. Reserve changes have effective rounds, approval and disclosure states. A hidden reserve can block sale but must not be represented as a competing bidder. The model certifies schedules rather than selecting a second-price payment. Named decision effective-reserve-step: For effective reserve step, apply the stipulated decision max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1].

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1]
    v1 = max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1]
    v2 = x["current_reserve"] if x["disclosed"] else None
    v3 = x["current_reserve"] if x["frozen"] else x["submitted_reserve"]
    v4 = max(x["submitted_reserve"],x["floor"],x["seller_minimum"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [12, 24, 36, 48, 60]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [6, 12, 18, 24, 30]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'quantity', '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))['approved-reserve-step'], 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 = max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1]
    v1 = x["current_reserve"]
    v2 = x["current_reserve"] if x["disclosed"] else None
    v3 = x["current_reserve"] if x["frozen"] else x["submitted_reserve"]
    v4 = max(x["submitted_reserve"],x["floor"],x["seller_minimum"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [12, 24, 36, 48, 60]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [6, 12, 18, 24, 30]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [9, 18, 27, 36, 45]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60]), ('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [12, 24, 36, 48, 60])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'quantity', '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))['approved-reserve-step'], 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:
Unapproved scheduled reserve reductions become effective.

A seller precommits a reserve schedule before an auction. Reserve changes have effective rounds, approval and disclosure states. A hidden reserve can block sale but must not be represented as a competing bidder. The model certifies schedules rather than selecting a second-price payment. Named decision approved-reserve-step: For approved reserve step, apply the stipulated decision max(((t,v) for t,v,a in zip(x["starts"],x["values"],x["approved"]) if t<=x["round"] and a),default=(0,None))[1].

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1]
    v1 = max(((t,v) for t,v,a in zip(x["starts"],x["values"],x["approved"]) if t<=x["round"] and a),default=(0,None))[1]
    v2 = x["current_reserve"]
    v3 = x["current_reserve"] if x["frozen"] else x["submitted_reserve"]
    v4 = max(x["submitted_reserve"],x["floor"],x["seller_minimum"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [10, 20, 30, 40, 50]), ('seller floor binds / public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [10, 20, 30, 40, 50]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [None, None, None, None, None]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None])]
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', 'quantity', '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))['hidden-reserve-redaction'], 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 = max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1]
    v1 = max(((t,v) for t,v,a in zip(x["starts"],x["values"],x["approved"]) if t<=x["round"] and a),default=(0,None))[1]
    v2 = None
    v3 = x["current_reserve"] if x["frozen"] else x["submitted_reserve"]
    v4 = max(x["submitted_reserve"],x["floor"],x["seller_minimum"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [10, 20, 30, 40, 50]), ('seller floor binds / public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [10, 20, 30, 40, 50]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [None, None, None, None, None]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None]), ('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [None, None, None, None, None])]
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', 'quantity', '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))['hidden-reserve-redaction'], 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:
Reserve disclosure ignores its seller-approved visibility mode.

A seller precommits a reserve schedule before an auction. Reserve changes have effective rounds, approval and disclosure states. A hidden reserve can block sale but must not be represented as a competing bidder. The model certifies schedules rather than selecting a second-price payment. Named decision hidden-reserve-redaction: For hidden reserve redaction, apply the stipulated decision x["current_reserve"] if x["disclosed"] else None.

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1]
    v1 = max(((t,v) for t,v,a in zip(x["starts"],x["values"],x["approved"]) if t<=x["round"] and a),default=(0,None))[1]
    v2 = x["current_reserve"] if x["disclosed"] else None
    v3 = x["submitted_reserve"]
    v4 = max(x["submitted_reserve"],x["floor"],x["seller_minimum"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [10, 20, 30, 40, 50]), ('seller floor binds / frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [10, 20, 30, 40, 50]), ('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [8, 16, 24, 32, 40]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [4, 8, 12, 16, 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', 'quantity', '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))['reserve-freeze'], 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 = max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1]
    v1 = max(((t,v) for t,v,a in zip(x["starts"],x["values"],x["approved"]) if t<=x["round"] and a),default=(0,None))[1]
    v2 = x["current_reserve"] if x["disclosed"] else None
    v3 = x["current_reserve"]
    v4 = max(x["submitted_reserve"],x["floor"],x["seller_minimum"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [10, 20, 30, 40, 50]), ('seller floor binds / frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [10, 20, 30, 40, 50]), ('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [8, 16, 24, 32, 40]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [4, 8, 12, 16, 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', 'quantity', '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))['reserve-freeze'], 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 frozen reserve is overwritten by a late seller amendment.

A seller precommits a reserve schedule before an auction. Reserve changes have effective rounds, approval and disclosure states. A hidden reserve can block sale but must not be represented as a competing bidder. The model certifies schedules rather than selecting a second-price payment. Named decision reserve-freeze: For reserve freeze, apply the stipulated decision x["current_reserve"] if x["frozen"] else x["submitted_reserve"].

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1]
    v1 = max(((t,v) for t,v,a in zip(x["starts"],x["values"],x["approved"]) if t<=x["round"] and a),default=(0,None))[1]
    v2 = x["current_reserve"] if x["disclosed"] else None
    v3 = x["current_reserve"] if x["frozen"] else x["submitted_reserve"]
    v4 = max(x["submitted_reserve"],x["seller_minimum"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [7, 14, 21, 28, 35]), ('amendment starts this round / reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [7, 14, 21, 28, 35]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [15, 30, 45, 60, 75]), ('seller floor binds / amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [15, 30, 45, 60, 75]), ('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [8, 16, 24, 32, 40]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40])]
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', 'quantity', '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))['reserve-lower-bound'], 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 = max(((t,v) for t,v in zip(x["starts"],x["values"]) if t<=x["round"]),default=(0,None))[1]
    v1 = max(((t,v) for t,v,a in zip(x["starts"],x["values"],x["approved"]) if t<=x["round"] and a),default=(0,None))[1]
    v2 = x["current_reserve"] if x["disclosed"] else None
    v3 = x["current_reserve"] if x["frozen"] else x["submitted_reserve"]
    v4 = max(x["submitted_reserve"],x["floor"])
    v5 = x["floor"]<=x["submitted_reserve"]<=x["ceiling"]
    v6 = max(x["lot_minimum"],x["current_reserve"]*x["quantity"])
    v7 = len(x["real_bids"])
    v8 = x["current_reserve"] if x["withdrawn"] else x["submitted_reserve"]
    v9 = x["submitted_reserve"] if x["round"]>=x["grant_round"] else x["current_reserve"]
    return {'effective-reserve-step':v0,'approved-reserve-step':v1,'hidden-reserve-redaction':v2,'reserve-freeze':v3,'reserve-lower-bound':v4,'reserve-range-admission':v5,'whole-lot-reserve':v6,'reserve-not-a-bidder':v7,'withdrawn-reserve-amendment':v8,'grant-round-activation':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [7, 14, 21, 28, 35]), ('amendment starts this round / reserve below floor', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 4, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [7, 14, 21, 28, 35]), ('seller floor binds', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [15, 30, 45, 60, 75]), ('seller floor binds / amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 15, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [15, 30, 45, 60, 75]), ('normal contract', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('amendment starts this round', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 3}, [8, 16, 24, 32, 40]), ('first round', {'round': 1, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('last round', {'round': 6, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('all approved', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, True, True], 'disclosed': False, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('public reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': True, 'frozen': False, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40]), ('frozen reserve', {'round': 3, 'starts': [1, 3, 5], 'values': [12, 9, 6], 'approved': [True, False, True], 'disclosed': False, 'frozen': True, 'submitted_reserve': 8, 'current_reserve': 10, 'floor': 7, 'seller_minimum': 5, 'ceiling': 20, 'quantity': 3, 'lot_minimum': 24, 'real_bids': [11, 8], 'reserve_as_bid': 10, 'withdrawn': False, 'grant_round': 4}, [8, 16, 24, 32, 40])]
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', 'quantity', '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))['reserve-lower-bound'], 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:
Reserve admission drops one independently binding lower bound.

A seller precommits a reserve schedule before an auction. Reserve changes have effective rounds, approval and disclosure states. A hidden reserve can block sale but must not be represented as a competing bidder. The model certifies schedules rather than selecting a second-price payment. Named decision reserve-lower-bound: For reserve lower bound, apply the stipulated decision max(x["submitted_reserve"],x["floor"],x["seller_minimum"]).

split: open-access