FA-35461 / Tab interfaces / Open access
Cross pane move: source removal · case 01
The tab workspace reports an incorrect source removal.
ROOT CAUSE
The source removal decision uses x['source'] instead of [t for t in x['source'] if t!=x['moving']].
VERIFIED REPAIR
Use the stipulated workspace rule: [t for t in x['source'] if t!=x['moving']].
Unsuccessful approach: The partial repair x['source'][1:] 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 = x['source']
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', 'b', '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'] | Failed |
| workspace regression 1 | [['a', 'b', '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'] | Failed |
| workspace regression 2 | [['a', 'b', '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'] | Failed |
| workspace regression 3 | [['a', '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'] | Failed |
| workspace regression 4 | [['a', 'b', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | [['a', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 5 | [['a', 'b', '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'] | Failed |
SHA-256 / 27a916eb8f983b87d5dc042bae8ba8eee6ced8a2d86f03e668540054b0e3986d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = x['source'][1:]
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 | [['b', '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'] | Failed |
| workspace regression 1 | [['b', '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'] | Failed |
| workspace regression 2 | [['b', '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'] | Failed |
| 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 | [['b', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | [['a', 'c'], ['b'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 28, 'b'] | Failed |
| workspace regression 5 | [['b', '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'] | Failed |
SHA-256 / 987e8b833cc77e5973a566aef9e6fde6c70e942954fc1937b7bed2f7192786dc
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.862041+00:00.
Case digest / 7615d226798245c4404b9e23f25416e28af832bc285e7b570825ea2655994468