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

N = 1
observations = []
def solve(x):
    r0 = [j for j in x['jobs'] if j[0] in x['visible'] and j[1]=='render']
    r1 = [j for j in x['jobs'] if j[0] in x['mounted'] and j[0] not in x['visible'] and j[1]=='render']
    r2 = [j for j in x['jobs'] if j[0] in x['mounted'] and j[1]=='index']
    r3 = [j for j in x['jobs'] if j[0] in x['closed']]
    r4 = x['mounted']
    r5 = [j for j in x['jobs'] if j[0] in x['mounted'] and (j[1]=='index' or j[0] in x['visible'])]
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['b'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a', 'b'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a'], 'mounted': ['a', 'b', 'c'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': [], 'mounted': ['a', 'b'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render']], 'visible': ['a'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index']], [], ['b'], [['a', 'index']]])], 2: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index']]])], 3: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index']]])], 4: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1', 'extra2'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]])], 5: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]])]}
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 = [j for j in x['jobs'] if j[0] in x['visible'] and j[1]=='render']
    r1 = [j for j in x['jobs'] if j[0] in x['mounted'] and j[0] not in x['visible'] and j[1]=='render']
    r2 = [j for j in x['jobs'] if j[0] in x['mounted'] and j[1]=='index']
    r3 = [j for j in x['jobs'] if j[0] in x['closed']]
    r4 = x['visible']
    r5 = [j for j in x['jobs'] if j[0] in x['mounted'] and (j[1]=='index' or j[0] in x['visible'])]
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['b'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a', 'b'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a'], 'mounted': ['a', 'b', 'c'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': [], 'mounted': ['a', 'b'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render']], 'visible': ['a'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index']], [], ['b'], [['a', 'index']]])], 2: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index']]])], 3: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index']]])], 4: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1', 'extra2'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]])], 5: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]])]}
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 resumable job ownership.

Tab panel jobs are classified into visible rendering, background-safe work and paused work. Hidden panes pause render-only jobs but retain explicit background-safe tasks.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = [j for j in x['jobs'] if j[0] in x['visible'] and j[1]=='render']
    r1 = [j for j in x['jobs'] if j[0] in x['mounted'] and j[0] not in x['visible'] and j[1]=='render']
    r2 = [j for j in x['jobs'] if j[0] in x['mounted'] and j[1]=='index']
    r3 = [j for j in x['jobs'] if j[0] in x['closed']]
    r4 = sorted(set(j[0] for j in x['jobs'] if j[0] in x['mounted'] and j[0] not in x['visible'] and j[1]=='render'))
    r5 = [j for j in x['jobs'] if j[0] in x['visible']]
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['b'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a', 'b'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a'], 'mounted': ['a', 'b', 'c'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': [], 'mounted': ['a', 'b'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render']], 'visible': ['a'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index']], [], ['b'], [['a', 'index']]])], 2: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index']]])], 3: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index']]])], 4: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1', 'extra2'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]])], 5: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]])]}
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 = [j for j in x['jobs'] if j[0] in x['visible'] and j[1]=='render']
    r1 = [j for j in x['jobs'] if j[0] in x['mounted'] and j[0] not in x['visible'] and j[1]=='render']
    r2 = [j for j in x['jobs'] if j[0] in x['mounted'] and j[1]=='index']
    r3 = [j for j in x['jobs'] if j[0] in x['closed']]
    r4 = sorted(set(j[0] for j in x['jobs'] if j[0] in x['mounted'] and j[0] not in x['visible'] and j[1]=='render'))
    r5 = x['jobs']
    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: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['b'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a', 'b'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': ['a'], 'mounted': ['a', 'b', 'c'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render']], 'visible': [], 'mounted': ['a', 'b'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render']], 'visible': ['a'], 'mounted': ['a', 'b'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index']], [], ['b'], [['a', 'index']]])], 2: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index']]])], 3: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index']]])], 4: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1', 'extra2'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index']]])], 5: [({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['a', 'render']], [['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['b'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['b', 'render']], [['a', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['a'], [['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a', 'b'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[['a', 'render'], ['b', 'render']], [], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], [], [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'c', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': []}, [[['a', 'render']], [['b', 'render'], ['c', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [], ['b', 'c'], [['a', 'render'], ['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'render'], ['a', 'index'], ['b', 'render'], ['b', 'index'], ['c', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': [], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[], [['a', 'render'], ['b', 'render']], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [['c', 'render']], ['a', 'b'], [['a', 'index'], ['b', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]]), ({'jobs': [['a', 'index'], ['b', 'render'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], 'visible': ['a'], 'mounted': ['a', 'b', 'extra0', 'extra1', 'extra2', 'extra3'], 'closed': ['c']}, [[], [['b', 'render']], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']], [], ['b'], [['a', 'index'], ['extra0', 'index'], ['extra1', 'index'], ['extra2', 'index'], ['extra3', 'index']]])]}
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 runnable job list.

