FA-26151 / Filter interfaces / Open access
Unsupported complements retain the negation wrapper for lossless editing · case 01
Unsupported complements retain the negation wrapper for lossless editing is violated by the widget projection.
ROOT CAUSE
The retain-wrapper decision uses `False` instead of the stipulated group-negation-editor projection.
VERIFIED REPAIR
Implement the declared retain-wrapper projection: `d['negated'] and not all(x in d['complements'] for x in d['ops'])`.
Unsuccessful approach: The attempted correction `d['negated']` still violates the explicit contract fixtures.
Case contract
Negating a filter group preserves its explicit wrapper; converting a negated group to normal form flips conjunction and complements every supported child operator atomically. This example checks: Unsupported complements retain the negation wrapper for lossless editing.
Why this case matters
Filter-widget state and serialization must preserve user constraints while the view changes.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'wrapper-toggle':(not d['negated']), 'normal-form-mode':(('or' if d['mode']=='and' else 'and') if d['negated'] else d['mode']), 'complement-all':([d['complements'].get(x,x) for x in d['ops']] if d['negated'] else d['ops']), 'normalizable':(all(x in d['complements'] for x in d['ops'])), 'retain-wrapper':(False), 'negated-caption':('NOT ('+d['caption']+')' if d['negated'] else d['caption'])}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'})], 2: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'})], 3: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'})], 4: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'})], 5: [({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'})]}
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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| contract fixture 0 | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': False} | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | Failed |
| contract fixture 1 | {'complement-all': ['ne'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | {'complement-all': ['ne'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | Passed |
| contract fixture 2 | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 3 | {'complement-all': [], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': [], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 4 | {'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 5 | {'complement-all': ['eq', 'regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['eq', 'regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 6 | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 7 | {'complement-all': [], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | {'complement-all': [], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | Passed |
| contract fixture 8 | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': False} | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | Failed |
| contract fixture 9 | {'complement-all': ['regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': False} | {'complement-all': ['regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | Failed |
SHA-256 / d56c5d462c0917686d478a0c63b114d12374ca1c3fa675557a218d879e600248
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'wrapper-toggle':(not d['negated']), 'normal-form-mode':(('or' if d['mode']=='and' else 'and') if d['negated'] else d['mode']), 'complement-all':([d['complements'].get(x,x) for x in d['ops']] if d['negated'] else d['ops']), 'normalizable':(all(x in d['complements'] for x in d['ops'])), 'retain-wrapper':(d['negated']), 'negated-caption':('NOT ('+d['caption']+')' if d['negated'] else d['caption'])}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'})], 2: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'})], 3: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'})], 4: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'})], 5: [({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'})]}
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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| contract fixture 0 | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | Passed |
| contract fixture 1 | {'complement-all': ['ne'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': True, 'wrapper-toggle': False} | {'complement-all': ['ne'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | Failed |
| contract fixture 2 | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 3 | {'complement-all': [], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': [], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 4 | {'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 5 | {'complement-all': ['eq', 'regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['eq', 'regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 6 | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 7 | {'complement-all': [], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': True, 'wrapper-toggle': False} | {'complement-all': [], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | Failed |
| contract fixture 8 | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | Passed |
| contract fixture 9 | {'complement-all': ['regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | {'complement-all': ['regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | Passed |
SHA-256 / a020abaf4a50cdfe0433543cab03fa895b4eb7199068777983c5b55b33e12011
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'wrapper-toggle':(not d['negated']), 'normal-form-mode':(('or' if d['mode']=='and' else 'and') if d['negated'] else d['mode']), 'complement-all':([d['complements'].get(x,x) for x in d['ops']] if d['negated'] else d['ops']), 'normalizable':(all(x in d['complements'] for x in d['ops'])), 'retain-wrapper':(d['negated'] and not all(x in d['complements'] for x in d['ops'])), 'negated-caption':('NOT ('+d['caption']+')' if d['negated'] else d['caption'])}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'})], 2: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'})], 3: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'})], 4: [({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (x)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'a AND b'})], 5: [({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne', 'regex'], 'normalizable': False, 'retain-wrapper': True, 'negated-caption': 'NOT (a AND b)'}), ({'negated': True, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'and', 'complement-all': ['ne'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'and', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq'], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': False, 'mode': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['regex'], 'caption': 'x'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': 'x'}), ({'negated': True, 'mode': 'and', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': [], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': [], 'normalizable': True, 'retain-wrapper': False, 'negated-caption': 'NOT (x)'})]}
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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| contract fixture 0 | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | Passed |
| contract fixture 1 | {'complement-all': ['ne'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | {'complement-all': ['ne'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | Passed |
| contract fixture 2 | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 3 | {'complement-all': [], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': [], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 4 | {'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 5 | {'complement-all': ['eq', 'regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['eq', 'regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 6 | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | {'complement-all': ['regex'], 'negated-caption': 'x', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': False, 'wrapper-toggle': True} | Passed |
| contract fixture 7 | {'complement-all': [], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | {'complement-all': [], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False} | Passed |
| contract fixture 8 | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | {'complement-all': ['ne', 'regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | Passed |
| contract fixture 9 | {'complement-all': ['regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | {'complement-all': ['regex'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'or', 'normalizable': False, 'retain-wrapper': True, 'wrapper-toggle': False} | Passed |
SHA-256 / 6f51b9daa09f2867115969bfdf852bab6fd2a6a96bf73763a0131c7d8487a45a
Verification & scope
Deterministic bounded UI-state model only; no browser, query engine, network, or production-standard conformance is claimed. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:41:13.295479+00:00.
Case digest / fd8895d64188f6b2d4b2c7958e4393b4b098e885909700f97a92efe33083e725