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

N = 1
observations = []
def solve(x):
    r0 = [x['right'],x['right_rev']] if x['swapped'] else [x['left'],x['left_rev']]
    r1 = [x['left'],x['left_rev']] if x['swapped'] else [x['right'],x['right_rev']]
    r2 = x['left']+' → '+x['right']
    r3 = [x['left'],x['left_rev'],x['right'],x['right_rev']]
    r4 = x['right_editable'] and not x['swapped']
    r5 = x['left']==x['right'] and x['left_rev']==x['right_rev']
    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: [({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': True}, [['b', 4], ['a', 2], 'b \u2192 a', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': False, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['a', 4], 'a \u2192 a', ['a', 2, 'a', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 2, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 2], 'a \u2192 b', ['a', 4, 'b', 2], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 4], 'a \u2192 b', ['a', 0, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 4], 'a \u2192 b', ['a', 4, 'b', 4], True, False])], 2: [({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': True}, [['b', 8], ['a', 4], 'b \u2192 a', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': False, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['a', 8], 'a \u2192 a', ['a', 4, 'a', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 4], 'a \u2192 b', ['a', 8, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 8], 'a \u2192 b', ['a', 0, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 8], 'a \u2192 b', ['a', 8, 'b', 8], True, False])], 3: [({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': True}, [['b', 12], ['a', 6], 'b \u2192 a', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': False, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['a', 12], 'a \u2192 a', ['a', 6, 'a', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 6, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 6], 'a \u2192 b', ['a', 12, 'b', 6], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 12], 'a \u2192 b', ['a', 0, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 12], 'a \u2192 b', ['a', 12, 'b', 12], True, False])], 4: [({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': True}, [['b', 16], ['a', 8], 'b \u2192 a', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': False, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['a', 16], 'a \u2192 a', ['a', 8, 'a', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 8], 'a \u2192 b', ['a', 16, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 16], 'a \u2192 b', ['a', 0, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 16], 'a \u2192 b', ['a', 16, 'b', 16], True, False])], 5: [({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': True}, [['b', 20], ['a', 10], 'b \u2192 a', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': False, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['a', 20], 'a \u2192 a', ['a', 10, 'a', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 10, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 10], 'a \u2192 b', ['a', 20, 'b', 10], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 20], 'a \u2192 b', ['a', 0, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 20], 'a \u2192 b', ['a', 20, 'b', 20], True, False])]}
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['right'],x['right_rev']] if x['swapped'] else [x['left'],x['left_rev']]
    r1 = [x['left'],x['left_rev']] if x['swapped'] else [x['right'],x['right_rev']]
    r2 = x['right']+' → '+x['left']
    r3 = [x['left'],x['left_rev'],x['right'],x['right_rev']]
    r4 = x['right_editable'] and not x['swapped']
    r5 = x['left']==x['right'] and x['left_rev']==x['right_rev']
    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: [({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': True}, [['b', 4], ['a', 2], 'b \u2192 a', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': False, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['a', 4], 'a \u2192 a', ['a', 2, 'a', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 2, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 2], 'a \u2192 b', ['a', 4, 'b', 2], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 4], 'a \u2192 b', ['a', 0, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 4], 'a \u2192 b', ['a', 4, 'b', 4], True, False])], 2: [({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': True}, [['b', 8], ['a', 4], 'b \u2192 a', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': False, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['a', 8], 'a \u2192 a', ['a', 4, 'a', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 4], 'a \u2192 b', ['a', 8, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 8], 'a \u2192 b', ['a', 0, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 8], 'a \u2192 b', ['a', 8, 'b', 8], True, False])], 3: [({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': True}, [['b', 12], ['a', 6], 'b \u2192 a', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': False, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['a', 12], 'a \u2192 a', ['a', 6, 'a', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 6, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 6], 'a \u2192 b', ['a', 12, 'b', 6], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 12], 'a \u2192 b', ['a', 0, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 12], 'a \u2192 b', ['a', 12, 'b', 12], True, False])], 4: [({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': True}, [['b', 16], ['a', 8], 'b \u2192 a', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': False, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['a', 16], 'a \u2192 a', ['a', 8, 'a', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 8], 'a \u2192 b', ['a', 16, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 16], 'a \u2192 b', ['a', 0, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 16], 'a \u2192 b', ['a', 16, 'b', 16], True, False])], 5: [({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': True}, [['b', 20], ['a', 10], 'b \u2192 a', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': False, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['a', 20], 'a \u2192 a', ['a', 10, 'a', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 10, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 10], 'a \u2192 b', ['a', 20, 'b', 10], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 20], 'a \u2192 b', ['a', 0, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 20], 'a \u2192 b', ['a', 20, 'b', 20], True, False])]}
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 direction label.

