FAILURE MAP
← Case archive

FA-25826 / Filter interfaces / Open access

Flattening group wrappers requires matching operators and no negation · case 01

Flattening group wrappers requires matching operators and no negation is violated by the widget projection.

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

ROOT CAUSE

The flatten-safe decision uses `d['source_mode']==d['target_mode']` instead of the stipulated group-reparent projection.

VERIFIED REPAIR

Implement the declared flatten-safe projection: `d['source_mode']==d['target_mode'] and not d['negated']`.

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

Case contract

A filter-builder drag moves a criterion between explicit group identities, rejects descendant cycles, and retains operator grouping when flattening is unsafe. This example checks: Flattening group wrappers requires matching operators and no negation.

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 {'cycle-block':(d['target'] in d['descendants'] or d['target']==d['source']), 'source-membership':(d['criterion'] in d['source_rows']), 'destination-duplicate':(d['criterion'] in d['target_rows'] and d['target']!=d['source']), 'source-removal':([x for x in d['source_rows'] if x!=d['criterion']]), 'destination-insert':(d['target_rows'][:d['index']]+[d['criterion']]+d['target_rows'][d['index']:]), 'flatten-safe':(d['source_mode']==d['target_mode'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False})], 2: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False})], 3: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': True})], 4: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False})], 5: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': False, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False})]}
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{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': True, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Failed
contract fixture 1{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 2{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 3{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 4{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': True, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}Failed
contract fixture 5{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}Passed
contract fixture 6{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 7{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': True, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': True, 'source-membership': False, 'source-removal': ['b']}Passed
contract fixture 8{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': True, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}Failed
contract fixture 9{'cycle-block': False, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': False, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed

SHA-256 / e5e5c4d2acf4a1740b677d24ad70efe0d67bb75f820b78add6b254c16ef55e74

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    return {'cycle-block':(d['target'] in d['descendants'] or d['target']==d['source']), 'source-membership':(d['criterion'] in d['source_rows']), 'destination-duplicate':(d['criterion'] in d['target_rows'] and d['target']!=d['source']), 'source-removal':([x for x in d['source_rows'] if x!=d['criterion']]), 'destination-insert':(d['target_rows'][:d['index']]+[d['criterion']]+d['target_rows'][d['index']:]), 'flatten-safe':(not d['negated'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False})], 2: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False})], 3: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': True})], 4: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False})], 5: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': False, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False})]}
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{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 1{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': True, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Failed
contract fixture 2{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 3{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 4{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}Passed
contract fixture 5{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}Failed
contract fixture 6{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 7{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': True, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': True, 'source-membership': False, 'source-removal': ['b']}Passed
contract fixture 8{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}Passed
contract fixture 9{'cycle-block': False, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': True, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': False, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Failed

SHA-256 / d3936d975dc714c9093e494fca63f5cbe3cf215db44b50f0fc0665451e306d73

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    return {'cycle-block':(d['target'] in d['descendants'] or d['target']==d['source']), 'source-membership':(d['criterion'] in d['source_rows']), 'destination-duplicate':(d['criterion'] in d['target_rows'] and d['target']!=d['source']), 'source-removal':([x for x in d['source_rows'] if x!=d['criterion']]), 'destination-insert':(d['target_rows'][:d['index']]+[d['criterion']]+d['target_rows'][d['index']:]), 'flatten-safe':(d['source_mode']==d['target_mode'] and not d['negated'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False})], 2: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False})], 3: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': True})], 4: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False})], 5: [({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 0, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False}), ({'target': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': ['a'], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': True}, {'cycle-block': True, 'source-membership': False, 'destination-duplicate': True, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'and', 'negated': False}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': True}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['x', 'y'], 'index': 0, 'source_mode': 'and', 'target_mode': 'and', 'negated': True}, {'cycle-block': False, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'x', 'y'], 'flatten-safe': False}), ({'target': 'other', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['b'], 'target_rows': [], 'index': 1, 'source_mode': 'and', 'target_mode': 'or', 'negated': False}, {'cycle-block': False, 'source-membership': False, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a'], 'flatten-safe': False})]}
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{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 1{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 2{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 3{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': True, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 4{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}Passed
contract fixture 5{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['x', 'a', 'y'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}Passed
contract fixture 6{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 7{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': True, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': True, 'source-membership': False, 'source-removal': ['b']}Passed
contract fixture 8{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}{'cycle-block': True, 'destination-duplicate': True, 'destination-insert': ['a', 'a'], 'flatten-safe': False, 'source-membership': False, 'source-removal': ['b']}Passed
contract fixture 9{'cycle-block': False, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}{'cycle-block': False, 'destination-duplicate': False, 'destination-insert': ['a'], 'flatten-safe': False, 'source-membership': True, 'source-removal': ['b']}Passed

SHA-256 / ac3e58cb568eae9d9fe3e22ac60bd6dddacff07f60d8b8048e670825bf1d73d1

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

Case digest / 39f6807004ea7247c512fa9256ce7211c83ab306701eeac8c29f2635547f05b5