FAILURE MAP
← Case archive

FA-25521 / Filter interfaces / Open access

Hydration accepts explicit boolean strings and rejects unknown tokens · case 01

Hydration accepts explicit boolean strings and rejects unknown tokens is violated by the widget projection.

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

ROOT CAUSE

The hydrate decision uses `'true' if d['raw'] else 'any'` instead of the stipulated boolean-facet projection.

VERIFIED REPAIR

Implement the declared hydrate projection: `{'true':'true','false':'false'}.get(d['raw'],'any')`.

Unsuccessful approach: The attempted correction `'true' if d['raw']=='true' else 'false'` 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: Hydration accepts explicit boolean strings and rejects unknown tokens.

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':({'any':'any','true':'false','false':'true'}[d['choice']]), 'hydrate':('true' if d['raw'] else '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': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', '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': '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'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'})], 2: [({'choice': 'any', 'raw': 'yes'}, {'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': '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'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'})], 3: [({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'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': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', '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': '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': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'})], 5: [({'choice': 'true', 'raw': 'yes'}, {'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': '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': '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'}), ({'choice': 'false', 'raw': '0'}, {'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': 'true', 'invert': 'any', 'typed-operand': None}{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'false', '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': 'true', 'invert': 'false', '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': 'true', 'invert': 'false', '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': 'Yes', 'false-badge': 'positive', 'hydrate': 'true', 'invert': 'false', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}Failed
contract fixture 5{'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 6{'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 7{'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': 'false', 'invert': 'true', 'typed-operand': False}Failed
contract fixture 8{'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': 'any', 'invert': 'true', 'typed-operand': False}Failed
contract fixture 9{'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': 'any', 'invert': 'true', 'typed-operand': False}Failed

SHA-256 / a914d320586b47f6e7754076486e7b8ea973589475f9691bed28c3b47cf34712

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':({'any':'any','true':'false','false':'true'}[d['choice']]), 'hydrate':('true' if d['raw']=='true' else 'false'), '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': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', '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': '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'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'})], 2: [({'choice': 'any', 'raw': 'yes'}, {'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': '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'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'})], 3: [({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'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': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', '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': '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': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'})], 5: [({'choice': 'true', 'raw': 'yes'}, {'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': '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': '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'}), ({'choice': 'false', 'raw': '0'}, {'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': 'false', 'invert': 'any', 'typed-operand': None}{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'false', 'invert': 'any', 'typed-operand': None}Passed
contract fixture 1{'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': 'any', 'invert': 'false', 'typed-operand': True}Failed
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': 'false', 'invert': 'false', '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': 'Yes', 'false-badge': 'positive', 'hydrate': 'false', 'invert': 'false', 'typed-operand': True}{'active-false': True, 'choice-caption': 'Yes', 'false-badge': 'positive', 'hydrate': 'any', 'invert': 'false', 'typed-operand': True}Failed
contract fixture 5{'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': 'any', 'invert': 'true', 'typed-operand': False}Failed
contract fixture 6{'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 7{'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 8{'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': 'any', 'invert': 'true', 'typed-operand': False}Failed
contract fixture 9{'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': 'any', 'invert': 'true', 'typed-operand': False}Failed

SHA-256 / e816f84dfcad8dbd6dd2ae8b0326e011ff0d02e4576de0927f47565a3b0c7c60

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': 'false'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'false', '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': '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'}), ({'choice': 'false', 'raw': '0'}, {'active-false': True, 'typed-operand': False, 'choice-caption': 'No', 'invert': 'true', 'hydrate': 'any', 'false-badge': 'negative'})], 2: [({'choice': 'any', 'raw': 'yes'}, {'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': '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'}), ({'choice': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'})], 3: [({'choice': 'any', 'raw': '0'}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'choice': 'any', 'raw': ''}, {'active-false': False, 'typed-operand': None, 'choice-caption': 'Any', 'invert': 'any', 'hydrate': 'any', 'false-badge': 'neutral'}), ({'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': 'true', 'raw': 'false'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'false', 'false-badge': 'positive'}), ({'choice': 'true', 'raw': ''}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'any', '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': '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': 'true'}, {'active-false': True, 'typed-operand': True, 'choice-caption': 'Yes', 'invert': 'false', 'hydrate': 'true', 'false-badge': 'positive'})], 5: [({'choice': 'true', 'raw': 'yes'}, {'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': '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': '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'}), ({'choice': 'false', 'raw': '0'}, {'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': 'false', 'invert': 'any', 'typed-operand': None}{'active-false': False, 'choice-caption': 'Any', 'false-badge': 'neutral', 'hydrate': 'false', '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': '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 5{'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 6{'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 7{'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 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': 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

SHA-256 / 9460fbbd0a33b266fb5bca8ad099307d3619bbdae883c6c1931185f5a7e0ae72

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

Case digest / 06c07c0f14b5863dd72f8419b4f8bc5a160abe76848a3c2d15c1a7e0ffd14954