Tab panel jobs are classified into visible rendering, background-safe work and paused work. Hidden panes pause render-only jobs but retain explicit background-safe tasks.

split: open-access


prompt:
The tab workspace reports an incorrect audible unmuted indicator.

Tab audio indicators distinguish currently audible, explicitly muted, and media-capture states. Muting changes only the selected tab policy and does not stop capture. The separate Stop Capture command removes only its target from the capture set.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = [t for t in x['tabs'] if t in x['audible'] and t not in x['muted']]
    r1 = [t for t in x['muted'] if t in x['audible']]
    r2 = x['capture']
    r3 = [t for t in x['muted'] if t!=x['target']] if x['target'] in x['muted'] else x['muted']+[x['target']]
    r4 = [t for t in x['capture'] if t!=x['target']]
    r5 = 'Unmute tab' if x['target'] in x['muted'] else 'Mute tab'
    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: [({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])], 2: [({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])], 3: [({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])], 4: [({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])], 5: [({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])]}
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 explicit muted indicator.

Tab audio indicators distinguish currently audible, explicitly muted, and media-capture states. Muting changes only the selected tab policy and does not stop capture. The separate Stop Capture command removes only its target from the capture set.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = [t for t in x['tabs'] if t in x['audible'] and t not in x['muted']]
    r1 = x['muted']
    r2 = [t for t in x['capture'] if t in x['audible']]
    r3 = [t for t in x['muted'] if t!=x['target']] if x['target'] in x['muted'] else x['muted']+[x['target']]
    r4 = [t for t in x['capture'] if t!=x['target']]
    r5 = 'Unmute tab' if x['target'] in x['muted'] else 'Mute tab'
    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: [({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])], 2: [({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])], 3: [({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])], 4: [({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])], 5: [({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [['a'], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'b'}, [['a'], ['b'], ['c'], [], ['c'], 'Unmute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': [], 'muted': ['b'], 'capture': ['c'], 'target': 'a'}, [[], ['b'], ['c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['a', 'c'], 'target': 'a'}, [['a'], ['b'], ['a', 'c'], ['b', 'a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': [], 'capture': ['c'], 'target': 'a'}, [['a', 'b'], [], ['c'], ['a'], ['c'], 'Mute tab']), ({'tabs': ['a', 'b', 'c', 'background0', 'background1', 'background2', 'background3'], 'audible': ['a', 'b'], 'muted': ['b'], 'capture': ['c'], 'target': 'c'}, [['a'], ['b'], ['c'], ['b', 'c'], [], 'Mute tab'])]}
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 capture indicator independence.

Tab audio indicators distinguish currently audible, explicitly muted, and media-capture states. Muting changes only the selected tab policy and does not stop capture. The separate Stop Capture command removes only its target from the capture set.

split: open-access


prompt:
The tab workspace reports an incorrect mute toggle target.

Tab audio indicators distinguish currently audible, explicitly muted, and media-capture states. Muting changes only the selected tab policy and does not stop capture. The separate Stop Capture command removes only its target from the capture set.

split: open-access


prompt:
The tab workspace reports an incorrect capture stop command scope.

Tab audio indicators distinguish currently audible, explicitly muted, and media-capture states. Muting changes only the selected tab policy and does not stop capture. The separate Stop Capture command removes only its target from the capture set.

split: open-access


prompt:
The tab workspace reports an incorrect mute action label.

Tab audio indicators distinguish currently audible, explicitly muted, and media-capture states. Muting changes only the selected tab policy and does not stop capture. The separate Stop Capture command removes only its target from the capture set.

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']
    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'] 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['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'] 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 eligibility.

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