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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = x['memory']
    r2 = x['locator']
    r3 = x['discarded'] and x['active'] and not x['loading']
    r4 = x['scroll']
    r5 = x['discarded'] and not x['loading']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = 0
    r2 = x['locator']
    r3 = x['discarded'] and x['active'] and not x['loading']
    r4 = x['scroll']
    r5 = x['discarded'] and not x['loading']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The tab workspace reports an incorrect resident memory after discard.

Discarding a clean inactive tab releases renderer memory but retains its tab entry and document locator. Activating a discarded tab revives it once and restores saved scroll.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = 0 if x['discarded'] else x['memory']
    r2 = None if x['discarded'] else x['locator']
    r3 = x['discarded'] and x['active'] and not x['loading']
    r4 = x['scroll']
    r5 = x['discarded'] and not x['loading']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = 0 if x['discarded'] else x['memory']
    r2 = None
    r3 = x['discarded'] and x['active'] and not x['loading']
    r4 = x['scroll']
    r5 = x['discarded'] and not x['loading']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The tab workspace reports an incorrect discard locator retention.

Discarding a clean inactive tab releases renderer memory but retains its tab entry and document locator. Activating a discarded tab revives it once and restores saved scroll.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = 0 if x['discarded'] else x['memory']
    r2 = x['locator']
    r3 = x['discarded'] and x['active']
    r4 = x['scroll']
    r5 = x['discarded'] and not x['loading']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = 0 if x['discarded'] else x['memory']
    r2 = x['locator']
    r3 = x['active']
    r4 = x['scroll']
    r5 = x['discarded'] and not x['loading']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The tab workspace reports an incorrect activation revival request.

Discarding a clean inactive tab releases renderer memory but retains its tab entry and document locator. Activating a discarded tab revives it once and restores saved scroll.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = 0 if x['discarded'] else x['memory']
    r2 = x['locator']
    r3 = x['discarded'] and x['active'] and not x['loading']
    r4 = 0
    r5 = x['discarded'] and not x['loading']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = 0 if x['discarded'] else x['memory']
    r2 = x['locator']
    r3 = x['discarded'] and x['active'] and not x['loading']
    r4 = x['scroll']//2
    r5 = x['discarded'] and not x['loading']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The tab workspace reports an incorrect revived scroll offset.

