FA-35451 / Tab interfaces / Open access
Split view clone: unsaved document revision clone · case 01
The tab workspace reports an incorrect unsaved document revision clone.
ROOT CAUSE
The unsaved document revision clone decision uses x['disk_revision'] instead of x['buffer_revision'].
VERIFIED REPAIR
Use the stipulated workspace rule: x['buffer_revision'].
Unsuccessful approach: The partial repair max(0,x['buffer_revision']-1) still violates a workspace boundary or normal case.
Case contract
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.
Why this case matters
Offline tab/panel workspace behavior; no browser or desktop framework is emulated.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = x['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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| workspace regression 0 | ['w', 'd', [3, 8], 40, 7, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Failed |
| workspace regression 1 | ['w', 'd', [3, 8], 40, 7, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Failed |
| workspace regression 2 | ['w', 'd', [3, 8], 40, 7, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Failed |
| workspace regression 3 | ['w', 'd', [3, 8], 0, 7, 3] | ['w', 'd', [3, 8], 0, 9, 3] | Failed |
| workspace regression 4 | ['w', 'd', [0, 0], 40, 7, 3] | ['w', 'd', [0, 0], 40, 9, 3] | Failed |
| workspace regression 5 | ['w', 'd', [3, 8], 40, 7, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Failed |
| workspace regression 6 | ['w', 'd', [3, 8], 40, 7, 3] | ['w', 'd', [3, 8], 40, 7, 3] | Passed |
| workspace regression 7 | ['w', 'd', [3, 8], 40, 7, 2] | ['w', 'd', [3, 8], 40, 9, 2] | Failed |
SHA-256 / d7d7191bd69c955479e0b46c3375b5a7c6e6fe140662bbbd877debdc47aaf98a
2 / The unsuccessful fix
Exit 1"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| workspace regression 0 | ['w', 'd', [3, 8], 40, 8, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Failed |
| workspace regression 1 | ['w', 'd', [3, 8], 40, 8, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Failed |
| workspace regression 2 | ['w', 'd', [3, 8], 40, 8, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Failed |
| workspace regression 3 | ['w', 'd', [3, 8], 0, 8, 3] | ['w', 'd', [3, 8], 0, 9, 3] | Failed |
| workspace regression 4 | ['w', 'd', [0, 0], 40, 8, 3] | ['w', 'd', [0, 0], 40, 9, 3] | Failed |
| workspace regression 5 | ['w', 'd', [3, 8], 40, 8, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Failed |
| workspace regression 6 | ['w', 'd', [3, 8], 40, 6, 3] | ['w', 'd', [3, 8], 40, 7, 3] | Failed |
| workspace regression 7 | ['w', 'd', [3, 8], 40, 8, 2] | ['w', 'd', [3, 8], 40, 9, 2] | Failed |
SHA-256 / 2b3422c569053349302395c748decf9e62243894197cef8844aed4d9ac152149
3 / The verified repair
Exit 0"""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']+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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| workspace regression 0 | ['w', 'd', [3, 8], 40, 9, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Passed |
| workspace regression 1 | ['w', 'd', [3, 8], 40, 9, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Passed |
| workspace regression 2 | ['w', 'd', [3, 8], 40, 9, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Passed |
| workspace regression 3 | ['w', 'd', [3, 8], 0, 9, 3] | ['w', 'd', [3, 8], 0, 9, 3] | Passed |
| workspace regression 4 | ['w', 'd', [0, 0], 40, 9, 3] | ['w', 'd', [0, 0], 40, 9, 3] | Passed |
| workspace regression 5 | ['w', 'd', [3, 8], 40, 9, 3] | ['w', 'd', [3, 8], 40, 9, 3] | Passed |
| workspace regression 6 | ['w', 'd', [3, 8], 40, 7, 3] | ['w', 'd', [3, 8], 40, 7, 3] | Passed |
| workspace regression 7 | ['w', 'd', [3, 8], 40, 9, 2] | ['w', 'd', [3, 8], 40, 9, 2] | Passed |
SHA-256 / a8e253a0cc064498f06e7e1e58a2b9396ca6e19f77e1a4c24826ee14895df775
Verification & scope
Finite stipulated workspace snapshots only. Independent result fields describe observable obligations, not a full UI runtime. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:42:41.713836+00:00.
Case digest / 620b7f2804c25957f934af48f064a86817af9c20f08a65b3ff80bf540ff0fafd