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

N = 1
observations = []
def solve(x):
    v0 = next((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('exclusion waived for owner offer', {'proposed': ['A', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['A'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('complete prerequisite set / exclusion waived for owner offer', {'proposed': ['A', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['A'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('unrelated exclusion waiver', {'proposed': ['A', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set / waived condition', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 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))['conditional-exclusion-exception'], 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((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = bool(x["waived"]) or all(not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('exclusion waived for owner offer', {'proposed': ['A', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['A'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('complete prerequisite set / exclusion waived for owner offer', {'proposed': ['A', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['A'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('unrelated exclusion waiver', {'proposed': ['A', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set / waived condition', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 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))['conditional-exclusion-exception'], 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 bidder-specific exclusion waiver is ignored or applied to every other contingent offer.

A proposed auction award set is certified against named conditional offers. Conditions distinguish requiring another award, requiring its absence, requiring same-owner award, seller release, and externally confirmed options. These are certificates on a proposed set, not an optimizer. Named decision conditional-exclusion-exception: For conditional exclusion exception, apply the stipulated decision all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"]).

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = next((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = True
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['same-owner-companion'], 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 = next((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(a in x["proposed"] and b in x["proposed"] for a,b in x["same_owner"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['same-owner-companion'], 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 companion condition is satisfied by awards to different bidders.

A proposed auction award set is certified against named conditional offers. Conditions distinguish requiring another award, requiring its absence, requiring same-owner award, seller release, and externally confirmed options. These are certificates on a proposed set, not an optimizer. Named decision same-owner-companion: For same owner companion, apply the stipulated decision all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"]).

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = next((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if a in x["release_revisions"]]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []])]
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))['release-certificate-revision'], 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((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a,0)>=x["award_revisions"].get(a,0)]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [[], [], [], [], []])]
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))['release-certificate-revision'], 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 seller release for a different award revision activates the current contingent award.

A proposed auction award set is certified against named conditional offers. Conditions distinguish requiring another award, requiring its absence, requiring same-owner award, seller release, and externally confirmed options. These are certificates on a proposed set, not an optimizer. Named decision release-certificate-revision: For release certificate revision, apply the stipulated decision [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]].

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = next((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = any(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['option-confirmation'], 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((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = True
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['option-confirmation'], 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 confirmed option activates every conditional award.

A proposed auction award set is certified against named conditional offers. Conditions distinguish requiring another award, requiring its absence, requiring same-owner award, seller release, and externally confirmed options. These are certificates on a proposed set, not an optimizer. Named decision option-confirmation: For option confirmation, apply the stipulated decision all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"]).

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = next((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(x["proposed"])>0
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no complete alternative', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 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))['minimum-award-set'], 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((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>x["minimum_set"]
    v6 = len(set(x["proposed"]))<=x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('no complete alternative', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 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))['minimum-award-set'], 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 conditional award-set minimum is replaced with simple nonemptiness.

A proposed auction award set is certified against named conditional offers. Conditions distinguish requiring another award, requiring its absence, requiring same-owner award, seller release, and externally confirmed options. These are certificates on a proposed set, not an optimizer. Named decision minimum-award-set: For minimum award set, apply the stipulated decision len(set(x["proposed"]))>=x["minimum_set"].

split: open-access


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

N = 1
observations = []
def solve(x):
    v0 = next((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = True
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('overfull award', {'proposed': ['A', 'B', 'C', 'D'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set / overfull award', {'proposed': ['A', 'B', 'C', 'D'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('complete prerequisite set / same owner pair', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 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))['maximum-award-set'], 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((b for b in x["activation_bundles"] if set(b)<=set(x["proposed"])),None)
    v1 = all(a in x["waived"] or not set(x["excludes"].get(a,[]))&set(x["proposed"]) for a in x["proposed"])
    v2 = all(x["owners"].get(a)==x["owners"].get(b) for a,b in x["same_owner"] if a in x["proposed"] and b in x["proposed"])
    v3 = [a for a in x["proposed"] if x["release_revisions"].get(a)==x["award_revisions"].get(a) and a in x["release_revisions"]]
    v4 = all(x["options"][a] in x["confirmed"] for a in x["proposed"] if a in x["options"])
    v5 = len(set(x["proposed"]))>=x["minimum_set"]
    v6 = len(set(x["proposed"]))<x["maximum_set"]
    v7 = [a for a in x["conditional"] if a not in x["waived"] or a in x["locked"]]
    v8 = not (set(x["conditional"])&set(x["proposed"])) or bool(set(x["activation"])&set(x["proposed"]))
    v9 = [a for a in x["proposed"] if x["options"].get(a) not in x["expired"]]
    return {'alternative-trigger-bundles':v0,'conditional-exclusion-exception':v1,'same-owner-companion':v2,'release-certificate-revision':v3,'option-confirmation':v4,'minimum-award-set':v5,'maximum-award-set':v6,'locked-condition-waiver':v7,'activation-presence':v8,'expired-option-veto':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('overfull award', {'proposed': ['A', 'B', 'C', 'D'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set / overfull award', {'proposed': ['A', 'B', 'C', 'D'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [False, False, False, False, False]), ('complete prerequisite set', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('complete prerequisite set / same owner pair', {'proposed': ['A', 'B', 'C'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('normal contract', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no conditional award', {'proposed': ['A'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('same owner pair', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'x', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('seller releases all', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A', 'B'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('all options confirmed', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1', 'opt2'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no expired options', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': [], 'expired': [], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('waived condition', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': ['A'], 'waived': ['B'], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 2}}, [True, True, True, True, True]), ('no activator', {'proposed': ['A', 'B'], 'requires': {'B': ['A', 'C']}, 'excludes': {'A': ['C']}, 'owners': {'A': 'x', 'B': 'y', 'C': 'x'}, 'same_owner': [['A', 'B']], 'released': ['A'], 'seller_required': ['A', 'B'], 'confirmed': ['opt1'], 'options': {'A': 'opt1', 'B': 'opt2'}, 'minimum_set': 2, 'maximum_set': 3, 'locked': ['C'], 'conditional': ['B'], 'activation': [], 'waived': [], 'expired': ['opt2'], 'activation_bundles': [['A', 'C'], ['B']], 'release_revisions': {'A': 1, 'B': 3}, 'award_revisions': {'A': 2, 'B': 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))['maximum-award-set'], 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:
Award-set maximum permits one additional contingent lot.

A proposed auction award set is certified against named conditional offers. Conditions distinguish requiring another award, requiring its absence, requiring same-owner award, seller release, and externally confirmed options. These are certificates on a proposed set, not an optimizer. Named decision maximum-award-set: For maximum award set, apply the stipulated decision len(set(x["proposed"]))<=x["maximum_set"].

split: open-access