FA-35476 / Tab interfaces / Open access
Cross pane move: document binding · case 01
The tab workspace reports an incorrect document binding.
ROOT CAUSE
The document binding decision uses x['moving'] instead of x['doc'].
VERIFIED REPAIR
Use the stipulated workspace rule: x['doc'].
Unsuccessful approach: The partial repair None still violates a workspace boundary or normal case.
Case contract
Moving a tab removes its source view and inserts it exactly once in the target pane at a clamped slot, preserving document and view state.
Why this case matters
Offline tab/panel workspace behavior; no browser or desktop framework is emulated.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = [t for t in x['source'] if t!=x['moving']]
r1 = x['target'][:min(x['slot'],len(x['target']))]+[x['moving']]+x['target'][min(x['slot'],len(x['target'])):]
r2 = {'view':x['moving'],'document':x['doc'],'scroll':x['scroll']}
r3 = x['moving']
r4 = x['scroll']
r5 = x['moving']
return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 28}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 28}, 'db', 28, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 2: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 56}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 56}, 'db', 56, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 3: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 84}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 84}, 'db', 84, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 4: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 112}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 112}, 'db', 112, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 5: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 140}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 140}, 'db', 140, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
check("workspace regression "+str(i), solve(inputs), 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 |
|---|---|---|---|
| workspace regression 0 | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'b', 28, 'b'] | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 1 | [['a', 'c'], ['b', 'd', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'b', 28, 'b'] | [['a', 'c'], ['b', 'd', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 2 | [['a', 'c'], ['d', 'e', 'b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'b', 28, 'b'] | [['a', 'c'], ['d', 'e', 'b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 3 | [['b', 'c'], ['d', 'a', 'e'], {'document': 'db', 'scroll': 28, 'view': 'a'}, 'a', 28, 'a'] | [['b', 'c'], ['d', 'a', 'e'], {'document': 'db', 'scroll': 28, 'view': 'a'}, 'db', 28, 'a'] | Failed |
| workspace regression 4 | [['a', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'b', 28, 'b'] | [['a', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 5 | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 0, 'view': 'b'}, 'b', 0, 'b'] | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 0, 'view': 'b'}, 'db', 0, 'b'] | Failed |
SHA-256 / 9c614ee0c6a9c005e57eae9789d4f2f11213023219bfa5ed705b103a423f61a4
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = [t for t in x['source'] if t!=x['moving']]
r1 = x['target'][:min(x['slot'],len(x['target']))]+[x['moving']]+x['target'][min(x['slot'],len(x['target'])):]
r2 = {'view':x['moving'],'document':x['doc'],'scroll':x['scroll']}
r3 = None
r4 = x['scroll']
r5 = x['moving']
return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 28}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 28}, 'db', 28, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 2: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 56}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 56}, 'db', 56, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 3: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 84}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 84}, 'db', 84, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 4: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 112}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 112}, 'db', 112, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 5: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 140}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 140}, 'db', 140, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
check("workspace regression "+str(i), solve(inputs), 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 |
|---|---|---|---|
| workspace regression 0 | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, None, 28, 'b'] | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 1 | [['a', 'c'], ['b', 'd', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, None, 28, 'b'] | [['a', 'c'], ['b', 'd', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 2 | [['a', 'c'], ['d', 'e', 'b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, None, 28, 'b'] | [['a', 'c'], ['d', 'e', 'b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 3 | [['b', 'c'], ['d', 'a', 'e'], {'document': 'db', 'scroll': 28, 'view': 'a'}, None, 28, 'a'] | [['b', 'c'], ['d', 'a', 'e'], {'document': 'db', 'scroll': 28, 'view': 'a'}, 'db', 28, 'a'] | Failed |
| workspace regression 4 | [['a', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, None, 28, 'b'] | [['a', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 5 | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 0, 'view': 'b'}, None, 0, 'b'] | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 0, 'view': 'b'}, 'db', 0, 'b'] | Failed |
SHA-256 / dd1926c6a3503cef636b1ebeb94062e644e09f28242ab12460c1df73ae4d1d21
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = [t for t in x['source'] if t!=x['moving']]
r1 = x['target'][:min(x['slot'],len(x['target']))]+[x['moving']]+x['target'][min(x['slot'],len(x['target'])):]
r2 = {'view':x['moving'],'document':x['doc'],'scroll':x['scroll']}
r3 = x['doc']
r4 = x['scroll']
r5 = x['moving']
return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 28}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 28}, 'db', 28, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 28}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 28}, 'db', 28, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 2: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 56}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 56}, 'db', 56, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 56}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 56}, 'db', 56, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 3: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 84}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 84}, 'db', 84, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 84}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 84}, 'db', 84, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 4: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 112}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 112}, 'db', 112, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 112}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 112}, 'db', 112, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])], 5: [({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 0, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['b', 'd', 'e'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 5, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['d', 'e', 'b'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'a', 'slot': 1, 'doc': 'db', 'scroll': 140}, [['b', 'c'], ['d', 'a', 'e'], {'view': 'a', 'document': 'db', 'scroll': 140}, 'db', 140, 'a']), ({'source': ['a', 'b', 'c'], 'target': [], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 140}, [['a', 'c'], ['b'], {'view': 'b', 'document': 'db', 'scroll': 140}, 'db', 140, 'b']), ({'source': ['a', 'b', 'c'], 'target': ['d', 'e'], 'moving': 'b', 'slot': 1, 'doc': 'db', 'scroll': 0}, [['a', 'c'], ['d', 'b', 'e'], {'view': 'b', 'document': 'db', 'scroll': 0}, 'db', 0, 'b'])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
check("workspace regression "+str(i), solve(inputs), 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 |
|---|---|---|---|
| workspace regression 0 | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Passed |
| workspace regression 1 | [['a', 'c'], ['b', 'd', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | [['a', 'c'], ['b', 'd', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Passed |
| workspace regression 2 | [['a', 'c'], ['d', 'e', 'b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | [['a', 'c'], ['d', 'e', 'b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Passed |
| workspace regression 3 | [['b', 'c'], ['d', 'a', 'e'], {'document': 'db', 'scroll': 28, 'view': 'a'}, 'db', 28, 'a'] | [['b', 'c'], ['d', 'a', 'e'], {'document': 'db', 'scroll': 28, 'view': 'a'}, 'db', 28, 'a'] | Passed |
| workspace regression 4 | [['a', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | [['a', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Passed |
| workspace regression 5 | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 0, 'view': 'b'}, 'db', 0, 'b'] | [['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 0, 'view': 'b'}, 'db', 0, 'b'] | Passed |
SHA-256 / 51b2215e588db949913a824d320373a288a25365f426087bc3fe508bece55db4
Verification & scope
Finite stipulated workspace snapshots only. Independent result fields describe observable obligations, not a full UI runtime. 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:42:41.985470+00:00.
Case digest / 01f21a88e6cf506cba55b73a2e441abb8013f45cff4b009c12148ff769eff16c