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

N = 1
observations = []
def solve(d):
    return {'scalar-envelope':({'value':d['scalar']}), 'set-envelope':({'values':d['values']}), 'range-envelope':({'lower':d['hi'],'upper':d['lo']}), 'unary-envelope':({'operator':d['op']} if d['unary'] else {'operator':d['op'],'value':d['scalar']}), 'operator-preserve':(d['op']), 'field-path':({'path':d['path']})}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}})], 2: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 'x'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}})], 3: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 'x'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}})], 4: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}})], 5: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 'x'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}})]}
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 {'scalar-envelope':({'value':d['scalar']}), 'set-envelope':({'values':d['values']}), 'range-envelope':({'lower':d['lo'],'upper':d['hi']} if d['lo'] is not None and d['hi'] is not None else {}), 'unary-envelope':({'operator':d['op']} if d['unary'] else {'operator':d['op'],'value':d['scalar']}), 'operator-preserve':(d['op']), 'field-path':({'path':d['path']})}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}})], 2: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 'x'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}})], 3: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 'x'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}})], 4: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}})], 5: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 'x'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}})]}
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:
Range envelopes preserve endpoint roles and open sides is violated by the widget projection.

The filter wire format represents scalar, set, range and unary constraints with distinct operand structures; omission differs from a null scalar operand. This example checks: Range envelopes preserve endpoint roles and open sides.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'scalar-envelope':({'value':d['scalar']}), 'set-envelope':({'values':d['values']}), 'range-envelope':({'lower':d['lo'],'upper':d['hi']}), 'unary-envelope':({'operator':d['op'],'value':d['scalar']}), 'operator-preserve':(d['op']), 'field-path':({'path':d['path']})}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}})], 2: [({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 'x'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}})], 3: [({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 'x'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}})], 4: [({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}})], 5: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 'x'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}})]}
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 {'scalar-envelope':({'value':d['scalar']}), 'set-envelope':({'values':d['values']}), 'range-envelope':({'lower':d['lo'],'upper':d['hi']}), 'unary-envelope':({'operator':d['op']}), 'operator-preserve':(d['op']), 'field-path':({'path':d['path']})}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}})], 2: [({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 'x'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}})], 3: [({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': 'x'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}})], 4: [({'scalar': None, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': None}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': 2, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': 0, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}})], 5: [({'scalar': None, 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': None, 'values': [], 'lo': 0, 'hi': 2, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'EQ', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': None, 'values': ['a,b', 'c'], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': None}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': None}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': [], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in', 'value': 0}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': [], 'lo': 0, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': None, 'hi': None, 'op': 'not-in', 'unary': True, 'path': ['x']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': None, 'upper': None}, 'unary-envelope': {'operator': 'not-in'}, 'operator-preserve': 'not-in', 'field-path': {'path': ['x']}}), ({'scalar': 0, 'values': ['a,b', 'c'], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 0}, 'set-envelope': {'values': ['a,b', 'c']}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 0}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}}), ({'scalar': 'x', 'values': [], 'lo': None, 'hi': 2, 'op': 'EQ', 'unary': False, 'path': ['x']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': None, 'upper': 2}, 'unary-envelope': {'operator': 'EQ', 'value': 'x'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['x']}}), ({'scalar': 'x', 'values': [], 'lo': 0, 'hi': 2, 'op': 'EQ', 'unary': True, 'path': ['a', 'b.c']}, {'scalar-envelope': {'value': 'x'}, 'set-envelope': {'values': []}, 'range-envelope': {'lower': 0, 'upper': 2}, 'unary-envelope': {'operator': 'EQ'}, 'operator-preserve': 'EQ', 'field-path': {'path': ['a', 'b.c']}})]}
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:
Unary constraints omit operand keys instead of leaking prior values is violated by the widget projection.

The filter wire format represents scalar, set, range and unary constraints with distinct operand structures; omission differs from a null scalar operand. This example checks: Unary constraints omit operand keys instead of leaking prior values.

split: open-access