FAILURE MAP
← Case archive

FA-36076 / Tab interfaces / Open access

Close to right: right clean closures · case 01

The tab workspace reports an incorrect right clean closures.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The right clean closures decision uses [t for t in x['tabs'] if t not in x['pins']+x['dirty']] instead of [t for t in x['tabs'][x['tabs'].index(x['target'])+1:] if t not in x['pins']+x['dirty']].

VERIFIED REPAIR

Use the stipulated workspace rule: [t for t in x['tabs'][x['tabs'].index(x['target'])+1:] if t not in x['pins']+x['dirty']].

Unsuccessful approach: The partial repair [] still violates a workspace boundary or normal case.

Case contract

Close To Right uses visual strip order after the invoked tab, excludes pins and crossing into another pane, and reports dirty prompts without closing them.

Why this case matters

Offline tab/panel workspace behavior; no browser or desktop framework is emulated.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['tabs'][x['tabs'].index(x['target'])+1:]
    r1 = [t for t in x['tabs'][x['tabs'].index(x['target'])+1:] if t not in x['pins']]
    r2 = [t for t in x['tabs'][x['tabs'].index(x['target'])+1:] if t in x['dirty'] and t not in x['pins']]
    r3 = [t for t in x['tabs'] if t not in x['pins']+x['dirty']]
    r4 = x['target']
    r5 = x['tabs'][:x['tabs'].index(x['target'])+1]
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [[], [], [], [], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']])], 2: [({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0'], ['c', 'background0'], ['c'], ['background0'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0'], ['b', 'c', 'background0'], ['c'], ['b', 'background0'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0'], ['background0'], [], ['background0'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0'], ['c', 'd', 'background0'], ['c'], ['d', 'background0'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0'], ['c', 'background0'], [], ['c', 'background0'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0'], ['c', 'background0'], [], ['c', 'background0'], 'b', ['a', 'b']])], 3: [({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1'], ['c', 'background0', 'background1'], ['c'], ['background0', 'background1'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0', 'background1'], ['b', 'c', 'background0', 'background1'], ['c'], ['b', 'background0', 'background1'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0', 'background1'], ['background0', 'background1'], [], ['background0', 'background1'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1'], ['c', 'd', 'background0', 'background1'], ['c'], ['d', 'background0', 'background1'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0', 'background1'], ['c', 'background0', 'background1'], [], ['c', 'background0', 'background1'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0', 'background1'], ['c', 'background0', 'background1'], [], ['c', 'background0', 'background1'], 'b', ['a', 'b']])], 4: [({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'background0', 'background1', 'background2'], ['c'], ['background0', 'background1', 'background2'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0', 'background1', 'background2'], ['b', 'c', 'background0', 'background1', 'background2'], ['c'], ['b', 'background0', 'background1', 'background2'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0', 'background1', 'background2'], ['background0', 'background1', 'background2'], [], ['background0', 'background1', 'background2'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'd', 'background0', 'background1', 'background2'], ['c'], ['d', 'background0', 'background1', 'background2'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'background0', 'background1', 'background2'], [], ['c', 'background0', 'background1', 'background2'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'background0', 'background1', 'background2'], [], ['c', 'background0', 'background1', 'background2'], 'b', ['a', 'b']])], 5: [({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'background0', 'background1', 'background2', 'background3'], ['c'], ['background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], ['b', 'c', 'background0', 'background1', 'background2', 'background3'], ['c'], ['b', 'background0', 'background1', 'background2', 'background3'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0', 'background1', 'background2', 'background3'], ['background0', 'background1', 'background2', 'background3'], [], ['background0', 'background1', 'background2', 'background3'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c'], ['d', 'background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'background0', 'background1', 'background2', 'background3'], [], ['c', 'background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'background0', 'background1', 'background2', 'background3'], [], ['c', 'background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
workspace regression 0[['c', 'd'], ['c'], ['c'], ['a', 'b'], 'b', ['a', 'b']][['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']]Failed
workspace regression 1[['b', 'c', 'd'], ['b', 'c'], ['c'], ['a', 'b'], 'a', ['a']][['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']]Failed
workspace regression 2[[], [], [], ['a', 'b'], 'd', ['a', 'b', 'c', 'd']][[], [], [], [], 'd', ['a', 'b', 'c', 'd']]Failed
workspace regression 3[['c', 'd'], ['c', 'd'], ['c'], ['a', 'b', 'd'], 'b', ['a', 'b']][['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']]Failed
workspace regression 4[['c', 'd'], ['c'], [], ['a', 'b', 'c'], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Failed
workspace regression 5[['c', 'd'], ['c'], [], ['a', 'b', 'c'], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Failed

SHA-256 / 7a5d87a8434aad453fb28ac3c9c0325bbc3aa5953f567dd5f3953df98f584dc7

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['tabs'][x['tabs'].index(x['target'])+1:]
    r1 = [t for t in x['tabs'][x['tabs'].index(x['target'])+1:] if t not in x['pins']]
    r2 = [t for t in x['tabs'][x['tabs'].index(x['target'])+1:] if t in x['dirty'] and t not in x['pins']]
    r3 = []
    r4 = x['target']
    r5 = x['tabs'][:x['tabs'].index(x['target'])+1]
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [[], [], [], [], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']])], 2: [({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0'], ['c', 'background0'], ['c'], ['background0'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0'], ['b', 'c', 'background0'], ['c'], ['b', 'background0'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0'], ['background0'], [], ['background0'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0'], ['c', 'd', 'background0'], ['c'], ['d', 'background0'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0'], ['c', 'background0'], [], ['c', 'background0'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0'], ['c', 'background0'], [], ['c', 'background0'], 'b', ['a', 'b']])], 3: [({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1'], ['c', 'background0', 'background1'], ['c'], ['background0', 'background1'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0', 'background1'], ['b', 'c', 'background0', 'background1'], ['c'], ['b', 'background0', 'background1'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0', 'background1'], ['background0', 'background1'], [], ['background0', 'background1'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1'], ['c', 'd', 'background0', 'background1'], ['c'], ['d', 'background0', 'background1'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0', 'background1'], ['c', 'background0', 'background1'], [], ['c', 'background0', 'background1'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0', 'background1'], ['c', 'background0', 'background1'], [], ['c', 'background0', 'background1'], 'b', ['a', 'b']])], 4: [({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'background0', 'background1', 'background2'], ['c'], ['background0', 'background1', 'background2'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0', 'background1', 'background2'], ['b', 'c', 'background0', 'background1', 'background2'], ['c'], ['b', 'background0', 'background1', 'background2'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0', 'background1', 'background2'], ['background0', 'background1', 'background2'], [], ['background0', 'background1', 'background2'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'd', 'background0', 'background1', 'background2'], ['c'], ['d', 'background0', 'background1', 'background2'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'background0', 'background1', 'background2'], [], ['c', 'background0', 'background1', 'background2'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'background0', 'background1', 'background2'], [], ['c', 'background0', 'background1', 'background2'], 'b', ['a', 'b']])], 5: [({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'background0', 'background1', 'background2', 'background3'], ['c'], ['background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], ['b', 'c', 'background0', 'background1', 'background2', 'background3'], ['c'], ['b', 'background0', 'background1', 'background2', 'background3'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0', 'background1', 'background2', 'background3'], ['background0', 'background1', 'background2', 'background3'], [], ['background0', 'background1', 'background2', 'background3'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c'], ['d', 'background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'background0', 'background1', 'background2', 'background3'], [], ['c', 'background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'background0', 'background1', 'background2', 'background3'], [], ['c', 'background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
workspace regression 0[['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']][['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']]Passed
workspace regression 1[['b', 'c', 'd'], ['b', 'c'], ['c'], [], 'a', ['a']][['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']]Failed
workspace regression 2[[], [], [], [], 'd', ['a', 'b', 'c', 'd']][[], [], [], [], 'd', ['a', 'b', 'c', 'd']]Passed
workspace regression 3[['c', 'd'], ['c', 'd'], ['c'], [], 'b', ['a', 'b']][['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']]Failed
workspace regression 4[['c', 'd'], ['c'], [], [], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Failed
workspace regression 5[['c', 'd'], ['c'], [], [], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Failed

SHA-256 / 569c751fb82fa0e162a7fe6c44bc2ffba8c88d7e615f664958cc998be765f58d

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['tabs'][x['tabs'].index(x['target'])+1:]
    r1 = [t for t in x['tabs'][x['tabs'].index(x['target'])+1:] if t not in x['pins']]
    r2 = [t for t in x['tabs'][x['tabs'].index(x['target'])+1:] if t in x['dirty'] and t not in x['pins']]
    r3 = [t for t in x['tabs'][x['tabs'].index(x['target'])+1:] if t not in x['pins']+x['dirty']]
    r4 = x['target']
    r5 = x['tabs'][:x['tabs'].index(x['target'])+1]
    return [r0,r1,r2,r3,r4,r5]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [[], [], [], [], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']])], 2: [({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0'], ['c', 'background0'], ['c'], ['background0'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0'], ['b', 'c', 'background0'], ['c'], ['b', 'background0'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0'], ['background0'], [], ['background0'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0'], ['c', 'd', 'background0'], ['c'], ['d', 'background0'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0'], ['c', 'background0'], [], ['c', 'background0'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0'], ['c', 'background0'], [], ['c', 'background0'], 'b', ['a', 'b']])], 3: [({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1'], ['c', 'background0', 'background1'], ['c'], ['background0', 'background1'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0', 'background1'], ['b', 'c', 'background0', 'background1'], ['c'], ['b', 'background0', 'background1'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0', 'background1'], ['background0', 'background1'], [], ['background0', 'background1'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1'], ['c', 'd', 'background0', 'background1'], ['c'], ['d', 'background0', 'background1'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0', 'background1'], ['c', 'background0', 'background1'], [], ['c', 'background0', 'background1'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0', 'background1'], ['c', 'background0', 'background1'], [], ['c', 'background0', 'background1'], 'b', ['a', 'b']])], 4: [({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'background0', 'background1', 'background2'], ['c'], ['background0', 'background1', 'background2'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0', 'background1', 'background2'], ['b', 'c', 'background0', 'background1', 'background2'], ['c'], ['b', 'background0', 'background1', 'background2'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0', 'background1', 'background2'], ['background0', 'background1', 'background2'], [], ['background0', 'background1', 'background2'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'd', 'background0', 'background1', 'background2'], ['c'], ['d', 'background0', 'background1', 'background2'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'background0', 'background1', 'background2'], [], ['c', 'background0', 'background1', 'background2'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0', 'background1', 'background2'], ['c', 'background0', 'background1', 'background2'], [], ['c', 'background0', 'background1', 'background2'], 'b', ['a', 'b']])], 5: [({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': ['d'], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'background0', 'background1', 'background2', 'background3'], ['c'], ['background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'a', 'pins': ['d'], 'dirty': ['c']}, [['b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], ['b', 'c', 'background0', 'background1', 'background2', 'background3'], ['c'], ['b', 'background0', 'background1', 'background2', 'background3'], 'a', ['a']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'd', 'pins': ['d'], 'dirty': ['c']}, [['background0', 'background1', 'background2', 'background3'], ['background0', 'background1', 'background2', 'background3'], [], ['background0', 'background1', 'background2', 'background3'], 'd', ['a', 'b', 'c', 'd']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': [], 'dirty': ['c']}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c'], ['d', 'background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': ['d'], 'dirty': []}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'background0', 'background1', 'background2', 'background3'], [], ['c', 'background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']]), ({'tabs': ['a', 'b', 'c', 'd', 'background0', 'background1', 'background2', 'background3'], 'target': 'b', 'pins': ['d'], 'dirty': ['d']}, [['c', 'd', 'background0', 'background1', 'background2', 'background3'], ['c', 'background0', 'background1', 'background2', 'background3'], [], ['c', 'background0', 'background1', 'background2', 'background3'], 'b', ['a', 'b']])]}
for i, (inputs, expected) in enumerate(fixtures[N]):
    check("workspace regression "+str(i), solve(inputs), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
workspace regression 0[['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']][['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']]Passed
workspace regression 1[['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']][['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']]Passed
workspace regression 2[[], [], [], [], 'd', ['a', 'b', 'c', 'd']][[], [], [], [], 'd', ['a', 'b', 'c', 'd']]Passed
workspace regression 3[['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']][['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']]Passed
workspace regression 4[['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Passed
workspace regression 5[['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Passed

SHA-256 / 7c2deaf9525094786f09dc47aaba7e252f9786a59ed2d4a8a29dcf05fe513f7e

Verification & scope

Finite stipulated workspace snapshots only. Independent result fields describe observable obligations, not a full UI runtime. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:42:47.620982+00:00.

Case digest / 99a3c9ba6992ce2ae64df19e3cf08d45874e8c1f9de9d886c897e91ff5743ca6