FAILURE MAP
← Case archive

FA-25801 / Filter interfaces / Open access

Group drops reject both self targets and descendant targets · case 01

Group drops reject both self targets and descendant targets is violated by the widget projection.

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

ROOT CAUSE

The cycle-block decision uses `d['target']==d['source']` instead of the stipulated group-reparent projection.

VERIFIED REPAIR

Implement the declared cycle-block projection: `d['target'] in d['descendants'] or d['target']==d['source']`.

Unsuccessful approach: The attempted correction `d['target'] in d['descendants']` 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: Group drops reject both self targets and descendant targets.

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']==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': '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': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], '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'], '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': 'child', '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': [], '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': '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': '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': ['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': ['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': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], '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'], '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': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': True}), ({'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': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, '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': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], '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', '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': False, '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': True, 'source-membership': True, 'source-removal': ['b']}Failed
contract fixture 1{'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 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': False, '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']}Failed
contract fixture 7{'cycle-block': False, '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']}Failed
contract fixture 8{'cycle-block': False, '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']}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 / d2ea0c1fd17a885fea228974a37f6cd3d45f1f7afce1911b4f6e9d740f6c3a9f

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']), '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': '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': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], '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'], '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': 'child', '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': [], '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': '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': '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': ['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': ['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': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], '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'], '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': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': True}), ({'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': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, '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': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], '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', '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': True, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 1{'cycle-block': False, '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']}Failed
contract fixture 2{'cycle-block': False, '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']}Failed
contract fixture 3{'cycle-block': False, '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']}Failed
contract fixture 4{'cycle-block': False, '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']}Failed
contract fixture 5{'cycle-block': False, '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']}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': 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 / 807269273522d6f72db3b2aa0c3c865b3fa5d9d164f9e5e30f56681d8161cd43

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': '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': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], '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'], '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': 'child', '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': [], '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': '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': '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': ['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': ['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': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], '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'], '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': 'and', 'negated': False}, {'cycle-block': True, 'source-membership': True, 'destination-duplicate': False, 'source-removal': ['b'], 'destination-insert': ['a', 'a'], 'flatten-safe': True}), ({'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': 'child', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': [], 'index': 1, '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': 's', 'source': 's', 'descendants': ['child'], 'criterion': 'a', 'source_rows': ['a', 'b'], 'target_rows': ['a'], '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', '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': True, 'source-membership': True, 'source-removal': ['b']}Passed
contract fixture 1{'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 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 / a9214b6c98a67d97e7a307e06a3ef7fc1ce0073c03fc574cda0510beeedf321b

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

Case digest / fc82478f33676d22f8469721f3516548a54a8df2e822f4bcfc3e2f08e5a7a19c