broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['transfer']==x['ack']
    r1 = x['status']=='accepted'
    r2 = [t for t in x['source'] if t!=x['moving']] if x['status']=='accepted' and x['transfer']==x['ack'] and not x['already_committed'] else x['source']
    r3 = x['already_committed']
    r4 = x['status']=='failed' and not x['already_committed']
    r5 = False
    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: [({'transfer': 7, 'ack': 7, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 7, 'ack': 6, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 7, 'ack': 7, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 7, 'ack': 7, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 7, 'ack': 7, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 7, 'ack': 7, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])], 2: [({'transfer': 14, 'ack': 14, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 14, 'ack': 12, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 14, 'ack': 14, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 14, 'ack': 14, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 14, 'ack': 14, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 14, 'ack': 14, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])], 3: [({'transfer': 21, 'ack': 21, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 21, 'ack': 18, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 21, 'ack': 21, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 21, 'ack': 21, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 21, 'ack': 21, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 21, 'ack': 21, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])], 4: [({'transfer': 28, 'ack': 28, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 28, 'ack': 24, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 28, 'ack': 28, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 28, 'ack': 28, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 28, 'ack': 28, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 28, 'ack': 28, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])], 5: [({'transfer': 35, 'ack': 35, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 35, 'ack': 30, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 35, 'ack': 35, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 35, 'ack': 35, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 35, 'ack': 35, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 35, 'ack': 35, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])]}
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['transfer']==x['ack']
    r1 = x['status']=='accepted'
    r2 = [t for t in x['source'] if t!=x['moving']] if x['status']=='accepted' and x['transfer']==x['ack'] and not x['already_committed'] else x['source']
    r3 = x['already_committed']
    r4 = x['status']=='failed' and not x['already_committed']
    r5 = x['status']!='failed'
    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: [({'transfer': 7, 'ack': 7, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 7, 'ack': 6, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 7, 'ack': 7, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 7, 'ack': 7, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 7, 'ack': 7, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 7, 'ack': 7, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])], 2: [({'transfer': 14, 'ack': 14, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 14, 'ack': 12, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 14, 'ack': 14, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 14, 'ack': 14, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 14, 'ack': 14, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 14, 'ack': 14, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])], 3: [({'transfer': 21, 'ack': 21, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 21, 'ack': 18, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 21, 'ack': 21, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 21, 'ack': 21, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 21, 'ack': 21, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 21, 'ack': 21, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])], 4: [({'transfer': 28, 'ack': 28, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 28, 'ack': 24, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 28, 'ack': 28, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 28, 'ack': 28, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 28, 'ack': 28, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 28, 'ack': 28, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])], 5: [({'transfer': 35, 'ack': 35, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, True, ['a', 'c'], False, False, False]), ({'transfer': 35, 'ack': 30, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [False, True, ['a', 'b', 'c'], False, False, False]), ({'transfer': 35, 'ack': 35, 'status': 'failed', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, True, False]), ({'transfer': 35, 'ack': 35, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': True}, [True, True, ['a', 'b', 'c'], True, False, False]), ({'transfer': 35, 'ack': 35, 'status': 'accepted', 'source': ['a', 'b', 'c'], 'moving': 'a', 'destination': ['d'], 'already_committed': False}, [True, True, ['b', 'c'], False, False, False]), ({'transfer': 35, 'ack': 35, 'status': 'pending', 'source': ['a', 'b', 'c'], 'moving': 'b', 'destination': ['d'], 'already_committed': False}, [True, False, ['a', 'b', 'c'], False, False, True])]}
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)

prompt:
The tab workspace reports an incorrect pending transfer placeholder.

A tab tearoff retains the source until the destination acknowledges the exact transfer. Failure restores source placement; duplicate acknowledgements do not remove another tab.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['panes']
    r1 = {t:x['namespace']+':'+p for t,p in x['owners'].items()}
    r2 = x['namespace']+':'+x['selected']
    r3 = [[x['namespace']+':'+p for p in edge] for edge in x['edges']]
    r4 = x['tabs']
    r5 = list(x['owners'])
    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: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']])], 2: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']])], 3: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']])], 4: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']])], 5: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', '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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = [x['namespace'] for p in x['panes']]
    r1 = {t:x['namespace']+':'+p for t,p in x['owners'].items()}
    r2 = x['namespace']+':'+x['selected']
    r3 = [[x['namespace']+':'+p for p in edge] for edge in x['edges']]
    r4 = x['tabs']
    r5 = list(x['owners'])
    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: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']])], 2: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']])], 3: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']])], 4: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']])], 5: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', '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)

