FAILURE MAP
← Case archive

FA-36061 / Tab interfaces / Open access

Close to right: right neighbor range · case 01

The tab workspace reports an incorrect right neighbor range.

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

ROOT CAUSE

The right neighbor range decision uses x['tabs'][x['tabs'].index(x['target']):] instead of x['tabs'][x['tabs'].index(x['target'])+1:].

VERIFIED REPAIR

Use the stipulated workspace rule: x['tabs'][x['tabs'].index(x['target'])+1:].

Unsuccessful approach: The partial repair x['tabs'][:x['tabs'].index(x['target'])] 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']):]
    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[['b', 'c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']][['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']]Failed
workspace regression 1[['a', 'b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']][['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']]Failed
workspace regression 2[['d'], [], [], [], 'd', ['a', 'b', 'c', 'd']][[], [], [], [], 'd', ['a', 'b', 'c', 'd']]Failed
workspace regression 3[['b', 'c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']][['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']]Failed
workspace regression 4[['b', 'c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Failed
workspace regression 5[['b', 'c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Failed

SHA-256 / 8b3f96047cf08e6c130a10559b67226800fcb8ffe3246b270261fd6f69eed704

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'])]
    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[['a'], ['c'], ['c'], [], 'b', ['a', 'b']][['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']]Failed
workspace regression 1[[], ['b', 'c'], ['c'], ['b'], 'a', ['a']][['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']]Failed
workspace regression 2[['a', 'b', 'c'], [], [], [], 'd', ['a', 'b', 'c', 'd']][[], [], [], [], 'd', ['a', 'b', 'c', 'd']]Failed
workspace regression 3[['a'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']][['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']]Failed
workspace regression 4[['a'], ['c'], [], ['c'], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Failed
workspace regression 5[['a'], ['c'], [], ['c'], 'b', ['a', 'b']][['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']]Failed

SHA-256 / c616ab8c650e0a8d3c73f1421ffebe0eeff2a0dc7c8bbc32d17612337b7fdc8e

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.590703+00:00.

Case digest / 2f41cac51e8e776e847baa706c133fd8ece774aa7a7c15144d1f4004105aa389