FA-36086 / Tab interfaces / Open access
Close to right: left prefix preservation · case 01
The tab workspace reports an incorrect left prefix preservation.
ROOT CAUSE
The left prefix preservation 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'][:1] 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'][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'])]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| workspace regression 0 | [['c', 'd'], ['c'], ['c'], [], 'b', ['a']] | [['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']] | Failed |
| workspace regression 1 | [['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', []] | [['b', 'c', 'd'], ['b', 'c'], ['c'], ['b'], 'a', ['a']] | Failed |
| workspace regression 2 | [[], [], [], [], 'd', ['a', 'b', 'c']] | [[], [], [], [], 'd', ['a', 'b', 'c', 'd']] | Failed |
| workspace regression 3 | [['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a']] | [['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']] | Failed |
| workspace regression 4 | [['c', 'd'], ['c'], [], ['c'], 'b', ['a']] | [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']] | Failed |
| workspace regression 5 | [['c', 'd'], ['c'], [], ['c'], 'b', ['a']] | [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']] | Failed |
SHA-256 / 6433942c885e8b1f2c507e819a3f9263fed8de13c12f9345e3ffec76fb3f5167
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 = [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'][: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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| workspace regression 0 | [['c', 'd'], ['c'], ['c'], [], 'b', ['a']] | [['c', 'd'], ['c'], ['c'], [], 'b', ['a', 'b']] | Failed |
| 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']] | [[], [], [], [], 'd', ['a', 'b', 'c', 'd']] | Failed |
| workspace regression 3 | [['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a']] | [['c', 'd'], ['c', 'd'], ['c'], ['d'], 'b', ['a', 'b']] | Failed |
| workspace regression 4 | [['c', 'd'], ['c'], [], ['c'], 'b', ['a']] | [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']] | Failed |
| workspace regression 5 | [['c', 'd'], ['c'], [], ['c'], 'b', ['a']] | [['c', 'd'], ['c'], [], ['c'], 'b', ['a', 'b']] | Failed |
SHA-256 / e9014e4df7cc67a52260ed10201b67409abdf6cd05e0f2a4df239988e2f80efc
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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.795911+00:00.
Case digest / 7572da3e228517dd3823d673aa7b119509d6000c35d42b67a6003c8989b68c06