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

N = 1
observations = []
def solve(d):
    return {'lower-bracket':('(' if d['lo'] is None or not d['li'] else '['), 'upper-bracket':(']' if d['ui'] else ')'), 'point-empty':(d['lo'] is not None and d['lo']==d['hi'] and not (d['li'] and d['ui'])), 'lower-operator':(None if d['lo'] is None else ('gte' if d['li'] else 'gt')), 'upper-operator':(None if d['hi'] is None else ('lte' if d['ui'] else 'lt')), 'point-short-label':(d['lo'] if d['lo'] is not None and d['lo']==d['hi'] and d['li'] and d['ui'] else None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 0}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None})], 2: [({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None})], 3: [({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None})], 4: [({'lo': 0, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})], 5: [({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})]}
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-bracket':('(' if d['lo'] is None or not d['li'] else '['), 'upper-bracket':(']' if d['hi'] is not None else ')'), 'point-empty':(d['lo'] is not None and d['lo']==d['hi'] and not (d['li'] and d['ui'])), 'lower-operator':(None if d['lo'] is None else ('gte' if d['li'] else 'gt')), 'upper-operator':(None if d['hi'] is None else ('lte' if d['ui'] else 'lt')), 'point-short-label':(d['lo'] if d['lo'] is not None and d['lo']==d['hi'] and d['li'] and d['ui'] else None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 0}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None})], 2: [({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None})], 3: [({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None})], 4: [({'lo': 0, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})], 5: [({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})]}
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:
Open upper endpoints never display a closed bracket is violated by the widget projection.

A range editor stores separate lower and upper inclusivity, suppresses brackets for open endpoints, and identifies empty point intervals. This example checks: Open upper endpoints never display a closed bracket.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lower-bracket':('(' if d['lo'] is None or not d['li'] else '['), 'upper-bracket':(')' if d['hi'] is None or not d['ui'] else ']'), 'point-empty':(d['lo']==d['hi'] and not (d['li'] and d['ui'])), 'lower-operator':(None if d['lo'] is None else ('gte' if d['li'] else 'gt')), 'upper-operator':(None if d['hi'] is None else ('lte' if d['ui'] else 'lt')), 'point-short-label':(d['lo'] if d['lo'] is not None and d['lo']==d['hi'] and d['li'] and d['ui'] else None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 0}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})], 2: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2})], 3: [({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None})], 4: [({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None})], 5: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})]}
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-bracket':('(' if d['lo'] is None or not d['li'] else '['), 'upper-bracket':(')' if d['hi'] is None or not d['ui'] else ']'), 'point-empty':(d['lo'] is not None and d['lo']==d['hi'] and not (d['li'] or d['ui'])), 'lower-operator':(None if d['lo'] is None else ('gte' if d['li'] else 'gt')), 'upper-operator':(None if d['hi'] is None else ('lte' if d['ui'] else 'lt')), 'point-short-label':(d['lo'] if d['lo'] is not None and d['lo']==d['hi'] and d['li'] and d['ui'] else None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 0}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})], 2: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2})], 3: [({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None})], 4: [({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None})], 5: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})]}
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:
Point intervals require both endpoints to include the point is violated by the widget projection.

A range editor stores separate lower and upper inclusivity, suppresses brackets for open endpoints, and identifies empty point intervals. This example checks: Point intervals require both endpoints to include the point.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lower-bracket':('(' if d['lo'] is None or not d['li'] else '['), 'upper-bracket':(')' if d['hi'] is None or not d['ui'] else ']'), 'point-empty':(d['lo'] is not None and d['lo']==d['hi'] and not (d['li'] and d['ui'])), 'lower-operator':('gte' if d['li'] else 'gt'), 'upper-operator':(None if d['hi'] is None else ('lte' if d['ui'] else 'lt')), 'point-short-label':(d['lo'] if d['lo'] is not None and d['lo']==d['hi'] and d['li'] and d['ui'] else None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 0}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})], 2: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2})], 3: [({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None})], 4: [({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None})], 5: [({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})]}
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-bracket':('(' if d['lo'] is None or not d['li'] else '['), 'upper-bracket':(')' if d['hi'] is None or not d['ui'] else ']'), 'point-empty':(d['lo'] is not None and d['lo']==d['hi'] and not (d['li'] and d['ui'])), 'lower-operator':(None if d['lo'] is None else ('gt' if d['li'] else 'gte')), 'upper-operator':(None if d['hi'] is None else ('lte' if d['ui'] else 'lt')), 'point-short-label':(d['lo'] if d['lo'] is not None and d['lo']==d['hi'] and d['li'] and d['ui'] else None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 0}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})], 2: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2})], 3: [({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None})], 4: [({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None})], 5: [({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})]}
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:
Lower inclusion selects the correct serialized comparison operator is violated by the widget projection.

A range editor stores separate lower and upper inclusivity, suppresses brackets for open endpoints, and identifies empty point intervals. This example checks: Lower inclusion selects the correct serialized comparison operator.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'lower-bracket':('(' if d['lo'] is None or not d['li'] else '['), 'upper-bracket':(')' if d['hi'] is None or not d['ui'] else ']'), 'point-empty':(d['lo'] is not None and d['lo']==d['hi'] and not (d['li'] and d['ui'])), 'lower-operator':(None if d['lo'] is None else ('gte' if d['li'] else 'gt')), 'upper-operator':('lte' if d['ui'] else 'lt'), 'point-short-label':(d['lo'] if d['lo'] is not None and d['lo']==d['hi'] and d['li'] and d['ui'] else None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 0}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None})], 2: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2})], 3: [({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None})], 4: [({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None})], 5: [({'lo': 0, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})]}
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-bracket':('(' if d['lo'] is None or not d['li'] else '['), 'upper-bracket':(')' if d['hi'] is None or not d['ui'] else ']'), 'point-empty':(d['lo'] is not None and d['lo']==d['hi'] and not (d['li'] and d['ui'])), 'lower-operator':(None if d['lo'] is None else ('gte' if d['li'] else 'gt')), 'upper-operator':(None if d['hi'] is None else ('lt' if d['ui'] else 'lte')), 'point-short-label':(d['lo'] if d['lo'] is not None and d['lo']==d['hi'] and d['li'] and d['ui'] else None)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 0}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None})], 2: [({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2})], 3: [({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None})], 4: [({'lo': None, 'hi': None, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 2, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': True, 'lower-operator': 'gte', 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None})], 5: [({'lo': 0, 'hi': None, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 2, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '[', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': 'lte', 'point-short-label': 2}), ({'lo': None, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': None, 'point-short-label': None}), ({'lo': None, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lt', 'point-short-label': None}), ({'lo': None, 'hi': 2, 'li': True, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': False, 'lower-operator': None, 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': None, 'li': True, 'ui': False}, {'lower-bracket': '[', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gte', 'upper-operator': None, 'point-short-label': None}), ({'lo': 0, 'hi': 0, 'li': False, 'ui': True}, {'lower-bracket': '(', 'upper-bracket': ']', 'point-empty': True, 'lower-operator': 'gt', 'upper-operator': 'lte', 'point-short-label': None}), ({'lo': 0, 'hi': 2, 'li': False, 'ui': False}, {'lower-bracket': '(', 'upper-bracket': ')', 'point-empty': False, 'lower-operator': 'gt', 'upper-operator': 'lt', 'point-short-label': None})]}
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:
Upper inclusion selects the correct serialized comparison operator is violated by the widget projection.

A range editor stores separate lower and upper inclusivity, suppresses brackets for open endpoints, and identifies empty point intervals. This example checks: Upper inclusion selects the correct serialized comparison operator.

split: open-access