FA-36206 / Tab interfaces / Open access
Multi tab drag: moved block selection range · case 01
The tab workspace reports an incorrect moved block selection range.
ROOT CAUSE
The moved block selection range decision uses [x['tabs'].index(t) for t in x['selected']] instead of list(range(x['boundary']-sum(t in x['selected'] for t in x['tabs'][:x['boundary']]),x['boundary']-sum(t in x['selected'] for t in x['tabs'][:x['boundary']])+len(x['selected']))).
VERIFIED REPAIR
Use the stipulated workspace rule: list(range(x['boundary']-sum(t in x['selected'] for t in x['tabs'][:x['boundary']]),x['boundary']-sum(t in x['selected'] for t in x['tabs'][:x['boundary']])+len(x['selected']))).
Unsuccessful approach: The partial repair list(range(x['boundary'],x['boundary']+len(x['selected']))) still violates a workspace boundary or normal case.
Case contract
Dragging a selected set keeps its visual order, rebases drop boundary by every moved item before it, preserves anchor view and leaves unselected tabs ordered.
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 = [t for t in x['tabs'] if t in x['selected']]
r1 = [t for t in x['tabs'] if t not in x['selected']]
r2 = x['boundary']-sum(t in x['selected'] for t in x['tabs'][:x['boundary']])
r3 = x['anchor']
r4 = [t for t in x['tabs'] if t in x['selected']].index(x['anchor'])
r5 = [x['tabs'].index(t) for t in x['selected']]
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', 'e'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 0, 'd', 1, [0, 1]])], 2: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 0, 'd', 1, [0, 1]])], 3: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0', 'background1'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 0, 'd', 1, [0, 1]])], 4: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0', 'background1', 'background2'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 0, 'd', 1, [0, 1]])], 5: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 0, 'd', 1, [0, 1]])]}
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 | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [1, 3]] | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]] | Failed |
| workspace regression 1 | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 1]] | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]] | Failed |
| workspace regression 2 | [['b', 'd'], ['a', 'c', 'e'], 1, 'd', 1, [1, 3]] | [['b', 'd'], ['a', 'c', 'e'], 1, 'd', 1, [1, 2]] | Failed |
| workspace regression 3 | [['a', 'b'], ['c', 'd', 'e'], 3, 'a', 0, [0, 1]] | [['a', 'b'], ['c', 'd', 'e'], 3, 'a', 0, [3, 4]] | Failed |
| workspace regression 4 | [['b', 'd'], ['a', 'c', 'e'], 3, 'b', 0, [1, 3]] | [['b', 'd'], ['a', 'c', 'e'], 3, 'b', 0, [3, 4]] | Failed |
| workspace regression 5 | [['b', 'd'], ['a', 'c', 'e'], 0, 'd', 1, [1, 3]] | [['b', 'd'], ['a', 'c', 'e'], 0, 'd', 1, [0, 1]] | Failed |
SHA-256 / 964b386e1dea95ef65a74988328874aaa6f1543ae938d7f545a4b30cd1660605
2 / The unsuccessful fix
Exit 1"""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['selected']]
r1 = [t for t in x['tabs'] if t not in x['selected']]
r2 = x['boundary']-sum(t in x['selected'] for t in x['tabs'][:x['boundary']])
r3 = x['anchor']
r4 = [t for t in x['tabs'] if t in x['selected']].index(x['anchor'])
r5 = list(range(x['boundary'],x['boundary']+len(x['selected'])))
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', 'e'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 0, 'd', 1, [0, 1]])], 2: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 0, 'd', 1, [0, 1]])], 3: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0', 'background1'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 0, 'd', 1, [0, 1]])], 4: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0', 'background1', 'background2'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 0, 'd', 1, [0, 1]])], 5: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 0, 'd', 1, [0, 1]])]}
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 | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [5, 6]] | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]] | Failed |
| workspace regression 1 | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [5, 6]] | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]] | Failed |
| workspace regression 2 | [['b', 'd'], ['a', 'c', 'e'], 1, 'd', 1, [2, 3]] | [['b', 'd'], ['a', 'c', 'e'], 1, 'd', 1, [1, 2]] | Failed |
| workspace regression 3 | [['a', 'b'], ['c', 'd', 'e'], 3, 'a', 0, [5, 6]] | [['a', 'b'], ['c', 'd', 'e'], 3, 'a', 0, [3, 4]] | Failed |
| workspace regression 4 | [['b', 'd'], ['a', 'c', 'e'], 3, 'b', 0, [5, 6]] | [['b', 'd'], ['a', 'c', 'e'], 3, 'b', 0, [3, 4]] | Failed |
| workspace regression 5 | [['b', 'd'], ['a', 'c', 'e'], 0, 'd', 1, [0, 1]] | [['b', 'd'], ['a', 'c', 'e'], 0, 'd', 1, [0, 1]] | Passed |
SHA-256 / 85d9e462b6ef1707db40a9450e95841972b7a65ac056d85089ce0d2fa65ee297
3 / The verified repair
Exit 0"""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['selected']]
r1 = [t for t in x['tabs'] if t not in x['selected']]
r2 = x['boundary']-sum(t in x['selected'] for t in x['tabs'][:x['boundary']])
r3 = x['anchor']
r4 = [t for t in x['tabs'] if t in x['selected']].index(x['anchor'])
r5 = list(range(x['boundary']-sum(t in x['selected'] for t in x['tabs'][:x['boundary']]),x['boundary']-sum(t in x['selected'] for t in x['tabs'][:x['boundary']])+len(x['selected'])))
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', 'e'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e'], 0, 'd', 1, [0, 1]])], 2: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0'], 0, 'd', 1, [0, 1]])], 3: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0', 'background1'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1'], 0, 'd', 1, [0, 1]])], 4: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0', 'background1', 'background2'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2'], 0, 'd', 1, [0, 1]])], 5: [({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['d', 'b'], 'boundary': 5, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'd', 1, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 2, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 1, 'd', 1, [1, 2]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['a', 'b'], 'boundary': 5, 'anchor': 'a'}, [['a', 'b'], ['c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'a', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 5, 'anchor': 'b'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 3, 'b', 0, [3, 4]]), ({'tabs': ['a', 'b', 'c', 'd', 'e', 'background0', 'background1', 'background2', 'background3'], 'selected': ['b', 'd'], 'boundary': 0, 'anchor': 'd'}, [['b', 'd'], ['a', 'c', 'e', 'background0', 'background1', 'background2', 'background3'], 0, 'd', 1, [0, 1]])]}
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 | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]] | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]] | Passed |
| workspace regression 1 | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]] | [['b', 'd'], ['a', 'c', 'e'], 3, 'd', 1, [3, 4]] | Passed |
| workspace regression 2 | [['b', 'd'], ['a', 'c', 'e'], 1, 'd', 1, [1, 2]] | [['b', 'd'], ['a', 'c', 'e'], 1, 'd', 1, [1, 2]] | Passed |
| workspace regression 3 | [['a', 'b'], ['c', 'd', 'e'], 3, 'a', 0, [3, 4]] | [['a', 'b'], ['c', 'd', 'e'], 3, 'a', 0, [3, 4]] | Passed |
| workspace regression 4 | [['b', 'd'], ['a', 'c', 'e'], 3, 'b', 0, [3, 4]] | [['b', 'd'], ['a', 'c', 'e'], 3, 'b', 0, [3, 4]] | Passed |
| workspace regression 5 | [['b', 'd'], ['a', 'c', 'e'], 0, 'd', 1, [0, 1]] | [['b', 'd'], ['a', 'c', 'e'], 0, 'd', 1, [0, 1]] | Passed |
SHA-256 / a2ab14e01534687e9120f90715aeac8fb0416f22bc248832d319201dbbdea747
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:49.025599+00:00.
Case digest / 1a33ad6d29211cfaed857a7ce960619beb1614dbff072a79eb603f4abc8822eb