FA-25061 / Filter interfaces / Open access
Repeated selected values serialize as repeated query pairs · case 01
Repeated selected values serialize as repeated query pairs is violated by the widget projection.
ROOT CAUSE
The multi-serialize decision uses `[(d['field'],','.join(d['values']))]` instead of the stipulated url-ownership projection.
THE FAILURE
The multi-serialize decision uses `[(d['field'],','.join(d['values']))]` instead of the stipulated url-ownership projection.
Unsuccessful approach: The attempted correction `[(d['field'],d['values'][0])] if d['values'] else []` 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: Repeated selected values serialize as repeated query pairs.
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'],','.join(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': ['a,b', 'c'], 'text': '', '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', '')], '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': ['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': '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': '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'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'})], 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': 'status', 'values': ['a,b', 'c'], 'text': '', '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.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': '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.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', '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'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], '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': '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.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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| contract fixture 0 | {'empty-scalar': [], 'literal-comma': [], 'multi-serialize': [['tag', '']], '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'} | Failed |
| contract fixture 1 | {'empty-scalar': [['tag', '']], 'literal-comma': ['a,b', 'c'], 'multi-serialize': [['tag', 'a,b,c']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'} | {'empty-scalar': [['tag', '']], '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 2 | {'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [['tag', '']], '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'} | 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.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,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'} | Failed |
| contract fixture 5 | {'empty-scalar': [['status', 'x']], 'literal-comma': [], 'multi-serialize': [['status', '']], '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'} | 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.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,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'} | Failed |
| contract fixture 8 | {'empty-scalar': [['tag', 'x']], 'literal-comma': [], 'multi-serialize': [['tag', '']], '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'} | 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.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 / 58bf9355cd1daff623b1c5741d16820b41ffad87c8f661f102dbca046bfd9acb
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'],d['values'][0])] if d['values'] else []), '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': ['a,b', 'c'], 'text': '', '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', '')], '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': ['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': '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': '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'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': [], 'text': 'x', 'present': True, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [], 'literal-comma': [], 'empty-scalar': [('status', 'x')], 'scope-key': 'left.status'})], 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': 'status', 'values': ['a,b', 'c'], 'text': '', '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.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': '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.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', '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'}), ({'keys': ['f', 'f.x', 'xf.y'], 'field': 'status', 'values': ['a,b', 'c'], 'text': 'x', 'present': False, 'scope': 'left'}, {'owned-prefix': ['f.x'], 'preserve-route': ['f', 'xf.y'], 'multi-serialize': [('status', 'a,b'), ('status', 'c')], 'literal-comma': ['a,b', 'c'], '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': '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.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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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': ['a,b', 'c'], 'multi-serialize': [['tag', 'a,b']], 'owned-prefix': ['f.color'], 'preserve-route': ['ref.x', 'foo', 'q'], 'scope-key': 'right.tag'} | {'empty-scalar': [['tag', '']], '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 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']], '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'} | 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.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']], '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'} | Failed |
| 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 / 1ae1431a4d8889dac110c4a044b964eb2a46a85f5a9493dade741ddd6dd9b2bc
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 10 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.228481+00:00.
Case digest / 8a21e453303ff37580c91e04001a7308ba3007f2ea578681f1221ba3b99fac6e