A comparison tab binds ordered left/right document revisions, labels the direction, permits edits only on editable right side and handles same-document different-revision comparisons.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = [x['right'],x['right_rev']] if x['swapped'] else [x['left'],x['left_rev']]
    r1 = [x['left'],x['left_rev']] if x['swapped'] else [x['right'],x['right_rev']]
    r2 = (x['right']+' → '+x['left']) if x['swapped'] else (x['left']+' → '+x['right'])
    r3 = [x['left'],x['right']]
    r4 = x['right_editable'] and not x['swapped']
    r5 = x['left']==x['right'] and x['left_rev']==x['right_rev']
    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: [({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': True}, [['b', 4], ['a', 2], 'b \u2192 a', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': False, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['a', 4], 'a \u2192 a', ['a', 2, 'a', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 2, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 2], 'a \u2192 b', ['a', 4, 'b', 2], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 4], 'a \u2192 b', ['a', 0, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 4], 'a \u2192 b', ['a', 4, 'b', 4], True, False])], 2: [({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': True}, [['b', 8], ['a', 4], 'b \u2192 a', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': False, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['a', 8], 'a \u2192 a', ['a', 4, 'a', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 4], 'a \u2192 b', ['a', 8, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 8], 'a \u2192 b', ['a', 0, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 8], 'a \u2192 b', ['a', 8, 'b', 8], True, False])], 3: [({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': True}, [['b', 12], ['a', 6], 'b \u2192 a', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': False, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['a', 12], 'a \u2192 a', ['a', 6, 'a', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 6, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 6], 'a \u2192 b', ['a', 12, 'b', 6], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 12], 'a \u2192 b', ['a', 0, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 12], 'a \u2192 b', ['a', 12, 'b', 12], True, False])], 4: [({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': True}, [['b', 16], ['a', 8], 'b \u2192 a', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': False, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['a', 16], 'a \u2192 a', ['a', 8, 'a', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 8], 'a \u2192 b', ['a', 16, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 16], 'a \u2192 b', ['a', 0, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 16], 'a \u2192 b', ['a', 16, 'b', 16], True, False])], 5: [({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': True}, [['b', 20], ['a', 10], 'b \u2192 a', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': False, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['a', 20], 'a \u2192 a', ['a', 10, 'a', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 10, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 10], 'a \u2192 b', ['a', 20, 'b', 10], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 20], 'a \u2192 b', ['a', 0, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 20], 'a \u2192 b', ['a', 20, 'b', 20], True, False])]}
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['right'],x['right_rev']] if x['swapped'] else [x['left'],x['left_rev']]
    r1 = [x['left'],x['left_rev']] if x['swapped'] else [x['right'],x['right_rev']]
    r2 = (x['right']+' → '+x['left']) if x['swapped'] else (x['left']+' → '+x['right'])
    r3 = sorted([x['left'],x['right']])
    r4 = x['right_editable'] and not x['swapped']
    r5 = x['left']==x['right'] and x['left_rev']==x['right_rev']
    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: [({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': True}, [['b', 4], ['a', 2], 'b \u2192 a', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': False, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['a', 4], 'a \u2192 a', ['a', 2, 'a', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 2, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 2], 'a \u2192 b', ['a', 4, 'b', 2], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 4], 'a \u2192 b', ['a', 0, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 4], 'a \u2192 b', ['a', 4, 'b', 4], True, False])], 2: [({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': True}, [['b', 8], ['a', 4], 'b \u2192 a', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': False, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['a', 8], 'a \u2192 a', ['a', 4, 'a', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 4], 'a \u2192 b', ['a', 8, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 8], 'a \u2192 b', ['a', 0, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 8], 'a \u2192 b', ['a', 8, 'b', 8], True, False])], 3: [({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': True}, [['b', 12], ['a', 6], 'b \u2192 a', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': False, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['a', 12], 'a \u2192 a', ['a', 6, 'a', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 6, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 6], 'a \u2192 b', ['a', 12, 'b', 6], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 12], 'a \u2192 b', ['a', 0, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 12], 'a \u2192 b', ['a', 12, 'b', 12], True, False])], 4: [({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': True}, [['b', 16], ['a', 8], 'b \u2192 a', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': False, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['a', 16], 'a \u2192 a', ['a', 8, 'a', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 8], 'a \u2192 b', ['a', 16, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 16], 'a \u2192 b', ['a', 0, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 16], 'a \u2192 b', ['a', 16, 'b', 16], True, False])], 5: [({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': True}, [['b', 20], ['a', 10], 'b \u2192 a', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': False, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['a', 20], 'a \u2192 a', ['a', 10, 'a', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 10, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 10], 'a \u2192 b', ['a', 20, 'b', 10], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 20], 'a \u2192 b', ['a', 0, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 20], 'a \u2192 b', ['a', 20, 'b', 20], True, False])]}
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 revision sensitive identity.

