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

N = 1
observations = []
def solve(x):
    r0 = x['new_view']
    r1 = x['new_view']
    r2 = x['caret']
    r3 = x['scroll']
    r4 = x['buffer_revision']
    r5 = x['view_refs']+1
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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['new_view']
    r1 = x['view']
    r2 = x['caret']
    r3 = x['scroll']
    r4 = x['buffer_revision']
    r5 = x['view_refs']+1
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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 shared document.

Cloning a document into an adjacent pane creates a new view identity, shares the current unsaved document revision, copies caret and scroll, and acquires exactly one document view reference.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = x['new_view']
    r1 = x['doc']
    r2 = [0,0]
    r3 = x['scroll']
    r4 = x['buffer_revision']
    r5 = x['view_refs']+1
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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['new_view']
    r1 = x['doc']
    r2 = [x['caret'][0],0]
    r3 = x['scroll']
    r4 = x['buffer_revision']
    r5 = x['view_refs']+1
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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 caret copy.

Cloning a document into an adjacent pane creates a new view identity, shares the current unsaved document revision, copies caret and scroll, and acquires exactly one document view reference.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = x['new_view']
    r1 = x['doc']
    r2 = x['caret']
    r3 = 0
    r4 = x['buffer_revision']
    r5 = x['view_refs']+1
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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['new_view']
    r1 = x['doc']
    r2 = x['caret']
    r3 = x['scroll']//2
    r4 = x['buffer_revision']
    r5 = x['view_refs']+1
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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 scroll copy.

Cloning a document into an adjacent pane creates a new view identity, shares the current unsaved document revision, copies caret and scroll, and acquires exactly one document view reference.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = x['new_view']
    r1 = x['doc']
    r2 = x['caret']
    r3 = x['scroll']
    r4 = x['disk_revision']
    r5 = x['view_refs']+1
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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['new_view']
    r1 = x['doc']
    r2 = x['caret']
    r3 = x['scroll']
    r4 = max(0,x['buffer_revision']-1)
    r5 = x['view_refs']+1
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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 unsaved document revision clone.

Cloning a document into an adjacent pane creates a new view identity, shares the current unsaved document revision, copies caret and scroll, and acquires exactly one document view reference.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = x['new_view']
    r1 = x['doc']
    r2 = x['caret']
    r3 = x['scroll']
    r4 = x['buffer_revision']
    r5 = x['view_refs']
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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['new_view']
    r1 = x['doc']
    r2 = x['caret']
    r3 = x['scroll']
    r4 = x['buffer_revision']
    r5 = x['view_refs']+2
    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: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 60, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 20, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 0, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [0, 0], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 501, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 9, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 7, 'disk_revision': 7, 'view_refs': 2}, ['w', 'd', [3, 8], 40, 7, 3]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 40, 'width': 300, 'gutter': 10, 'ratio': 40, 'buffer_revision': 9, 'disk_revision': 7, 'view_refs': 1}, ['w', 'd', [3, 8], 40, 9, 2])], 2: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 60, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 40, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 0, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [0, 0], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 1002, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 18, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 14, 'disk_revision': 14, 'view_refs': 4}, ['w', 'd', [3, 8], 80, 14, 5]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 80, 'width': 600, 'gutter': 20, 'ratio': 40, 'buffer_revision': 18, 'disk_revision': 14, 'view_refs': 2}, ['w', 'd', [3, 8], 80, 18, 3])], 3: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 60, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 60, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 0, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [0, 0], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 1503, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 27, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 21, 'disk_revision': 21, 'view_refs': 6}, ['w', 'd', [3, 8], 120, 21, 7]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 120, 'width': 900, 'gutter': 30, 'ratio': 40, 'buffer_revision': 27, 'disk_revision': 21, 'view_refs': 3}, ['w', 'd', [3, 8], 120, 27, 4])], 4: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 60, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 80, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 0, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [0, 0], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 2004, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 36, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 28, 'disk_revision': 28, 'view_refs': 8}, ['w', 'd', [3, 8], 160, 28, 9]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 160, 'width': 1200, 'gutter': 40, 'ratio': 40, 'buffer_revision': 36, 'disk_revision': 28, 'view_refs': 4}, ['w', 'd', [3, 8], 160, 36, 5])], 5: [({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 60, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 100, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 0, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 0, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [0, 0], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [0, 0], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 2505, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 45, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 35, 'disk_revision': 35, 'view_refs': 10}, ['w', 'd', [3, 8], 200, 35, 11]), ({'view': 'v', 'doc': 'd', 'new_view': 'w', 'caret': [3, 8], 'scroll': 200, 'width': 1500, 'gutter': 50, 'ratio': 40, 'buffer_revision': 45, 'disk_revision': 35, 'view_refs': 5}, ['w', 'd', [3, 8], 200, 45, 6])]}
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 document view reference acquisition.

Cloning a document into an adjacent pane creates a new view identity, shares the current unsaved document revision, copies caret and scroll, and acquires exactly one document view reference.

split: open-access


prompt:
The tab workspace reports an incorrect source removal.

Moving a tab removes its source view and inserts it exactly once in the target pane at a clamped slot, preserving document and view state.

split: open-access


prompt:
The tab workspace reports an incorrect target insertion.

Moving a tab removes its source view and inserts it exactly once in the target pane at a clamped slot, preserving document and view state.

split: open-access


prompt:
The tab workspace reports an incorrect transfer state capsule.

Moving a tab removes its source view and inserts it exactly once in the target pane at a clamped slot, preserving document and view state.

split: open-access


prompt:
The tab workspace reports an incorrect document binding.

Moving a tab removes its source view and inserts it exactly once in the target pane at a clamped slot, preserving document and view state.

split: open-access


prompt:
The tab workspace reports an incorrect viewport transfer.

Moving a tab removes its source view and inserts it exactly once in the target pane at a clamped slot, preserving document and view state.

split: open-access


prompt:
The tab workspace reports an incorrect target selection.

Moving a tab removes its source view and inserts it exactly once in the target pane at a clamped slot, preserving document and view state.

split: open-access