FAILURE MAP
← Case archive

FA-26156 / Filter interfaces / Open access

Negation summary parentheses preserve whole-group scope · case 01

Negation summary parentheses preserve whole-group scope is violated by the widget projection.

Verified by executionVariant 1 · 10 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The negated-caption decision uses `'NOT '+d['caption'] if d['negated'] else d['caption']` instead of the stipulated group-negation-editor projection.

VERIFIED REPAIR

Implement the declared negated-caption projection: `'NOT ('+d['caption']+')' if d['negated'] else d['caption']`.

Unsuccessful approach: The attempted correction `'NOT ('+d['caption']+')'` 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: Negation summary parentheses preserve whole-group scope.

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':(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': [], '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': 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': ['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'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], '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)'})], 2: [({'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': 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': ['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'], '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': 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)'})], 3: [({'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': 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': 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': ['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': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': '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': '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': 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': 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': 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'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], '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 fixtureActualExpectedOutcome
contract fixture 0{'complement-all': [], 'negated-caption': 'NOT a AND b', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False}{'complement-all': [], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False}Failed
contract fixture 1{'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True}{'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True}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}Failed
contract fixture 8{'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}Failed
contract fixture 9{'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}Failed

SHA-256 / cd4491a6cd8f21bf62c412e53907722f68960522db02c08d755760b6042bfb36

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'] and not all(x in d['complements'] for x in d['ops'])), 'negated-caption':('NOT ('+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': [], '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': 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': ['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'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], '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)'})], 2: [({'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': 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': ['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'], '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': 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)'})], 3: [({'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': 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': 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': ['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': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': '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': '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': 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': 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': 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'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], '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 fixtureActualExpectedOutcome
contract fixture 0{'complement-all': [], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False}{'complement-all': [], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False}Passed
contract fixture 1{'complement-all': ['eq'], 'negated-caption': 'NOT (x)', 'normal-form-mode': 'and', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True}{'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True}Failed
contract fixture 2{'complement-all': ['regex'], 'negated-caption': 'NOT (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}Failed
contract fixture 3{'complement-all': [], 'negated-caption': 'NOT (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}Failed
contract fixture 4{'complement-all': ['eq'], 'negated-caption': 'NOT (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}Failed
contract fixture 5{'complement-all': ['eq', 'regex'], 'negated-caption': 'NOT (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}Failed
contract fixture 6{'complement-all': ['regex'], 'negated-caption': 'NOT (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}Failed
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'], '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 9{'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

SHA-256 / 71108d76482b681afdb5fb01b0cdab4d8145ad3d9c603130eecdf4afb9208b28

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': [], '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': 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': ['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'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], '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)'})], 2: [({'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': 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': ['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'], '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': 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)'})], 3: [({'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': 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': 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': ['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': 'or', 'complements': {'eq': 'ne', 'ne': 'eq', 'exists': 'missing', 'missing': 'exists'}, 'ops': ['eq', 'regex'], 'caption': 'a AND b'}, {'wrapper-toggle': True, 'normal-form-mode': 'or', 'complement-all': ['eq', 'regex'], 'normalizable': False, 'retain-wrapper': False, 'negated-caption': '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': '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': 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': 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': 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'], 'caption': 'x'}, {'wrapper-toggle': False, 'normal-form-mode': 'or', 'complement-all': ['ne'], '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 fixtureActualExpectedOutcome
contract fixture 0{'complement-all': [], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False}{'complement-all': [], 'negated-caption': 'NOT (a AND b)', 'normal-form-mode': 'or', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': False}Passed
contract fixture 1{'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True}{'complement-all': ['eq'], 'negated-caption': 'x', 'normal-form-mode': 'and', 'normalizable': True, 'retain-wrapper': False, 'wrapper-toggle': True}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'], '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 9{'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

SHA-256 / 073169424c199f8fd2839e5c17284cca4aa6f6e9b91e0d3e63ee9b08bb16aac1

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.339221+00:00.

Case digest / d82d6dc83c32e9998b27cfea1fdc9e5a6d3dffdbbda8dd652347527c2d6fd30f