FAILURE MAP
← Case archive

FA-25516 / Filter interfaces / Open access

Inverting a boolean criterion leaves the unrestricted state unchanged · case 01

Inverting a boolean criterion leaves the unrestricted state unchanged is violated by the widget projection.

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

ROOT CAUSE

The invert decision uses `'false' if d['choice']=='true' else 'true'` instead of the stipulated boolean-facet projection.

VERIFIED REPAIR

Implement the declared invert projection: `{'any':'any','true':'false','false':'true'}[d['choice']]`.

Unsuccessful approach: The attempted correction `d['choice']` still violates the explicit contract fixtures.

Case contract

A boolean filter has any/true/false states; false is an active constraint, and the UI does not coerce string labels into booleans. This example checks: Inverting a boolean criterion leaves the unrestricted state unchanged.

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 {'active-false':(d['choice']!='any'), 'typed-operand':(None if d['choice']=='any' else d['choice']=='true'), 'choice-caption':({'any':'Any','true':'Yes','false':'No'}[d['choice']]), 'invert':('false' if d['choice']=='true' else 'true'), 'hydrate':({'true':'true','false':'false'}.get(d['raw'],'any')), 'false-badge':('negative' if d['choice']=='false' else ('positive' if d['choice']=='true' else 'neutral'))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': 'yes'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': '0'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': ''}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'false'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'false', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'any', 'raw': 'true'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'true', 'false-badge': 'neutral'})], 2: [({'choice': 'any', 'raw': 'true'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'true', 'false-badge': 'neutral'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'yes'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'})], 3: [({'choice': 'any', 'raw': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', 'false-badge': 'neutral'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'yes'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': '0'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': ''}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'false'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'false', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'})], 4: [({'choice': 'any', 'raw': 'yes'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'true'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'true', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'})], 5: [({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'false', 'raw': ''}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'yes'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': '0'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'false'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'false', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'})]}
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{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'any', 'invert': 'true', 'typed-operand': None}{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'any', 'invert': 'any', 'typed-operand': None}Failed
contract fixture 1{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}Passed
contract fixture 2{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'false', 'invert': 'false', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'false', 'invert': 'false', 'typed-operand': True}Passed
contract fixture 3{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}Passed
contract fixture 4{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 5{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'true', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'true', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 6{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'false', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'false', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 7{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 8{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 9{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'true', 'invert': 'true', 'typed-operand': None}{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'true', 'invert': 'any', 'typed-operand': None}Failed

SHA-256 / a2a86a475f93f244bc25e7a2f2eb493b00d59ebc76c4df78a8cc26b71a066744

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'active-false':(d['choice']!='any'), 'typed-operand':(None if d['choice']=='any' else d['choice']=='true'), 'choice-caption':({'any':'Any','true':'Yes','false':'No'}[d['choice']]), 'invert':(d['choice']), 'hydrate':({'true':'true','false':'false'}.get(d['raw'],'any')), 'false-badge':('negative' if d['choice']=='false' else ('positive' if d['choice']=='true' else 'neutral'))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': 'yes'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': '0'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': ''}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'false'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'false', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'any', 'raw': 'true'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'true', 'false-badge': 'neutral'})], 2: [({'choice': 'any', 'raw': 'true'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'true', 'false-badge': 'neutral'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'yes'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'})], 3: [({'choice': 'any', 'raw': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', 'false-badge': 'neutral'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'yes'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': '0'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': ''}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'false'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'false', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'})], 4: [({'choice': 'any', 'raw': 'yes'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'true'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'true', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'})], 5: [({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'false', 'raw': ''}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'yes'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': '0'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'false'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'false', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'})]}
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{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'any', 'invert': 'any', 'typed-operand': None}{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'any', 'invert': 'any', 'typed-operand': None}Passed
contract fixture 1{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'true', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}Failed
contract fixture 2{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'false', 'invert': 'true', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'false', 'invert': 'false', 'typed-operand': True}Failed
contract fixture 3{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'true', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}Failed
contract fixture 4{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'false', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}Failed
contract fixture 5{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'true', 'invert': 'false', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'true', 'invert': 'true', 'typed-operand': False}Failed
contract fixture 6{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'false', 'invert': 'false', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'false', 'invert': 'true', 'typed-operand': False}Failed
contract fixture 7{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'false', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}Failed
contract fixture 8{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'false', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}Failed
contract fixture 9{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'true', 'invert': 'any', 'typed-operand': None}{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'true', 'invert': 'any', 'typed-operand': None}Passed

SHA-256 / c8e5e00b669ff78462e0687d72675c447d03318dda78a1816bc6fd4efe857203

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    return {'active-false':(d['choice']!='any'), 'typed-operand':(None if d['choice']=='any' else d['choice']=='true'), 'choice-caption':({'any':'Any','true':'Yes','false':'No'}[d['choice']]), 'invert':({'any':'any','true':'false','false':'true'}[d['choice']]), 'hydrate':({'true':'true','false':'false'}.get(d['raw'],'any')), 'false-badge':('negative' if d['choice']=='false' else ('positive' if d['choice']=='true' else 'neutral'))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': 'yes'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': '0'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': ''}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'false'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'false', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'any', 'raw': 'true'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'true', 'false-badge': 'neutral'})], 2: [({'choice': 'any', 'raw': 'true'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'true', 'false-badge': 'neutral'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'yes'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'})], 3: [({'choice': 'any', 'raw': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', 'false-badge': 'neutral'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'yes'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': '0'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': ''}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'false'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'false', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'})], 4: [({'choice': 'any', 'raw': 'yes'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'true'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'true', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'})], 5: [({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'false', 'raw': ''}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': 'yes'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': '0'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', 'false-badge': 'positive'}), ({'choice': 'false', 'raw': 'true'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'true', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'false'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'false', 'false-badge': 'negative'}), ({'choice': 'false', 'raw': 'yes'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'})]}
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{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'any', 'invert': 'any', 'typed-operand': None}{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'any', 'invert': 'any', 'typed-operand': None}Passed
contract fixture 1{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}Passed
contract fixture 2{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'false', 'invert': 'false', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'false', 'invert': 'false', 'typed-operand': True}Passed
contract fixture 3{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}Passed
contract fixture 4{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 5{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'true', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'true', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 6{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'false', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'false', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 7{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 8{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}{'active-false': True, 'choice-caption': 'No', 'false-badge': 'negative', 'hydrate': 'any', 'invert': 'true', 'typed-operand': False}Passed
contract fixture 9{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'true', 'invert': 'any', 'typed-operand': None}{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'true', 'invert': 'any', 'typed-operand': None}Passed

SHA-256 / 69a0dab39639533d94ec83dc83c09c44ae34bbc3090e693688767c93ee14c5d4

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

Case digest / 6c8c4795d7f028f82db05b8b57689b257cf4d1e913584f72cb0bf04430b8048e