FA-36401 / Tab interfaces / Open access
Dock target regions: vertical edge choice · case 01
The tab workspace reports an incorrect vertical edge choice.
ROOT CAUSE
The vertical edge choice decision uses 'top' instead of 'top' if x['py']<x['height']/2 else 'bottom'.
VERIFIED REPAIR
Use the stipulated workspace rule: 'top' if x['py']<x['height']/2 else 'bottom'.
Unsuccessful approach: The partial repair 'bottom' still violates a workspace boundary or normal case.
Case contract
A dropped tab creates a new ungrouped pane only in an edge docking zone; center targets join the destination group. Center drops into the source pane are no-ops. Corners resolve to the nearest normalized edge.
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['edge']<=x['px']<x['width']-x['edge'] and x['edge']<=x['py']<x['height']-x['edge']
r1 = 'left' if x['px']<x['width']/2 else 'right'
r2 = 'top'
r3 = 'horizontal' if min(x['px'],x['width']-x['px'])*x['height']<=min(x['py'],x['height']-x['py'])*x['width'] else 'vertical'
r4 = x['source_pane']==x['target_pane'] and (x['edge']<=x['px']<x['width']-x['edge'] and x['edge']<=x['py']<x['height']-x['edge'])
r5 = x['target_group'] if (x['edge']<=x['px']<x['width']-x['edge'] and x['edge']<=x['py']<x['height']-x['edge']) else None
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: [({'px': 10, 'py': 70, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 100, 'py': 50, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 190, 'py': 50, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 100, 'py': 5, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 100, 'py': 95, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 5, 'py': 5, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 100, 'py': 50, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 10, 'py': 70, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 2: [({'px': 20, 'py': 140, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 200, 'py': 100, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 380, 'py': 100, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 200, 'py': 10, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 200, 'py': 190, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 10, 'py': 10, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 200, 'py': 100, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 20, 'py': 140, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 3: [({'px': 30, 'py': 210, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 300, 'py': 150, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 570, 'py': 150, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 300, 'py': 15, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 300, 'py': 285, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 15, 'py': 15, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 300, 'py': 150, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 30, 'py': 210, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 4: [({'px': 40, 'py': 280, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 400, 'py': 200, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 760, 'py': 200, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 400, 'py': 20, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 400, 'py': 380, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 20, 'py': 20, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 400, 'py': 200, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 40, 'py': 280, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 5: [({'px': 50, 'py': 350, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 500, 'py': 250, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 950, 'py': 250, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 500, 'py': 25, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 500, 'py': 475, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 25, 'py': 25, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 500, 'py': 250, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 50, 'py': 350, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])]}
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 | [False, 'left', 'top', 'horizontal', False, None] | [False, 'left', 'bottom', 'horizontal', False, None] | Failed |
| workspace regression 1 | [True, 'right', 'top', 'horizontal', False, 'g'] | [True, 'right', 'bottom', 'horizontal', False, 'g'] | Failed |
| workspace regression 2 | [False, 'right', 'top', 'horizontal', False, None] | [False, 'right', 'bottom', 'horizontal', False, None] | Failed |
| workspace regression 3 | [False, 'right', 'top', 'vertical', False, None] | [False, 'right', 'top', 'vertical', False, None] | Passed |
| workspace regression 4 | [False, 'right', 'top', 'vertical', False, None] | [False, 'right', 'bottom', 'vertical', False, None] | Failed |
| workspace regression 5 | [False, 'left', 'top', 'horizontal', False, None] | [False, 'left', 'top', 'horizontal', False, None] | Passed |
| workspace regression 6 | [True, 'right', 'top', 'horizontal', True, 'g'] | [True, 'right', 'bottom', 'horizontal', True, 'g'] | Failed |
| workspace regression 7 | [False, 'left', 'top', 'horizontal', False, None] | [False, 'left', 'bottom', 'horizontal', False, None] | Failed |
SHA-256 / 95372cab6330bf4455a867ce23714c4f5f3f8f5d32c190407f95a8daa5efc82b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = x['edge']<=x['px']<x['width']-x['edge'] and x['edge']<=x['py']<x['height']-x['edge']
r1 = 'left' if x['px']<x['width']/2 else 'right'
r2 = 'bottom'
r3 = 'horizontal' if min(x['px'],x['width']-x['px'])*x['height']<=min(x['py'],x['height']-x['py'])*x['width'] else 'vertical'
r4 = x['source_pane']==x['target_pane'] and (x['edge']<=x['px']<x['width']-x['edge'] and x['edge']<=x['py']<x['height']-x['edge'])
r5 = x['target_group'] if (x['edge']<=x['px']<x['width']-x['edge'] and x['edge']<=x['py']<x['height']-x['edge']) else None
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: [({'px': 10, 'py': 70, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 100, 'py': 50, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 190, 'py': 50, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 100, 'py': 5, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 100, 'py': 95, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 5, 'py': 5, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 100, 'py': 50, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 10, 'py': 70, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 2: [({'px': 20, 'py': 140, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 200, 'py': 100, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 380, 'py': 100, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 200, 'py': 10, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 200, 'py': 190, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 10, 'py': 10, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 200, 'py': 100, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 20, 'py': 140, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 3: [({'px': 30, 'py': 210, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 300, 'py': 150, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 570, 'py': 150, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 300, 'py': 15, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 300, 'py': 285, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 15, 'py': 15, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 300, 'py': 150, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 30, 'py': 210, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 4: [({'px': 40, 'py': 280, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 400, 'py': 200, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 760, 'py': 200, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 400, 'py': 20, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 400, 'py': 380, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 20, 'py': 20, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 400, 'py': 200, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 40, 'py': 280, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 5: [({'px': 50, 'py': 350, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 500, 'py': 250, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 950, 'py': 250, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 500, 'py': 25, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 500, 'py': 475, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 25, 'py': 25, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 500, 'py': 250, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 50, 'py': 350, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])]}
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 | [False, 'left', 'bottom', 'horizontal', False, None] | [False, 'left', 'bottom', 'horizontal', False, None] | Passed |
| workspace regression 1 | [True, 'right', 'bottom', 'horizontal', False, 'g'] | [True, 'right', 'bottom', 'horizontal', False, 'g'] | Passed |
| workspace regression 2 | [False, 'right', 'bottom', 'horizontal', False, None] | [False, 'right', 'bottom', 'horizontal', False, None] | Passed |
| workspace regression 3 | [False, 'right', 'bottom', 'vertical', False, None] | [False, 'right', 'top', 'vertical', False, None] | Failed |
| workspace regression 4 | [False, 'right', 'bottom', 'vertical', False, None] | [False, 'right', 'bottom', 'vertical', False, None] | Passed |
| workspace regression 5 | [False, 'left', 'bottom', 'horizontal', False, None] | [False, 'left', 'top', 'horizontal', False, None] | Failed |
| workspace regression 6 | [True, 'right', 'bottom', 'horizontal', True, 'g'] | [True, 'right', 'bottom', 'horizontal', True, 'g'] | Passed |
| workspace regression 7 | [False, 'left', 'bottom', 'horizontal', False, None] | [False, 'left', 'bottom', 'horizontal', False, None] | Passed |
SHA-256 / 33810cef509eac71ccdeba6a4e0d1aae8b35e23df627c5b3d3e4ca455dcf5cca
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
r0 = x['edge']<=x['px']<x['width']-x['edge'] and x['edge']<=x['py']<x['height']-x['edge']
r1 = 'left' if x['px']<x['width']/2 else 'right'
r2 = 'top' if x['py']<x['height']/2 else 'bottom'
r3 = 'horizontal' if min(x['px'],x['width']-x['px'])*x['height']<=min(x['py'],x['height']-x['py'])*x['width'] else 'vertical'
r4 = x['source_pane']==x['target_pane'] and (x['edge']<=x['px']<x['width']-x['edge'] and x['edge']<=x['py']<x['height']-x['edge'])
r5 = x['target_group'] if (x['edge']<=x['px']<x['width']-x['edge'] and x['edge']<=x['py']<x['height']-x['edge']) else None
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: [({'px': 10, 'py': 70, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 100, 'py': 50, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 190, 'py': 50, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 100, 'py': 5, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 100, 'py': 95, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 5, 'py': 5, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 100, 'py': 50, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 10, 'py': 70, 'width': 200, 'height': 100, 'edge': 20, 'gutter': 4, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 2: [({'px': 20, 'py': 140, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 200, 'py': 100, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 380, 'py': 100, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 200, 'py': 10, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 200, 'py': 190, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 10, 'py': 10, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 200, 'py': 100, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 20, 'py': 140, 'width': 400, 'height': 200, 'edge': 40, 'gutter': 8, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 3: [({'px': 30, 'py': 210, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 300, 'py': 150, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 570, 'py': 150, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 300, 'py': 15, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 300, 'py': 285, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 15, 'py': 15, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 300, 'py': 150, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 30, 'py': 210, 'width': 600, 'height': 300, 'edge': 60, 'gutter': 12, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 4: [({'px': 40, 'py': 280, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 400, 'py': 200, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 760, 'py': 200, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 400, 'py': 20, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 400, 'py': 380, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 20, 'py': 20, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 400, 'py': 200, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 40, 'py': 280, 'width': 800, 'height': 400, 'edge': 80, 'gutter': 16, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])], 5: [({'px': 50, 'py': 350, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None]), ({'px': 500, 'py': 250, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', False, 'g']), ({'px': 950, 'py': 250, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'horizontal', False, None]), ({'px': 500, 'py': 25, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'top', 'vertical', False, None]), ({'px': 500, 'py': 475, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'right', 'bottom', 'vertical', False, None]), ({'px': 25, 'py': 25, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'p', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'top', 'horizontal', False, None]), ({'px': 500, 'py': 250, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [True, 'right', 'bottom', 'horizontal', True, 'g']), ({'px': 50, 'py': 350, 'width': 1000, 'height': 500, 'edge': 100, 'gutter': 20, 'source_pane': 'q', 'target_pane': 'q', 'new_pane': 'r', 'target_group': 'g'}, [False, 'left', 'bottom', 'horizontal', False, None])]}
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 | [False, 'left', 'bottom', 'horizontal', False, None] | [False, 'left', 'bottom', 'horizontal', False, None] | Passed |
| workspace regression 1 | [True, 'right', 'bottom', 'horizontal', False, 'g'] | [True, 'right', 'bottom', 'horizontal', False, 'g'] | Passed |
| workspace regression 2 | [False, 'right', 'bottom', 'horizontal', False, None] | [False, 'right', 'bottom', 'horizontal', False, None] | Passed |
| workspace regression 3 | [False, 'right', 'top', 'vertical', False, None] | [False, 'right', 'top', 'vertical', False, None] | Passed |
| workspace regression 4 | [False, 'right', 'bottom', 'vertical', False, None] | [False, 'right', 'bottom', 'vertical', False, None] | Passed |
| workspace regression 5 | [False, 'left', 'top', 'horizontal', False, None] | [False, 'left', 'top', 'horizontal', False, None] | Passed |
| workspace regression 6 | [True, 'right', 'bottom', 'horizontal', True, 'g'] | [True, 'right', 'bottom', 'horizontal', True, 'g'] | Passed |
| workspace regression 7 | [False, 'left', 'bottom', 'horizontal', False, None] | [False, 'left', 'bottom', 'horizontal', False, None] | Passed |
SHA-256 / 89e007b1080aba02010db7e5e13b007b9a4d3a8d4e7c1a0f70cc6847cd533368
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:50.987140+00:00.
Case digest / 164cb3531529c579f4410bb9ceb16472c43ca9e3a0f7c5f575093f73d8f35d07