A comparison tab binds ordered left/right document revisions, labels the direction, permits edits only on editable right side and handles same-document different-revision comparisons.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = [x['right'],x['right_rev']] if x['swapped'] else [x['left'],x['left_rev']]
    r1 = [x['left'],x['left_rev']] if x['swapped'] else [x['right'],x['right_rev']]
    r2 = (x['right']+' → '+x['left']) if x['swapped'] else (x['left']+' → '+x['right'])
    r3 = [x['left'],x['left_rev'],x['right'],x['right_rev']]
    r4 = x['right_editable']
    r5 = x['left']==x['right'] and x['left_rev']==x['right_rev']
    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: [({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': True}, [['b', 4], ['a', 2], 'b \u2192 a', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': False, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['a', 4], 'a \u2192 a', ['a', 2, 'a', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 2, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 2], 'a \u2192 b', ['a', 4, 'b', 2], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 4], 'a \u2192 b', ['a', 0, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 4], 'a \u2192 b', ['a', 4, 'b', 4], True, False])], 2: [({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': True}, [['b', 8], ['a', 4], 'b \u2192 a', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': False, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['a', 8], 'a \u2192 a', ['a', 4, 'a', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 4], 'a \u2192 b', ['a', 8, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 8], 'a \u2192 b', ['a', 0, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 8], 'a \u2192 b', ['a', 8, 'b', 8], True, False])], 3: [({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': True}, [['b', 12], ['a', 6], 'b \u2192 a', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': False, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['a', 12], 'a \u2192 a', ['a', 6, 'a', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 6, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 6], 'a \u2192 b', ['a', 12, 'b', 6], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 12], 'a \u2192 b', ['a', 0, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 12], 'a \u2192 b', ['a', 12, 'b', 12], True, False])], 4: [({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': True}, [['b', 16], ['a', 8], 'b \u2192 a', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': False, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['a', 16], 'a \u2192 a', ['a', 8, 'a', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 8], 'a \u2192 b', ['a', 16, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 16], 'a \u2192 b', ['a', 0, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 16], 'a \u2192 b', ['a', 16, 'b', 16], True, False])], 5: [({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': True}, [['b', 20], ['a', 10], 'b \u2192 a', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': False, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['a', 20], 'a \u2192 a', ['a', 10, 'a', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 10, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 10], 'a \u2192 b', ['a', 20, 'b', 10], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 20], 'a \u2192 b', ['a', 0, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 20], 'a \u2192 b', ['a', 20, 'b', 20], True, False])]}
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['right'],x['right_rev']] if x['swapped'] else [x['left'],x['left_rev']]
    r1 = [x['left'],x['left_rev']] if x['swapped'] else [x['right'],x['right_rev']]
    r2 = (x['right']+' → '+x['left']) if x['swapped'] else (x['left']+' → '+x['right'])
    r3 = [x['left'],x['left_rev'],x['right'],x['right_rev']]
    r4 = not x['swapped']
    r5 = x['left']==x['right'] and x['left_rev']==x['right_rev']
    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: [({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': True}, [['b', 4], ['a', 2], 'b \u2192 a', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': False, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['a', 4], 'a \u2192 a', ['a', 2, 'a', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 2, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 2], 'a \u2192 b', ['a', 4, 'b', 2], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 4], 'a \u2192 b', ['a', 0, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 4], 'a \u2192 b', ['a', 4, 'b', 4], True, False])], 2: [({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': True}, [['b', 8], ['a', 4], 'b \u2192 a', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': False, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['a', 8], 'a \u2192 a', ['a', 4, 'a', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 4], 'a \u2192 b', ['a', 8, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 8], 'a \u2192 b', ['a', 0, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 8], 'a \u2192 b', ['a', 8, 'b', 8], True, False])], 3: [({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': True}, [['b', 12], ['a', 6], 'b \u2192 a', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': False, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['a', 12], 'a \u2192 a', ['a', 6, 'a', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 6, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 6], 'a \u2192 b', ['a', 12, 'b', 6], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 12], 'a \u2192 b', ['a', 0, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 12], 'a \u2192 b', ['a', 12, 'b', 12], True, False])], 4: [({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': True}, [['b', 16], ['a', 8], 'b \u2192 a', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': False, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['a', 16], 'a \u2192 a', ['a', 8, 'a', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 8], 'a \u2192 b', ['a', 16, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 16], 'a \u2192 b', ['a', 0, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 16], 'a \u2192 b', ['a', 16, 'b', 16], True, False])], 5: [({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': True}, [['b', 20], ['a', 10], 'b \u2192 a', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': False, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['a', 20], 'a \u2192 a', ['a', 10, 'a', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 10, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 10], 'a \u2192 b', ['a', 20, 'b', 10], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 20], 'a \u2192 b', ['a', 0, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 20], 'a \u2192 b', ['a', 20, 'b', 20], True, False])]}
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 right edit affordance.

