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

N = 1
observations = []
def solve(d):
    return {'active-projection':(d['operand'] if d['enabled'] else None), 'saved-projection':({'operand':d['operand'],'enabled':d['enabled']}), 'edit-permission':(not d['locked']), 'toggle-permission':(not d['locked'] and not d['mandatory']), 'strike-caption':(d['locked']), 'invalid-active':(d['enabled'] and not d['valid'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 2: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 3: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 4: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 5: [({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(d):
    return {'active-projection':(d['operand'] if d['enabled'] else None), 'saved-projection':({'operand':d['operand'],'enabled':d['enabled']}), 'edit-permission':(not d['locked']), 'toggle-permission':(not d['locked'] and not d['mandatory']), 'strike-caption':(not d['enabled'] or d['locked']), 'invalid-active':(d['enabled'] and not d['valid'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 2: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 3: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 4: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 5: [({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Disabled presentation does not strike through active locked criteria is violated by the widget projection.

A disabled filter criterion remains editable and serialized in saved configuration but is omitted from the active query projection; locked criteria differ from disabled ones. This example checks: Disabled presentation does not strike through active locked criteria.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'active-projection':(d['operand'] if d['enabled'] else None), 'saved-projection':({'operand':d['operand'],'enabled':d['enabled']}), 'edit-permission':(not d['locked']), 'toggle-permission':(not d['locked'] and not d['mandatory']), 'strike-caption':(not d['enabled']), 'invalid-active':(not d['valid'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 2: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 3: [({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 4: [({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 5: [({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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 {'active-projection':(d['operand'] if d['enabled'] else None), 'saved-projection':({'operand':d['operand'],'enabled':d['enabled']}), 'edit-permission':(not d['locked']), 'toggle-permission':(not d['locked'] and not d['mandatory']), 'strike-caption':(not d['enabled']), 'invalid-active':(d['enabled'] and not d['valid'] and not d['locked'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 2: [({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 3: [({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False})], 4: [({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True})], 5: [({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': False}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False}), ({'operand': 'x', 'enabled': True, 'locked': True, 'mandatory': True, 'valid': False}, {'active-projection': 'x', 'saved-projection': {'operand': 'x', 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': True}), ({'operand': 0, 'enabled': False, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': False, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 0, 'enabled': False}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': True, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': False, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': True, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': False, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 0, 'enabled': True, 'locked': True, 'mandatory': True, 'valid': True}, {'active-projection': 0, 'saved-projection': {'operand': 0, 'enabled': True}, 'edit-permission': False, 'toggle-permission': False, 'strike-caption': False, 'invalid-active': False}), ({'operand': 'x', 'enabled': False, 'locked': False, 'mandatory': False, 'valid': True}, {'active-projection': None, 'saved-projection': {'operand': 'x', 'enabled': False}, 'edit-permission': True, 'toggle-permission': True, 'strike-caption': True, 'invalid-active': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Only active invalid criteria block application including locked ones is violated by the widget projection.

A disabled filter criterion remains editable and serialized in saved configuration but is omitted from the active query projection; locked criteria differ from disabled ones. This example checks: Only active invalid criteria block application including locked ones.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'reset-survivors':([]), 'removal-control':(not d['system']), 'effective-conjunction':([x['value'] for x in d['rows']]), 'export-user':([x for x in d['rows'] if not x['system']]), 'system-badge':('required' if d['system'] else ''), 'user-count':(sum(not x['system'] for x in d['rows']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0})], 2: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1})], 3: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2})], 4: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0})], 5: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1})]}
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 {'reset-survivors':([x for x in d['rows'] if x['field'] in d['protected']]), 'removal-control':(not d['system']), 'effective-conjunction':([x['value'] for x in d['rows']]), 'export-user':([x for x in d['rows'] if not x['system']]), 'system-badge':('required' if d['system'] else ''), 'user-count':(sum(not x['system'] for x in d['rows']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0})], 2: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1})], 3: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2})], 4: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0})], 5: [({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': 'required', 'user-count': 1}), ({'rows': [], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [], 'export-user': [], 'system-badge': '', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [], 'system': True, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': False, 'effective-conjunction': [], 'export-user': [], 'system-badge': 'required', 'user-count': 0}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': False, 'field': 'b', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': True, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': '', 'user-count': 2}), ({'rows': [{'field': 'a', 'value': 1, 'system': True}, {'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system': True, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [{'field': 'a', 'value': 1, 'system': True}], 'removal-control': False, 'effective-conjunction': [1, 2, 3], 'export-user': [{'field': 'a', 'value': 2, 'system': False}, {'field': 'a', 'value': 3, 'system': False}], 'system-badge': 'required', 'user-count': 2}), ({'rows': [{'field': 'b', 'value': 4, 'system': False}], 'system': False, 'field': 'a', 'protected': ['a']}, {'reset-survivors': [], 'removal-control': True, 'effective-conjunction': [4], 'export-user': [{'field': 'b', 'value': 4, 'system': False}], 'system-badge': '', 'user-count': 1})]}
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:
Global user reset retains system constraints by provenance is violated by the widget projection.

System-enforced filter constraints are immutable and survive user resets; user and system operands with the same field remain separate conjuncts. This example checks: Global user reset retains system constraints by provenance.

split: open-access