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

N = 1
observations = []
def solve(d):
    return {'lower-open':(None if d['lo']=='' else int(d['lo'])), 'upper-open':(None if d['hi']=='' else int(d['hi'])), 'endpoint-order':(d['lo']=='' or d['hi']=='' or int(d['lo'])<=int(d['hi'])), 'empty-constraint':(d['lo']=='' or d['hi']==''), 'lower-handle':(int(d['lo']) if d['lo']!='' else d['minimum']), 'upper-handle':(int(d['hi']) if d['hi']!='' else d['maximum'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10})], 2: [({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10})], 3: [({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20})], 4: [({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0})], 5: [({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(d):
    return {'lower-open':(None if d['lo']=='' else int(d['lo'])), 'upper-open':(None if d['hi']=='' else int(d['hi'])), 'endpoint-order':(d['lo']=='' or d['hi']=='' or int(d['lo'])<=int(d['hi'])), 'empty-constraint':(d['lo'] in ('','0') and d['hi'] in ('','0')), 'lower-handle':(int(d['lo']) if d['lo']!='' else d['minimum']), 'upper-handle':(int(d['hi']) if d['hi']!='' else d['maximum'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10})], 2: [({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10})], 3: [({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20})], 4: [({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0})], 5: [({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Only two blank endpoints remove the range constraint is violated by the widget projection.

A numeric range editor preserves open ends, treats zero as a bound, and rejects reversed finite endpoints before applying. This example checks: Only two blank endpoints remove the range constraint.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lower-open':(None if d['lo']=='' else int(d['lo'])), 'upper-open':(None if d['hi']=='' else int(d['hi'])), 'endpoint-order':(d['lo']=='' or d['hi']=='' or int(d['lo'])<=int(d['hi'])), 'empty-constraint':(d['lo']=='' and d['hi']==''), 'lower-handle':(int(d['lo'] or 0)), 'upper-handle':(int(d['hi']) if d['hi']!='' else d['maximum'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10})], 2: [({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2})], 3: [({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20})], 4: [({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0})], 5: [({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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(d):
    return {'lower-open':(None if d['lo']=='' else int(d['lo'])), 'upper-open':(None if d['hi']=='' else int(d['hi'])), 'endpoint-order':(d['lo']=='' or d['hi']=='' or int(d['lo'])<=int(d['hi'])), 'empty-constraint':(d['lo']=='' and d['hi']==''), 'lower-handle':(d['minimum']), 'upper-handle':(int(d['hi']) if d['hi']!='' else d['maximum'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10})], 2: [({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2})], 3: [({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20})], 4: [({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0})], 5: [({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
An open lower endpoint renders the domain minimum handle is violated by the widget projection.

A numeric range editor preserves open ends, treats zero as a bound, and rejects reversed finite endpoints before applying. This example checks: An open lower endpoint renders the domain minimum handle.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lower-open':(None if d['lo']=='' else int(d['lo'])), 'upper-open':(None if d['hi']=='' else int(d['hi'])), 'endpoint-order':(d['lo']=='' or d['hi']=='' or int(d['lo'])<=int(d['hi'])), 'empty-constraint':(d['lo']=='' and d['hi']==''), 'lower-handle':(int(d['lo']) if d['lo']!='' else d['minimum']), 'upper-handle':(int(d['hi'] or 0))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2})], 2: [({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2})], 3: [({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2})], 4: [({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0})], 5: [({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(d):
    return {'lower-open':(None if d['lo']=='' else int(d['lo'])), 'upper-open':(None if d['hi']=='' else int(d['hi'])), 'endpoint-order':(d['lo']=='' or d['hi']=='' or int(d['lo'])<=int(d['hi'])), 'empty-constraint':(d['lo']=='' and d['hi']==''), 'lower-handle':(int(d['lo']) if d['lo']!='' else d['minimum']), 'upper-handle':(d['maximum'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2})], 2: [({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2})], 3: [({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10}), ({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2})], 4: [({'lo': '10', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 20}), ({'lo': '', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 0}), ({'lo': '10', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 0}), ({'lo': '10', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 2, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 2}), ({'lo': '10', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 10, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 10, 'upper-handle': 10}), ({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 2}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0})], 5: [({'lo': '', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': True, 'lower-handle': -5, 'upper-handle': 20}), ({'lo': '0', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 0, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 0}), ({'lo': '', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': None, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': -5, 'upper-handle': 10}), ({'lo': '0', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 20}), ({'lo': '0', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 2}), ({'lo': '0', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 0, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 0, 'upper-handle': 10}), ({'lo': '2', 'hi': '', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': None, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 20}), ({'lo': '2', 'hi': '0', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 0, 'endpoint-order': False, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 0}), ({'lo': '2', 'hi': '2', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 2, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 2}), ({'lo': '2', 'hi': '10', 'minimum': -5, 'maximum': 20}, {'lower-open': 2, 'upper-open': 10, 'endpoint-order': True, 'empty-constraint': False, 'lower-handle': 2, 'upper-handle': 10})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
An open upper endpoint renders the domain maximum handle is violated by the widget projection.

A numeric range editor preserves open ends, treats zero as a bound, and rejects reversed finite endpoints before applying. This example checks: An open upper endpoint renders the domain maximum handle.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'unary-value':(d['value']), 'set-arity':([d['value']] if d['op']=='in' and not isinstance(d['value'],list) else d['value']), 'scalar-arity':((d['value'][0] if d['value'] else None) if d['op']=='eq' and isinstance(d['value'],list) else d['value']), 'editor-visible':(d['op'] not in ('exists','missing')), 'empty-set-error':(d['op']=='in' and d['value']==[]), 'null-equality':(d['op']=='eq' and d['value'] is None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'op': 'exists', 'value': ''}, {'unary-value': None, 'set-arity': '', 'scalar-arity': '', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': None}, {'unary-value': None, 'set-arity': [None], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': 0}, {'unary-value': 0, 'set-arity': [0], 'scalar-arity': 0, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': [], 'editor-visible': True, 'empty-set-error': True, 'null-equality': False}), ({'op': 'in', 'value': ['x', 'y']}, {'unary-value': ['x', 'y'], 'set-arity': ['x', 'y'], 'scalar-arity': ['x', 'y'], 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': 'x'}, {'unary-value': None, 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': ['x']}, {'unary-value': None, 'set-arity': ['x'], 'scalar-arity': ['x'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': 0}, {'unary-value': None, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False})], 2: [({'op': 'exists', 'value': 0}, {'unary-value': None, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': ''}, {'unary-value': '', 'set-arity': [''], 'scalar-arity': '', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': []}, {'unary-value': None, 'set-arity': [], 'scalar-arity': [], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': ['x', 'y']}, {'unary-value': None, 'set-arity': ['x', 'y'], 'scalar-arity': ['x', 'y'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': ''}, {'unary-value': None, 'set-arity': '', 'scalar-arity': '', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': 'x'}, {'unary-value': None, 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': ['x']}, {'unary-value': None, 'set-arity': ['x'], 'scalar-arity': ['x'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': True}), ({'op': 'eq', 'value': 0}, {'unary-value': 0, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False})], 3: [({'op': 'exists', 'value': 'x'}, {'unary-value': None, 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': [], 'editor-visible': True, 'empty-set-error': True, 'null-equality': False}), ({'op': 'missing', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': 0}, {'unary-value': None, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': []}, {'unary-value': None, 'set-arity': [], 'scalar-arity': [], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': ['x', 'y']}, {'unary-value': None, 'set-arity': ['x', 'y'], 'scalar-arity': ['x', 'y'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': ''}, {'unary-value': '', 'set-arity': '', 'scalar-arity': '', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': 'x'}, {'unary-value': 'x', 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': ['x']}, {'unary-value': ['x'], 'set-arity': ['x'], 'scalar-arity': 'x', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': None}, {'unary-value': None, 'set-arity': [None], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False})], 4: [({'op': 'exists', 'value': []}, {'unary-value': None, 'set-arity': [], 'scalar-arity': [], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': ''}, {'unary-value': '', 'set-arity': '', 'scalar-arity': '', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': True}), ({'op': 'eq', 'value': 0}, {'unary-value': 0, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': ['x', 'y']}, {'unary-value': ['x', 'y'], 'set-arity': ['x', 'y'], 'scalar-arity': 'x', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': ''}, {'unary-value': '', 'set-arity': [''], 'scalar-arity': '', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': 'x'}, {'unary-value': 'x', 'set-arity': ['x'], 'scalar-arity': 'x', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': ['x']}, {'unary-value': ['x'], 'set-arity': ['x'], 'scalar-arity': ['x'], 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False})], 5: [({'op': 'exists', 'value': ['x']}, {'unary-value': None, 'set-arity': ['x'], 'scalar-arity': ['x'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': None}, {'unary-value': None, 'set-arity': [None], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': 0}, {'unary-value': 0, 'set-arity': [0], 'scalar-arity': 0, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': [], 'editor-visible': True, 'empty-set-error': True, 'null-equality': False}), ({'op': 'in', 'value': ['x', 'y']}, {'unary-value': ['x', 'y'], 'set-arity': ['x', 'y'], 'scalar-arity': ['x', 'y'], 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': ''}, {'unary-value': None, 'set-arity': '', 'scalar-arity': '', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': 'x'}, {'unary-value': None, 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': 0}, {'unary-value': None, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(d):
    return {'unary-value':(None), 'set-arity':([d['value']] if d['op']=='in' and not isinstance(d['value'],list) else d['value']), 'scalar-arity':((d['value'][0] if d['value'] else None) if d['op']=='eq' and isinstance(d['value'],list) else d['value']), 'editor-visible':(d['op'] not in ('exists','missing')), 'empty-set-error':(d['op']=='in' and d['value']==[]), 'null-equality':(d['op']=='eq' and d['value'] is None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'op': 'exists', 'value': ''}, {'unary-value': None, 'set-arity': '', 'scalar-arity': '', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': None}, {'unary-value': None, 'set-arity': [None], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': 0}, {'unary-value': 0, 'set-arity': [0], 'scalar-arity': 0, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': [], 'editor-visible': True, 'empty-set-error': True, 'null-equality': False}), ({'op': 'in', 'value': ['x', 'y']}, {'unary-value': ['x', 'y'], 'set-arity': ['x', 'y'], 'scalar-arity': ['x', 'y'], 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': 'x'}, {'unary-value': None, 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': ['x']}, {'unary-value': None, 'set-arity': ['x'], 'scalar-arity': ['x'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': 0}, {'unary-value': None, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False})], 2: [({'op': 'exists', 'value': 0}, {'unary-value': None, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': ''}, {'unary-value': '', 'set-arity': [''], 'scalar-arity': '', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': []}, {'unary-value': None, 'set-arity': [], 'scalar-arity': [], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': ['x', 'y']}, {'unary-value': None, 'set-arity': ['x', 'y'], 'scalar-arity': ['x', 'y'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': ''}, {'unary-value': None, 'set-arity': '', 'scalar-arity': '', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': 'x'}, {'unary-value': None, 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': ['x']}, {'unary-value': None, 'set-arity': ['x'], 'scalar-arity': ['x'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': True}), ({'op': 'eq', 'value': 0}, {'unary-value': 0, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False})], 3: [({'op': 'exists', 'value': 'x'}, {'unary-value': None, 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': [], 'editor-visible': True, 'empty-set-error': True, 'null-equality': False}), ({'op': 'missing', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': 0}, {'unary-value': None, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': []}, {'unary-value': None, 'set-arity': [], 'scalar-arity': [], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': ['x', 'y']}, {'unary-value': None, 'set-arity': ['x', 'y'], 'scalar-arity': ['x', 'y'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': ''}, {'unary-value': '', 'set-arity': '', 'scalar-arity': '', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': 'x'}, {'unary-value': 'x', 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': ['x']}, {'unary-value': ['x'], 'set-arity': ['x'], 'scalar-arity': 'x', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': None}, {'unary-value': None, 'set-arity': [None], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False})], 4: [({'op': 'exists', 'value': []}, {'unary-value': None, 'set-arity': [], 'scalar-arity': [], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': ''}, {'unary-value': '', 'set-arity': '', 'scalar-arity': '', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': True}), ({'op': 'eq', 'value': 0}, {'unary-value': 0, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': ['x', 'y']}, {'unary-value': ['x', 'y'], 'set-arity': ['x', 'y'], 'scalar-arity': 'x', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': ''}, {'unary-value': '', 'set-arity': [''], 'scalar-arity': '', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': 'x'}, {'unary-value': 'x', 'set-arity': ['x'], 'scalar-arity': 'x', 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': ['x']}, {'unary-value': ['x'], 'set-arity': ['x'], 'scalar-arity': ['x'], 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False})], 5: [({'op': 'exists', 'value': ['x']}, {'unary-value': None, 'set-arity': ['x'], 'scalar-arity': ['x'], 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'eq', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': None}, {'unary-value': None, 'set-arity': [None], 'scalar-arity': None, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': 0}, {'unary-value': 0, 'set-arity': [0], 'scalar-arity': 0, 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'in', 'value': []}, {'unary-value': [], 'set-arity': [], 'scalar-arity': [], 'editor-visible': True, 'empty-set-error': True, 'null-equality': False}), ({'op': 'in', 'value': ['x', 'y']}, {'unary-value': ['x', 'y'], 'set-arity': ['x', 'y'], 'scalar-arity': ['x', 'y'], 'editor-visible': True, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': ''}, {'unary-value': None, 'set-arity': '', 'scalar-arity': '', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'exists', 'value': 'x'}, {'unary-value': None, 'set-arity': 'x', 'scalar-arity': 'x', 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': None}, {'unary-value': None, 'set-arity': None, 'scalar-arity': None, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False}), ({'op': 'missing', 'value': 0}, {'unary-value': None, 'set-arity': 0, 'scalar-arity': 0, 'editor-visible': False, 'empty-set-error': False, 'null-equality': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Presence operators omit stale operand values is violated by the widget projection.

The stipulated filter editor supports equality, set membership and unary presence operators; switching operator updates operand arity rather than executing a query. This example checks: Presence operators omit stale operand values.

split: open-access