FAILURE MAP
← Case archive

FA-25076 / Filter interfaces / Open access

Serialized filter field identity includes its widget scope · case 01

Serialized filter field identity includes its widget scope is violated by the widget projection.

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

ROOT CAUSE

The scope-key decision uses `d['field']` instead of the stipulated url-ownership projection.

VERIFIED REPAIR

Implement the declared scope-key projection: `d['scope']+'.'+d['field']`.

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

Case contract

A filter widget owns query keys with the exact f. prefix; it must preserve route parameters and distinguish repeated values from comma-containing literals. This example checks: Serialized filter field identity includes its widget scope.

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 {'owned-prefix':([k for k in d['keys'] if k.startswith('f.')]), 'preserve-route':([k for k in d['keys'] if not k.startswith('f.')]), 'multi-serialize':([(d['field'],x) for x in d['values']]), 'literal-comma':(list(d['values'])), 'empty-scalar':([(d['field'],d['text'])] if d['present'] else []), 'scope-key':(d['field'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', 'x')], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', 'x')], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', 'x')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'})], 2: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'})], 3: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': '', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.status'})], 4: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.status'})], 5: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a,b', 'c'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'})]}
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{'empty-scalar': [], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'tag'}{'empty-scalar': [], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'left.tag'}Failed
contract fixture 1{'empty-scalar': [['tag', '']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'tag'}{'empty-scalar': [['tag', '']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Failed
contract fixture 2{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Failed
contract fixture 3{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Failed
contract fixture 4{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['tag', 'a,b'], ['tag', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['tag', 'a,b'], ['tag', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Failed
contract fixture 5{'empty-scalar': [['status', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'status'}{'empty-scalar': [['status', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}Failed
contract fixture 6{'empty-scalar': [['status', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['status', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'status'}{'empty-scalar': [['status', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['status', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}Failed
contract fixture 7{'empty-scalar': [['status', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['status', 'a,b'], ['status', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'status'}{'empty-scalar': [['status', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['status', 'a,b'], ['status', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}Failed
contract fixture 8{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right.tag'}Failed
contract fixture 9{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right.tag'}Failed

SHA-256 / 8754e122a433fbac51cb7e2d3f28bdcbd4c1e7f6518fddf2259176ec0b54a252

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    return {'owned-prefix':([k for k in d['keys'] if k.startswith('f.')]), 'preserve-route':([k for k in d['keys'] if not k.startswith('f.')]), 'multi-serialize':([(d['field'],x) for x in d['values']]), 'literal-comma':(list(d['values'])), 'empty-scalar':([(d['field'],d['text'])] if d['present'] else []), 'scope-key':(d['scope'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', 'x')], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', 'x')], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', 'x')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'})], 2: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'})], 3: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': '', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.status'})], 4: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.status'})], 5: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a,b', 'c'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'})]}
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{'empty-scalar': [], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'left'}{'empty-scalar': [], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'left.tag'}Failed
contract fixture 1{'empty-scalar': [['tag', '']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right'}{'empty-scalar': [['tag', '']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Failed
contract fixture 2{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right'}{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Failed
contract fixture 3{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right'}{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Failed
contract fixture 4{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['tag', 'a,b'], ['tag', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right'}{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['tag', 'a,b'], ['tag', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Failed
contract fixture 5{'empty-scalar': [['status', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right'}{'empty-scalar': [['status', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}Failed
contract fixture 6{'empty-scalar': [['status', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['status', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right'}{'empty-scalar': [['status', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['status', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}Failed
contract fixture 7{'empty-scalar': [['status', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['status', 'a,b'], ['status', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right'}{'empty-scalar': [['status', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['status', 'a,b'], ['status', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}Failed
contract fixture 8{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right'}{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right.tag'}Failed
contract fixture 9{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right'}{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right.tag'}Failed

SHA-256 / 21680b3bd53d70b6d23a0a5e6a845fe41ec35781f2953dc2d6f6bcf5ffea8420

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    return {'owned-prefix':([k for k in d['keys'] if k.startswith('f.')]), 'preserve-route':([k for k in d['keys'] if not k.startswith('f.')]), 'multi-serialize':([(d['field'],x) for x in d['values']]), 'literal-comma':(list(d['values'])), 'empty-scalar':([(d['field'],d['text'])] if d['present'] else []), 'scope-key':(d['scope']+'.'+d['field'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', 'x')], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', 'x')], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', 'x')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'})], 2: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'left.tag'})], 3: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': '', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'right.status'})], 4: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [], 'scope-key': 'left.status'})], 5: [({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': [], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [], 'scope-key': 'left.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'tag', 'values': ['a'], 'text': 'x', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', 'x')], 'scope-key': 'right.tag'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f.color', 'ref.x', 'foo', 'q'], 'field': 'status', 'values': ['a,b', 'c'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'tag', 'values': ['a,b', 'c'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('tag', 'a,b'), ('tag', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('tag', '')], 'scope-key': 'right.tag'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a')], 'literal-comma': ['a'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a,b', 'c'], 'text': '', 'present': True, 'scope': 'right'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], 'empty-scalar': [('status', '')], 'scope-key': 'right.status'})]}
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{'empty-scalar': [], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'left.tag'}{'empty-scalar': [], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'left.tag'}Passed
contract fixture 1{'empty-scalar': [['tag', '']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}{'empty-scalar': [['tag', '']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Passed
contract fixture 2{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Passed
contract fixture 3{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Passed
contract fixture 4{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['tag', 'a,b'], ['tag', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['tag', 'a,b'], ['tag', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'}Passed
contract fixture 5{'empty-scalar': [['status', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}{'empty-scalar': [['status', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}Passed
contract fixture 6{'empty-scalar': [['status', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['status', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}{'empty-scalar': [['status', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['status', 'a']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}Passed
contract fixture 7{'empty-scalar': [['status', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['status', 'a,b'], ['status', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}{'empty-scalar': [['status', 'x']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['status', 'a,b'], ['status', 'c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.status'}Passed
contract fixture 8{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right.tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right.tag'}Passed
contract fixture 9{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right.tag'}{'empty-scalar': [['tag', 'x']], 'literal-comma': ['a'], 'multi-serialize': [['tag', 'a']], 'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'scope-key': 'right.tag'}Passed

SHA-256 / 6cf7884ed4c2bf4c24ccd040aa6a2dd0d20a86d5addf85b87fb2bd0b83a84376

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

Case digest / d12eafb54cfe79bc1f0cd33c8bd2ebed5ba8c146b1935274a9b5b1d02d3c9438