broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['prior_visible'] and not (x['zen'] and x['hide_tabs'])
    r1 = x['panel_height']+(x['strip_height'] if x['zen'] and x['hide_tabs'] and x['prior_visible'] else 0)
    r2 = x['tabs']
    r3 = x['selected']
    r4 = x['prior_visible']
    r5 = False
    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: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 532, ['a', 'b'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [True, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [True, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 500, ['a', 'b'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'b', 'tabs': ['a', 'b'], 'hover': False}, [False, 532, ['a', 'b'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': True}, [False, 532, ['a', 'b'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': True}, [True, 500, ['a', 'b'], 'a', True, False])], 2: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1064, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1000, ['a', 'b', 'background0'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'b', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1064, ['a', 'b', 'background0'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': True}, [False, 1064, ['a', 'b', 'background0'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': True}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False])], 3: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1500, ['a', 'b', 'background0', 'background1'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': True}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': True}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False])], 4: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': True}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': True}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False])], 5: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': True}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': True}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False])]}
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = x['prior_visible'] and not (x['zen'] and x['hide_tabs'])
    r1 = x['panel_height']+(x['strip_height'] if x['zen'] and x['hide_tabs'] and x['prior_visible'] else 0)
    r2 = x['tabs']
    r3 = x['selected']
    r4 = x['prior_visible']
    r5 = x['hover']
    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: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 532, ['a', 'b'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [True, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [True, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 500, ['a', 'b'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': False}, [False, 500, ['a', 'b'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'b', 'tabs': ['a', 'b'], 'hover': False}, [False, 532, ['a', 'b'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': True}, [False, 532, ['a', 'b'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 32, 'panel_height': 500, 'selected': 'a', 'tabs': ['a', 'b'], 'hover': True}, [True, 500, ['a', 'b'], 'a', True, False])], 2: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1064, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1000, ['a', 'b', 'background0'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1000, ['a', 'b', 'background0'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'b', 'tabs': ['a', 'b', 'background0'], 'hover': False}, [False, 1064, ['a', 'b', 'background0'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': True}, [False, 1064, ['a', 'b', 'background0'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 64, 'panel_height': 1000, 'selected': 'a', 'tabs': ['a', 'b', 'background0'], 'hover': True}, [True, 1000, ['a', 'b', 'background0'], 'a', True, False])], 3: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1500, ['a', 'b', 'background0', 'background1'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': False}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': True}, [False, 1596, ['a', 'b', 'background0', 'background1'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 96, 'panel_height': 1500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1'], 'hover': True}, [True, 1500, ['a', 'b', 'background0', 'background1'], 'a', True, False])], 4: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': False}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': True}, [False, 2128, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 128, 'panel_height': 2000, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2'], 'hover': True}, [True, 2000, ['a', 'b', 'background0', 'background1', 'background2'], 'a', True, False])], 5: [({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': False, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': False, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', False, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 0, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'b', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': False}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'b', True, False]), ({'zen': True, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': True}, [False, 2660, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, True]), ({'zen': False, 'hide_tabs': True, 'prior_visible': True, 'strip_height': 160, 'panel_height': 2500, 'selected': 'a', 'tabs': ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'hover': True}, [True, 2500, ['a', 'b', 'background0', 'background1', 'background2', 'background3'], 'a', True, False])]}
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)

prompt:
The tab workspace reports an incorrect zen hover reveal.

Zen mode may hide tab strips without closing views. Exiting restores prior strip visibility, preserves selected documents and reclaims only the configured strip height.

split: open-access


broken_source:
"""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']
    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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    r0 = 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)

prompt:
The tab workspace reports an incorrect center join region.

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.

split: open-access


broken_source:
"""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'
    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)

source:
"""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 = '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)

prompt:
The tab workspace reports an incorrect horizontal edge choice.

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.

split: open-access


broken_source:
"""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)

source:
"""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)

prompt:
The tab workspace reports an incorrect vertical edge choice.

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.

split: open-access