prompt:
The tab workspace reports an incorrect pane id namespace.

Importing a saved workspace namespaces pane IDs and rewrites tab ownership, selected-pane references and split edges consistently; tab/document IDs remain stable.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = [x['namespace']+':'+p for p in x['panes']]
    r1 = x['owners']
    r2 = x['namespace']+':'+x['selected']
    r3 = [[x['namespace']+':'+p for p in edge] for edge in x['edges']]
    r4 = x['tabs']
    r5 = list(x['owners'])
    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: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']])], 2: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']])], 3: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']])], 4: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']])], 5: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', '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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = [x['namespace']+':'+p for p in x['panes']]
    r1 = {x['namespace']+':'+t:p for t,p in x['owners'].items()}
    r2 = x['namespace']+':'+x['selected']
    r3 = [[x['namespace']+':'+p for p in edge] for edge in x['edges']]
    r4 = x['tabs']
    r5 = list(x['owners'])
    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: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']])], 2: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']])], 3: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']])], 4: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']])], 5: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', '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)

prompt:
The tab workspace reports an incorrect owner reference rewrite.

Importing a saved workspace namespaces pane IDs and rewrites tab ownership, selected-pane references and split edges consistently; tab/document IDs remain stable.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = [x['namespace']+':'+p for p in x['panes']]
    r1 = {t:x['namespace']+':'+p for t,p in x['owners'].items()}
    r2 = x['selected']
    r3 = [[x['namespace']+':'+p for p in edge] for edge in x['edges']]
    r4 = x['tabs']
    r5 = list(x['owners'])
    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: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']])], 2: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']])], 3: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']])], 4: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']])], 5: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', '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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = [x['namespace']+':'+p for p in x['panes']]
    r1 = {t:x['namespace']+':'+p for t,p in x['owners'].items()}
    r2 = x['namespace']+':'+x['panes'][0]
    r3 = [[x['namespace']+':'+p for p in edge] for edge in x['edges']]
    r4 = x['tabs']
    r5 = list(x['owners'])
    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: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']])], 2: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']])], 3: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']])], 4: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']])], 5: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', '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)

prompt:
The tab workspace reports an incorrect selected pane reference.

Importing a saved workspace namespaces pane IDs and rewrites tab ownership, selected-pane references and split edges consistently; tab/document IDs remain stable.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = [x['namespace']+':'+p for p in x['panes']]
    r1 = {t:x['namespace']+':'+p for t,p in x['owners'].items()}
    r2 = x['namespace']+':'+x['selected']
    r3 = x['edges']
    r4 = x['tabs']
    r5 = list(x['owners'])
    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: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']])], 2: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']])], 3: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']])], 4: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']])], 5: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', '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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = [x['namespace']+':'+p for p in x['panes']]
    r1 = {t:x['namespace']+':'+p for t,p in x['owners'].items()}
    r2 = x['namespace']+':'+x['selected']
    r3 = [[x['namespace']+':'+edge[0],edge[1]] for edge in x['edges']]
    r4 = x['tabs']
    r5 = list(x['owners'])
    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: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b'], ['a', 'b']])], 2: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0'], ['a', 'b']])], 3: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1'], ['a', 'b']])], 4: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2'], ['a', 'b']])], 5: [({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'copy', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['copy:p', 'copy:q'], {'a': 'copy:p', 'b': 'copy:q'}, 'copy:q', [['copy:p', 'copy:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'p', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:p', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q'], 'owners': {'a': 'q', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q'], {'a': 'import:q', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', 'b']]), ({'namespace': 'import', 'panes': ['p', 'q', 'r'], 'owners': {'a': 'p', 'b': 'q'}, 'selected': 'q', 'edges': [['p', 'q']], 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3']}, [['import:p', 'import:q', 'import:r'], {'a': 'import:p', 'b': 'import:q'}, 'import:q', [['import:p', 'import:q']], ['a', 'b', 'background0', 'background1', 'background2', 'background3'], ['a', '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)

prompt:
The tab workspace reports an incorrect split edge reference.

Importing a saved workspace namespaces pane IDs and rewrites tab ownership, selected-pane references and split edges consistently; tab/document IDs remain stable.

split: open-access