FAILURE MAP
← Case archive

FA-35481 / Tab interfaces / Open access

Cross pane move: viewport transfer · case 01

The tab workspace reports an incorrect viewport transfer.

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

ROOT CAUSE

The viewport transfer decision uses 0 instead of x['scroll'].

VERIFIED REPAIR

Use the stipulated workspace rule: x['scroll'].

Unsuccessful approach: The partial repair max(0,x['scroll']-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 = [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 = 0
    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 fixtureActualExpectedOutcome
workspace regression 0[['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 0, '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'}, 'db', 0, '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'}, 'db', 0, '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', 0, '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'}, 'db', 0, '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'}, 'db', 0, 'b'][['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 0, 'view': 'b'}, 'db', 0, 'b']Passed

SHA-256 / d86838fbe5c0942bc9d6f26b51e8bd32b18fe74139438a507a9669dbdf65daff

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 = x['doc']
    r4 = max(0,x['scroll']-1)
    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 fixtureActualExpectedOutcome
workspace regression 0[['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 28, 'view': 'b'}, 'db', 27, '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'}, 'db', 27, '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'}, 'db', 27, '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', 27, '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'}, 'db', 27, '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'}, 'db', 0, 'b'][['a', 'c'], ['d', 'b', 'e'], {'document': 'db', 'scroll': 0, 'view': 'b'}, 'db', 0, 'b']Passed

SHA-256 / 0ca724c502fc0c057a7aafe12e938e70c53736e146bf93eb2009334e2cf3d19f

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

Case digest / 7f3d6a91c4e02c6d8f15723c3fda49da8d582af4cf569b46139fdbf3b6b53131