A comparison tab binds ordered left/right document revisions, labels the direction, permits edits only on editable right side and handles same-document different-revision comparisons.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = [x['right'],x['right_rev']] if x['swapped'] else [x['left'],x['left_rev']]
    r1 = [x['left'],x['left_rev']] if x['swapped'] else [x['right'],x['right_rev']]
    r2 = (x['right']+' → '+x['left']) if x['swapped'] else (x['left']+' → '+x['right'])
    r3 = [x['left'],x['left_rev'],x['right'],x['right_rev']]
    r4 = x['right_editable'] and not x['swapped']
    r5 = x['left']==x['right']
    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: [({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': True}, [['b', 4], ['a', 2], 'b \u2192 a', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': False, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['a', 4], 'a \u2192 a', ['a', 2, 'a', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 2, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 2], 'a \u2192 b', ['a', 4, 'b', 2], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 4], 'a \u2192 b', ['a', 0, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 4], 'a \u2192 b', ['a', 4, 'b', 4], True, False])], 2: [({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': True}, [['b', 8], ['a', 4], 'b \u2192 a', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': False, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['a', 8], 'a \u2192 a', ['a', 4, 'a', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 4], 'a \u2192 b', ['a', 8, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 8], 'a \u2192 b', ['a', 0, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 8], 'a \u2192 b', ['a', 8, 'b', 8], True, False])], 3: [({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': True}, [['b', 12], ['a', 6], 'b \u2192 a', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': False, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['a', 12], 'a \u2192 a', ['a', 6, 'a', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 6, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 6], 'a \u2192 b', ['a', 12, 'b', 6], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 12], 'a \u2192 b', ['a', 0, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 12], 'a \u2192 b', ['a', 12, 'b', 12], True, False])], 4: [({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': True}, [['b', 16], ['a', 8], 'b \u2192 a', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': False, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['a', 16], 'a \u2192 a', ['a', 8, 'a', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 8], 'a \u2192 b', ['a', 16, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 16], 'a \u2192 b', ['a', 0, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 16], 'a \u2192 b', ['a', 16, 'b', 16], True, False])], 5: [({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': True}, [['b', 20], ['a', 10], 'b \u2192 a', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': False, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['a', 20], 'a \u2192 a', ['a', 10, 'a', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 10, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 10], 'a \u2192 b', ['a', 20, 'b', 10], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 20], 'a \u2192 b', ['a', 0, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 20], 'a \u2192 b', ['a', 20, 'b', 20], True, False])]}
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['right'],x['right_rev']] if x['swapped'] else [x['left'],x['left_rev']]
    r1 = [x['left'],x['left_rev']] if x['swapped'] else [x['right'],x['right_rev']]
    r2 = (x['right']+' → '+x['left']) if x['swapped'] else (x['left']+' → '+x['right'])
    r3 = [x['left'],x['left_rev'],x['right'],x['right_rev']]
    r4 = x['right_editable'] and not x['swapped']
    r5 = x['left_rev']==x['right_rev']
    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: [({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': True}, [['b', 4], ['a', 2], 'b \u2192 a', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 2, 'right_rev': 4, 'right_editable': False, 'swapped': False}, [['a', 2], ['b', 4], 'a \u2192 b', ['a', 2, 'b', 4], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 2, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 2], ['a', 4], 'a \u2192 a', ['a', 2, 'a', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 2, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 2], 'a \u2192 b', ['a', 4, 'b', 2], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 4], 'a \u2192 b', ['a', 0, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 4], 'a \u2192 b', ['a', 4, 'b', 4], True, False])], 2: [({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': True}, [['b', 8], ['a', 4], 'b \u2192 a', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 4, 'right_rev': 8, 'right_editable': False, 'swapped': False}, [['a', 4], ['b', 8], 'a \u2192 b', ['a', 4, 'b', 8], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 4, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 4], ['a', 8], 'a \u2192 a', ['a', 4, 'a', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 4, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 4], 'a \u2192 b', ['a', 8, 'b', 4], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 8], 'a \u2192 b', ['a', 0, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 8], 'a \u2192 b', ['a', 8, 'b', 8], True, False])], 3: [({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': True}, [['b', 12], ['a', 6], 'b \u2192 a', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 6, 'right_rev': 12, 'right_editable': False, 'swapped': False}, [['a', 6], ['b', 12], 'a \u2192 b', ['a', 6, 'b', 12], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 6, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 6], ['a', 12], 'a \u2192 a', ['a', 6, 'a', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 6, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 6], 'a \u2192 b', ['a', 12, 'b', 6], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 12], 'a \u2192 b', ['a', 0, 'b', 12], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 12, 'right_rev': 12, 'right_editable': True, 'swapped': False}, [['a', 12], ['b', 12], 'a \u2192 b', ['a', 12, 'b', 12], True, False])], 4: [({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': True}, [['b', 16], ['a', 8], 'b \u2192 a', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 8, 'right_rev': 16, 'right_editable': False, 'swapped': False}, [['a', 8], ['b', 16], 'a \u2192 b', ['a', 8, 'b', 16], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 8, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 8], ['a', 16], 'a \u2192 a', ['a', 8, 'a', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 8, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 8], 'a \u2192 b', ['a', 16, 'b', 8], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 16], 'a \u2192 b', ['a', 0, 'b', 16], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 16, 'right_rev': 16, 'right_editable': True, 'swapped': False}, [['a', 16], ['b', 16], 'a \u2192 b', ['a', 16, 'b', 16], True, False])], 5: [({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': True}, [['b', 20], ['a', 10], 'b \u2192 a', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'b', 'left_rev': 10, 'right_rev': 20, 'right_editable': False, 'swapped': False}, [['a', 10], ['b', 20], 'a \u2192 b', ['a', 10, 'b', 20], False, False]), ({'left': 'a', 'right': 'a', 'left_rev': 10, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 10], ['a', 20], 'a \u2192 a', ['a', 10, 'a', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 10, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 10], 'a \u2192 b', ['a', 20, 'b', 10], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 0, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 0], ['b', 20], 'a \u2192 b', ['a', 0, 'b', 20], True, False]), ({'left': 'a', 'right': 'b', 'left_rev': 20, 'right_rev': 20, 'right_editable': True, 'swapped': False}, [['a', 20], ['b', 20], 'a \u2192 b', ['a', 20, 'b', 20], True, False])]}
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 identical version shortcut.

A comparison tab binds ordered left/right document revisions, labels the direction, permits edits only on editable right side and handles same-document different-revision comparisons.

split: open-access


prompt:
The tab workspace reports an incorrect maximized visible pane.

Maximizing a pane temporarily hides peers without changing split tree weights. Restoring returns saved divider positions, panel scroll positions and active pane.

split: open-access


prompt:
The tab workspace reports an incorrect split weights preservation.

Maximizing a pane temporarily hides peers without changing split tree weights. Restoring returns saved divider positions, panel scroll positions and active pane.

split: open-access


prompt:
The tab workspace reports an incorrect peer mount retention.

Maximizing a pane temporarily hides peers without changing split tree weights. Restoring returns saved divider positions, panel scroll positions and active pane.

split: open-access


prompt:
The tab workspace reports an incorrect peer hidden sets.

Maximizing a pane temporarily hides peers without changing split tree weights. Restoring returns saved divider positions, panel scroll positions and active pane.

split: open-access


prompt:
The tab workspace reports an incorrect per pane scroll retention.

Maximizing a pane temporarily hides peers without changing split tree weights. Restoring returns saved divider positions, panel scroll positions and active pane.

split: open-access


prompt:
The tab workspace reports an incorrect restore active pane.

Maximizing a pane temporarily hides peers without changing split tree weights. Restoring returns saved divider positions, panel scroll positions and active pane.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = not x['zen']
    r1 = x['panel_height']+(x['strip_height'] if x['zen'] and x['hide_tabs'] and x['prior_visible'] else 0)
    r2 = x['tabs']
    r3 = x['selected']
    r4 = x['prior_visible']
    r5 = x['zen'] and x['hide_tabs'] and x['hover'] and x['prior_visible']
    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: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 532, ['a', 'b'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [True, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [True, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 500, ['a', 'b'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'b', 'tabs': ['a', 'b'], 'hover': False}, [False, 532, ['a', 'b'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': True}, [False, 532, ['a', 'b'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': True}, [True, 500, ['a', 'b'], 'a', True, False])], 2: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1064, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1000, ['a', 'b', 'background0'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'b', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1064, ['a', 'b', 'background0'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': True}, [False, 1064, ['a', 'b', 'background0'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': True}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False])], 3: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1500, ['a', 'b', 'background0', 'background1'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': True}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': True}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False])], 4: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': True}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': True}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False])], 5: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': True}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': True}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False])]}
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['prior_visible'] and not x['hide_tabs']
    r1 = x['panel_height']+(x['strip_height'] if x['zen'] and x['hide_tabs'] and x['prior_visible'] else 0)
    r2 = x['tabs']
    r3 = x['selected']
    r4 = x['prior_visible']
    r5 = x['zen'] and x['hide_tabs'] and x['hover'] and x['prior_visible']
    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: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 532, ['a', 'b'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [True, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [True, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 500, ['a', 'b'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'b', 'tabs': ['a', 'b'], 'hover': False}, [False, 532, ['a', 'b'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': True}, [False, 532, ['a', 'b'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': True}, [True, 500, ['a', 'b'], 'a', True, False])], 2: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1064, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1000, ['a', 'b', 'background0'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'b', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1064, ['a', 'b', 'background0'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': True}, [False, 1064, ['a', 'b', 'background0'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': True}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False])], 3: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1500, ['a', 'b', 'background0', 'background1'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': True}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': True}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False])], 4: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': True}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': True}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False])], 5: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': True}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': True}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False])]}
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 zen strip visibility.

Zen mode may hide tab strips without closing views. Exiting restores prior strip visibility, preserves selected documents and reclaims only the configured strip height.

split: open-access