FA-24991 / Filter interfaces / Open access
The summary describes the configured conjunction · case 01
The summary describes the configured conjunction is violated by the widget projection.
ROOT CAUSE
The join-label decision uses `'all'` instead of the stipulated group-summary projection.
VERIFIED REPAIR
Implement the declared join-label projection: `'all' if d['mode']=='and' else 'any'`.
Unsuccessful approach: The attempted correction `'any'` still violates the explicit contract fixtures.
Case contract
Filter groups summarize direct children with explicit all/any combination and a negation badge, retaining empty-group state without inventing operands. This example checks: The summary describes the configured conjunction.
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 {'join-label':('all'), 'negation-label':('not ' if d['negated'] else ''), 'direct-count':(len(d['children'])), 'active-count':(sum(x['enabled'] for x in d['children'])), 'empty-summary':('empty' if not d['children'] else 'configured'), 'parentheses':(len(d['children'])>1 and d['mode']!=d['parent'])}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': []}, {'join-label': 'any', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False})], 2: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': []}, {'join-label': 'any', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': []}, {'join-label': 'any', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False})], 3: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False})], 4: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': []}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': []}, {'join-label': 'all', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': []}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': []}, {'join-label': 'all', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False})], 5: [({'mode': 'or', 'parent': 'and', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True})]}
for index, (data, expected) in enumerate(fixtures[N]):
check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| contract fixture 0 | {'active-count': 0, 'direct-count': 0, 'empty-summary': 'empty', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | {'active-count': 0, 'direct-count': 0, 'empty-summary': 'empty', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | Failed |
| contract fixture 1 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | Passed |
| contract fixture 2 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | Passed |
| contract fixture 3 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | Passed |
| contract fixture 4 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': True} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': True} | Passed |
| contract fixture 5 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | Passed |
| contract fixture 6 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': True} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': True} | Passed |
| contract fixture 7 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | Failed |
| contract fixture 8 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': True} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': True} | Failed |
| contract fixture 9 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': 'not ', 'parentheses': False} | Failed |
SHA-256 / 82654e3c114a77f47c780cef6e943e8e5527410847ade1a817ecb788a5ec77f9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'join-label':('any'), 'negation-label':('not ' if d['negated'] else ''), 'direct-count':(len(d['children'])), 'active-count':(sum(x['enabled'] for x in d['children'])), 'empty-summary':('empty' if not d['children'] else 'configured'), 'parentheses':(len(d['children'])>1 and d['mode']!=d['parent'])}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': []}, {'join-label': 'any', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False})], 2: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': []}, {'join-label': 'any', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': []}, {'join-label': 'any', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False})], 3: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False})], 4: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': []}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': []}, {'join-label': 'all', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': []}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': []}, {'join-label': 'all', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False})], 5: [({'mode': 'or', 'parent': 'and', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True})]}
for index, (data, expected) in enumerate(fixtures[N]):
check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| contract fixture 0 | {'active-count': 0, 'direct-count': 0, 'empty-summary': 'empty', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | {'active-count': 0, 'direct-count': 0, 'empty-summary': 'empty', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | Passed |
| contract fixture 1 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | Failed |
| contract fixture 2 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': 'not ', 'parentheses': False} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | Failed |
| contract fixture 3 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | Failed |
| contract fixture 4 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': True} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': True} | Failed |
| contract fixture 5 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': 'not ', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | Failed |
| contract fixture 6 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': 'not ', 'parentheses': True} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': True} | Failed |
| contract fixture 7 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | Passed |
| contract fixture 8 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': True} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': True} | Passed |
| contract fixture 9 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': 'not ', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': 'not ', 'parentheses': False} | Passed |
SHA-256 / 4b9d4601710552ed1de0f8d040cc7aeb9a09d4a3087a7931aacb2da41e978316
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
return {'join-label':('all' if d['mode']=='and' else 'any'), 'negation-label':('not ' if d['negated'] else ''), 'direct-count':(len(d['children'])), 'active-count':(sum(x['enabled'] for x in d['children'])), 'empty-summary':('empty' if not d['children'] else 'configured'), 'parentheses':(len(d['children'])>1 and d['mode']!=d['parent'])}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': []}, {'join-label': 'any', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False})], 2: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': []}, {'join-label': 'any', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': []}, {'join-label': 'any', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False})], 3: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False})], 4: [({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': []}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'or', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': []}, {'join-label': 'all', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': []}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': []}, {'join-label': 'all', 'negation-label': '', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 0, 'empty-summary': 'configured', 'parentheses': False})], 5: [({'mode': 'or', 'parent': 'and', 'negated': True, 'children': []}, {'join-label': 'any', 'negation-label': 'not ', 'direct-count': 0, 'active-count': 0, 'empty-summary': 'empty', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'and', 'negated': True, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'and', 'parent': 'or', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'all', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True}), ({'mode': 'and', 'parent': 'or', 'negated': True, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'all', 'negation-label': 'not ', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 3, 'enabled': True}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 1, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': False}), ({'mode': 'or', 'parent': 'and', 'negated': False, 'children': [{'leaves': 1, 'enabled': True}, {'leaves': 2, 'enabled': False}]}, {'join-label': 'any', 'negation-label': '', 'direct-count': 2, 'active-count': 1, 'empty-summary': 'configured', 'parentheses': True})]}
for index, (data, expected) in enumerate(fixtures[N]):
check("contract fixture " + str(index), solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| contract fixture 0 | {'active-count': 0, 'direct-count': 0, 'empty-summary': 'empty', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | {'active-count': 0, 'direct-count': 0, 'empty-summary': 'empty', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | Passed |
| contract fixture 1 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | Passed |
| contract fixture 2 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | Passed |
| contract fixture 3 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': False} | Passed |
| contract fixture 4 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': True} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': '', 'parentheses': True} | Passed |
| contract fixture 5 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': False} | Passed |
| contract fixture 6 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': True} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'all', 'negation-label': 'not ', 'parentheses': True} | Passed |
| contract fixture 7 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': False} | Passed |
| contract fixture 8 | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': True} | {'active-count': 1, 'direct-count': 2, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': '', 'parentheses': True} | Passed |
| contract fixture 9 | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': 'not ', 'parentheses': False} | {'active-count': 1, 'direct-count': 1, 'empty-summary': 'configured', 'join-label': 'any', 'negation-label': 'not ', 'parentheses': False} | Passed |
SHA-256 / 4f1f03af07a90cc0c5258e1c1c2394e94b4ea1a5385860f5c6b76d7a34b39968
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:02.576825+00:00.
Case digest / 4b8dabb941b2bca50d95f9350efafff6c8803b3316451721ec66a1ac970a8517