Discarding a clean inactive tab releases renderer memory but retains its tab entry and document locator. Activating a discarded tab revives it once and restores saved scroll.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = 0 if x['discarded'] else x['memory']
    r2 = x['locator']
    r3 = x['discarded'] and x['active'] and not x['loading']
    r4 = x['scroll']
    r5 = x['discarded']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(x):
    r0 = not x['active'] and not x['dirty']
    r1 = 0 if x['discarded'] else x['memory']
    r2 = x['locator']
    r3 = x['discarded'] and x['active'] and not x['loading']
    r4 = x['scroll']
    r5 = not x['loading']
    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: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 240, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 240, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [True, 80, 'file:d', False, 240, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 80, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 240, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 80, 'scroll': 240, 'locator': 'file:d', 'loading': False}, [False, 80, 'file:d', False, 240, False])], 2: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 480, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 480, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [True, 160, 'file:d', False, 480, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 160, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 480, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 160, 'scroll': 480, 'locator': 'file:d', 'loading': False}, [False, 160, 'file:d', False, 480, False])], 3: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 720, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 720, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [True, 240, 'file:d', False, 720, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 240, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 720, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 240, 'scroll': 720, 'locator': 'file:d', 'loading': False}, [False, 240, 'file:d', False, 720, False])], 4: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 960, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 960, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [True, 320, 'file:d', False, 960, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 320, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 960, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 320, 'scroll': 960, 'locator': 'file:d', 'loading': False}, [False, 320, 'file:d', False, 960, False])], 5: [({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', True, 1200, True]), ({'discarded': True, 'active': False, 'dirty': True, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 0, 'file:d', False, 1200, True]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [True, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [True, 400, 'file:d', False, 1200, False]), ({'discarded': True, 'active': False, 'dirty': False, 'memory': 400, 'scroll': 0, 'locator': 'file:d', 'loading': False}, [True, 0, 'file:d', False, 0, True]), ({'discarded': True, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': True}, [False, 0, 'file:d', False, 1200, False]), ({'discarded': False, 'active': True, 'dirty': False, 'memory': 400, 'scroll': 1200, 'locator': 'file:d', 'loading': False}, [False, 400, 'file:d', False, 1200, False])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The tab workspace reports an incorrect discarded placeholder.

Discarding a clean inactive tab releases renderer memory but retains its tab entry and document locator. Activating a discarded tab revives it once and restores saved scroll.

split: open-access


prompt:
The tab workspace reports an incorrect forward branch truncation.

A document tab maintains location history independent of sibling views. Navigating after Back truncates its forward branch, caps history and restores exact cursor offsets.

split: open-access


prompt:
The tab workspace reports an incorrect new location append.

A document tab maintains location history independent of sibling views. Navigating after Back truncates its forward branch, caps history and restores exact cursor offsets.

split: open-access


prompt:
The tab workspace reports an incorrect history cap oldest eviction.

A document tab maintains location history independent of sibling views. Navigating after Back truncates its forward branch, caps history and restores exact cursor offsets.

split: open-access


prompt:
The tab workspace reports an incorrect back position clamp.

A document tab maintains location history independent of sibling views. Navigating after Back truncates its forward branch, caps history and restores exact cursor offsets.

split: open-access


prompt:
The tab workspace reports an incorrect back cursor restoration.

A document tab maintains location history independent of sibling views. Navigating after Back truncates its forward branch, caps history and restores exact cursor offsets.

split: open-access


prompt:
The tab workspace reports an incorrect sibling history isolation.

A document tab maintains location history independent of sibling views. Navigating after Back truncates its forward branch, caps history and restores exact cursor offsets.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = True
    r1 = [t for t in x['locked'] if t!=x['target']] if x['target'] in x['locked'] else x['locked']+[x['target']]
    r2 = x['target']
    r3 = x['view'] in x['locked']
    r4 = x['duplicate']
    r5 = [t for t in x['locked'] if t!=x['duplicate']]
    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: [({'locked': ['a', 'c'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c'], 'a', True, 'd', ['a', 'c']]), ({'locked': ['a', 'c'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'b'], 'b', True, 'd', ['a', 'c']]), ({'locked': [], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a'], 'a', False, 'd', []]), ({'locked': ['a', 'c'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c'], 'a', True, 'd', ['a', 'c']]), ({'locked': ['a', 'c'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c'], 'a', False, 'd', ['a', 'c']]), ({'locked': ['a', 'c'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c'], 'a', True, 'd', ['a', 'c']])], 2: [({'locked': ['a', 'c', 'extra0'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0'], 'a', True, 'd', ['a', 'c', 'extra0']]), ({'locked': ['a', 'c', 'extra0'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'extra0', 'b'], 'b', True, 'd', ['a', 'c', 'extra0']]), ({'locked': ['extra0'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['extra0', 'a'], 'a', False, 'd', ['extra0']]), ({'locked': ['a', 'c', 'extra0'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0'], 'a', True, 'd', ['a', 'c', 'extra0']]), ({'locked': ['a', 'c', 'extra0'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c', 'extra0'], 'a', False, 'd', ['a', 'c', 'extra0']]), ({'locked': ['a', 'c', 'extra0'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0'], 'a', True, 'd', ['a', 'c', 'extra0']])], 3: [({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1']]), ({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'extra0', 'extra1', 'b'], 'b', True, 'd', ['a', 'c', 'extra0', 'extra1']]), ({'locked': ['extra0', 'extra1'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['extra0', 'extra1', 'a'], 'a', False, 'd', ['extra0', 'extra1']]), ({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1']]), ({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1'], 'a', False, 'd', ['a', 'c', 'extra0', 'extra1']]), ({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1']])], 4: [({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'extra0', 'extra1', 'extra2', 'b'], 'b', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']]), ({'locked': ['extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['extra0', 'extra1', 'extra2', 'a'], 'a', False, 'd', ['extra0', 'extra1', 'extra2']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2'], 'a', False, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']])], 5: [({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2', 'extra3'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3', 'b'], 'b', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['extra0', 'extra1', 'extra2', 'extra3', 'a'], 'a', False, 'd', ['extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2', 'extra3'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2', 'extra3'], 'a', False, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2', 'extra3'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']])]}
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['target'] not in x['dirty']
    r1 = [t for t in x['locked'] if t!=x['target']] if x['target'] in x['locked'] else x['locked']+[x['target']]
    r2 = x['target']
    r3 = x['view'] in x['locked']
    r4 = x['duplicate']
    r5 = [t for t in x['locked'] if t!=x['duplicate']]
    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: [({'locked': ['a', 'c'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c'], 'a', True, 'd', ['a', 'c']]), ({'locked': ['a', 'c'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'b'], 'b', True, 'd', ['a', 'c']]), ({'locked': [], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a'], 'a', False, 'd', []]), ({'locked': ['a', 'c'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c'], 'a', True, 'd', ['a', 'c']]), ({'locked': ['a', 'c'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c'], 'a', False, 'd', ['a', 'c']]), ({'locked': ['a', 'c'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c'], 'a', True, 'd', ['a', 'c']])], 2: [({'locked': ['a', 'c', 'extra0'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0'], 'a', True, 'd', ['a', 'c', 'extra0']]), ({'locked': ['a', 'c', 'extra0'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'extra0', 'b'], 'b', True, 'd', ['a', 'c', 'extra0']]), ({'locked': ['extra0'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['extra0', 'a'], 'a', False, 'd', ['extra0']]), ({'locked': ['a', 'c', 'extra0'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0'], 'a', True, 'd', ['a', 'c', 'extra0']]), ({'locked': ['a', 'c', 'extra0'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c', 'extra0'], 'a', False, 'd', ['a', 'c', 'extra0']]), ({'locked': ['a', 'c', 'extra0'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0'], 'a', True, 'd', ['a', 'c', 'extra0']])], 3: [({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1']]), ({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'extra0', 'extra1', 'b'], 'b', True, 'd', ['a', 'c', 'extra0', 'extra1']]), ({'locked': ['extra0', 'extra1'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['extra0', 'extra1', 'a'], 'a', False, 'd', ['extra0', 'extra1']]), ({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1']]), ({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1'], 'a', False, 'd', ['a', 'c', 'extra0', 'extra1']]), ({'locked': ['a', 'c', 'extra0', 'extra1'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1']])], 4: [({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'extra0', 'extra1', 'extra2', 'b'], 'b', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']]), ({'locked': ['extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['extra0', 'extra1', 'extra2', 'a'], 'a', False, 'd', ['extra0', 'extra1', 'extra2']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2'], 'a', False, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2']])], 5: [({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2', 'extra3'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'b', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3', 'b'], 'b', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [True, ['extra0', 'extra1', 'extra2', 'extra3', 'a'], 'a', False, 'd', ['extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'b', 'dirty': [], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2', 'extra3'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'b', 'dirty': ['a'], 'view': 'b', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2', 'extra3'], 'a', False, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']]), ({'locked': ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'target': 'a', 'selected': 'a', 'dirty': ['a'], 'view': 'a', 'duplicate': 'd'}, [False, ['c', 'extra0', 'extra1', 'extra2', 'extra3'], 'a', True, 'd', ['a', 'c', 'extra0', 'extra1', 'extra2', 'extra3']])]}
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 replacement lock veto.

Locked tabs forbid replacement and close commands but permit selection, scrolling and explicit duplication. Lock badges and command predicates are attached to view identity.

split: open-access