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

N = 1
observations = []
def solve(x):
    r0 = max(0,x['pane_width']-x['strip_width'])
    r1 = x['pane_height']
    r2 = x['tabs_count']*x['strip_width']
    r3 = x['headers']*x['header_height']
    r4 = max(0,x['tabs_count']*x['row_height']+x['headers']*x['header_height']-x['pane_height'])
    r5 = x['strip_width']-x['padding']-x['button_width']
    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: [({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 40, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 0, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 0, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 20, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 560, 40, 200, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 80, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [420, 400, 224, 40, 0, 58]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 0}, [380, 400, 224, 40, 0, 104]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 0, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 0, 40, 0, 98])], 2: [({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 80, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 0, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 0, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 20, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 1120, 80, 400, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 160, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [840, 800, 448, 80, 0, 116]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 0}, [760, 800, 448, 80, 0, 208]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 0, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 0, 80, 0, 196])], 3: [({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 120, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 0, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 0, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 20, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 1680, 120, 600, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 240, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1260, 1200, 672, 120, 0, 174]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 0}, [1140, 1200, 672, 120, 0, 312]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 0, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 0, 120, 0, 294])], 4: [({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 160, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 0, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 0, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 20, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 2240, 160, 800, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 320, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1680, 1600, 896, 160, 0, 232]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 0}, [1520, 1600, 896, 160, 0, 416]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 0, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 0, 160, 0, 392])], 5: [({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 200, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 0, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 0, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 20, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 2800, 200, 1000, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 400, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [2100, 2000, 1120, 200, 0, 290]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 0}, [1900, 2000, 1120, 200, 0, 520]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 0, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 0, 200, 0, 490])]}
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 = max(0,x['pane_width']-x['strip_width'])
    r1 = x['pane_height']
    r2 = x['row_height']
    r3 = x['headers']*x['header_height']
    r4 = max(0,x['tabs_count']*x['row_height']+x['headers']*x['header_height']-x['pane_height'])
    r5 = x['strip_width']-x['padding']-x['button_width']
    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: [({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 40, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 0, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 0, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 20, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 560, 40, 200, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 80, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [420, 400, 224, 40, 0, 58]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 0}, [380, 400, 224, 40, 0, 104]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 0, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 0, 40, 0, 98])], 2: [({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 80, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 0, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 0, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 20, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 1120, 80, 400, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 160, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [840, 800, 448, 80, 0, 116]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 0}, [760, 800, 448, 80, 0, 208]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 0, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 0, 80, 0, 196])], 3: [({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 120, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 0, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 0, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 20, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 1680, 120, 600, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 240, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1260, 1200, 672, 120, 0, 174]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 0}, [1140, 1200, 672, 120, 0, 312]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 0, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 0, 120, 0, 294])], 4: [({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 160, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 0, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 0, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 20, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 2240, 160, 800, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 320, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1680, 1600, 896, 160, 0, 232]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 0}, [1520, 1600, 896, 160, 0, 416]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 0, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 0, 160, 0, 392])], 5: [({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 200, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 0, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 0, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 20, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 2800, 200, 1000, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 400, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [2100, 2000, 1120, 200, 0, 290]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 0}, [1900, 2000, 1120, 200, 0, 520]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 0, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 0, 200, 0, 490])]}
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 tab row content.

Vertical tab strips consume pane width rather than height, reserve group-header rows, size scroll content from row heights and keep close buttons aligned to the strip trailing edge.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = max(0,x['pane_width']-x['strip_width'])
    r1 = x['pane_height']
    r2 = x['tabs_count']*x['row_height']
    r3 = 0
    r4 = max(0,x['tabs_count']*x['row_height']+x['headers']*x['header_height']-x['pane_height'])
    r5 = x['strip_width']-x['padding']-x['button_width']
    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: [({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 40, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 0, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 0, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 20, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 560, 40, 200, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 80, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [420, 400, 224, 40, 0, 58]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 0}, [380, 400, 224, 40, 0, 104]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 0, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 0, 40, 0, 98])], 2: [({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 80, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 0, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 0, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 20, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 1120, 80, 400, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 160, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [840, 800, 448, 80, 0, 116]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 0}, [760, 800, 448, 80, 0, 208]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 0, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 0, 80, 0, 196])], 3: [({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 120, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 0, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 0, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 20, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 1680, 120, 600, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 240, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1260, 1200, 672, 120, 0, 174]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 0}, [1140, 1200, 672, 120, 0, 312]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 0, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 0, 120, 0, 294])], 4: [({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 160, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 0, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 0, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 20, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 2240, 160, 800, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 320, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1680, 1600, 896, 160, 0, 232]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 0}, [1520, 1600, 896, 160, 0, 416]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 0, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 0, 160, 0, 392])], 5: [({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 200, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 0, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 0, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 20, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 2800, 200, 1000, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 400, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [2100, 2000, 1120, 200, 0, 290]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 0}, [1900, 2000, 1120, 200, 0, 520]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 0, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 0, 200, 0, 490])]}
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 = max(0,x['pane_width']-x['strip_width'])
    r1 = x['pane_height']
    r2 = x['tabs_count']*x['row_height']
    r3 = x['headers']*x['row_height']
    r4 = max(0,x['tabs_count']*x['row_height']+x['headers']*x['header_height']-x['pane_height'])
    r5 = x['strip_width']-x['padding']-x['button_width']
    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: [({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 40, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 0, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 0, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 20, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 560, 40, 200, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 80, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [420, 400, 224, 40, 0, 58]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 0}, [380, 400, 224, 40, 0, 104]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 0, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 0, 40, 0, 98])], 2: [({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 80, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 0, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 0, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 20, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 1120, 80, 400, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 160, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [840, 800, 448, 80, 0, 116]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 0}, [760, 800, 448, 80, 0, 208]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 0, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 0, 80, 0, 196])], 3: [({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 120, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 0, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 0, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 20, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 1680, 120, 600, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 240, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1260, 1200, 672, 120, 0, 174]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 0}, [1140, 1200, 672, 120, 0, 312]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 0, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 0, 120, 0, 294])], 4: [({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 160, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 0, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 0, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 20, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 2240, 160, 800, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 320, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1680, 1600, 896, 160, 0, 232]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 0}, [1520, 1600, 896, 160, 0, 416]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 0, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 0, 160, 0, 392])], 5: [({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 200, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 0, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 0, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 20, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 2800, 200, 1000, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 400, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [2100, 2000, 1120, 200, 0, 290]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 0}, [1900, 2000, 1120, 200, 0, 520]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 0, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 0, 200, 0, 490])]}
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 header content reservation.

Vertical tab strips consume pane width rather than height, reserve group-header rows, size scroll content from row heights and keep close buttons aligned to the strip trailing edge.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = max(0,x['pane_width']-x['strip_width'])
    r1 = x['pane_height']
    r2 = x['tabs_count']*x['row_height']
    r3 = x['headers']*x['header_height']
    r4 = max(0,x['tabs_count']*x['row_height']-x['pane_height'])
    r5 = x['strip_width']-x['padding']-x['button_width']
    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: [({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 40, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 0, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 0, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 20, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 560, 40, 200, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 80, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [420, 400, 224, 40, 0, 58]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 0}, [380, 400, 224, 40, 0, 104]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 0, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 0, 40, 0, 98])], 2: [({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 80, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 0, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 0, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 20, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 1120, 80, 400, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 160, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [840, 800, 448, 80, 0, 116]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 0}, [760, 800, 448, 80, 0, 208]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 0, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 0, 80, 0, 196])], 3: [({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 120, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 0, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 0, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 20, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 1680, 120, 600, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 240, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1260, 1200, 672, 120, 0, 174]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 0}, [1140, 1200, 672, 120, 0, 312]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 0, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 0, 120, 0, 294])], 4: [({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 160, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 0, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 0, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 20, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 2240, 160, 800, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 320, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1680, 1600, 896, 160, 0, 232]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 0}, [1520, 1600, 896, 160, 0, 416]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 0, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 0, 160, 0, 392])], 5: [({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 200, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 0, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 0, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 20, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 2800, 200, 1000, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 400, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [2100, 2000, 1120, 200, 0, 290]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 0}, [1900, 2000, 1120, 200, 0, 520]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 0, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 0, 200, 0, 490])]}
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 = max(0,x['pane_width']-x['strip_width'])
    r1 = x['pane_height']
    r2 = x['tabs_count']*x['row_height']
    r3 = x['headers']*x['header_height']
    r4 = x['tabs_count']*x['row_height']
    r5 = x['strip_width']-x['padding']-x['button_width']
    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: [({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 40, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 0, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 0, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 20, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 560, 40, 200, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 80, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [420, 400, 224, 40, 0, 58]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 0}, [380, 400, 224, 40, 0, 104]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 0, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 0, 40, 0, 98])], 2: [({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 80, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 0, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 0, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 20, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 1120, 80, 400, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 160, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [840, 800, 448, 80, 0, 116]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 0}, [760, 800, 448, 80, 0, 208]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 0, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 0, 80, 0, 196])], 3: [({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 120, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 0, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 0, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 20, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 1680, 120, 600, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 240, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1260, 1200, 672, 120, 0, 174]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 0}, [1140, 1200, 672, 120, 0, 312]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 0, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 0, 120, 0, 294])], 4: [({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 160, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 0, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 0, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 20, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 2240, 160, 800, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 320, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1680, 1600, 896, 160, 0, 232]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 0}, [1520, 1600, 896, 160, 0, 416]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 0, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 0, 160, 0, 392])], 5: [({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 200, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 0, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 0, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 20, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 2800, 200, 1000, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 400, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [2100, 2000, 1120, 200, 0, 290]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 0}, [1900, 2000, 1120, 200, 0, 520]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 0, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 0, 200, 0, 490])]}
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 scroll range.

Vertical tab strips consume pane width rather than height, reserve group-header rows, size scroll content from row heights and keep close buttons aligned to the strip trailing edge.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = max(0,x['pane_width']-x['strip_width'])
    r1 = x['pane_height']
    r2 = x['tabs_count']*x['row_height']
    r3 = x['headers']*x['header_height']
    r4 = max(0,x['tabs_count']*x['row_height']+x['headers']*x['header_height']-x['pane_height'])
    r5 = x['pane_width']-x['padding']-x['button_width']
    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: [({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 40, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 0, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 0, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 20, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 560, 40, 200, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 80, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [420, 400, 224, 40, 0, 58]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 0}, [380, 400, 224, 40, 0, 104]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 0, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 0, 40, 0, 98])], 2: [({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 80, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 0, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 0, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 20, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 1120, 80, 400, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 160, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [840, 800, 448, 80, 0, 116]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 0}, [760, 800, 448, 80, 0, 208]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 0, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 0, 80, 0, 196])], 3: [({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 120, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 0, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 0, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 20, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 1680, 120, 600, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 240, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1260, 1200, 672, 120, 0, 174]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 0}, [1140, 1200, 672, 120, 0, 312]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 0, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 0, 120, 0, 294])], 4: [({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 160, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 0, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 0, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 20, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 2240, 160, 800, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 320, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1680, 1600, 896, 160, 0, 232]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 0}, [1520, 1600, 896, 160, 0, 416]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 0, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 0, 160, 0, 392])], 5: [({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 200, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 0, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 0, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 20, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 2800, 200, 1000, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 400, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [2100, 2000, 1120, 200, 0, 290]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 0}, [1900, 2000, 1120, 200, 0, 520]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 0, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 0, 200, 0, 490])]}
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 = max(0,x['pane_width']-x['strip_width'])
    r1 = x['pane_height']
    r2 = x['tabs_count']*x['row_height']
    r3 = x['headers']*x['header_height']
    r4 = max(0,x['tabs_count']*x['row_height']+x['headers']*x['header_height']-x['pane_height'])
    r5 = x['strip_width']-x['button_width']
    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: [({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 40, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 0, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 224, 0, 0, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 20, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 560, 40, 200, 98]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 80, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [420, 400, 224, 40, 0, 58]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 8, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 0}, [380, 400, 224, 40, 0, 104]), ({'pane_width': 500, 'pane_height': 400, 'strip_width': 120, 'row_height': 28, 'tabs_count': 0, 'headers': 2, 'header_height': 20, 'button_width': 16, 'padding': 6}, [380, 400, 0, 40, 0, 98])], 2: [({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 80, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 0, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 448, 0, 0, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 20, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 1120, 80, 400, 196]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 160, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [840, 800, 448, 80, 0, 116]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 8, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 0}, [760, 800, 448, 80, 0, 208]), ({'pane_width': 1000, 'pane_height': 800, 'strip_width': 240, 'row_height': 56, 'tabs_count': 0, 'headers': 2, 'header_height': 40, 'button_width': 32, 'padding': 12}, [760, 800, 0, 80, 0, 196])], 3: [({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 120, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 0, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 672, 0, 0, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 20, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 1680, 120, 600, 294]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 240, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1260, 1200, 672, 120, 0, 174]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 8, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 0}, [1140, 1200, 672, 120, 0, 312]), ({'pane_width': 1500, 'pane_height': 1200, 'strip_width': 360, 'row_height': 84, 'tabs_count': 0, 'headers': 2, 'header_height': 60, 'button_width': 48, 'padding': 18}, [1140, 1200, 0, 120, 0, 294])], 4: [({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 160, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 0, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 896, 0, 0, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 20, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 2240, 160, 800, 392]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 320, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1680, 1600, 896, 160, 0, 232]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 8, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 0}, [1520, 1600, 896, 160, 0, 416]), ({'pane_width': 2000, 'pane_height': 1600, 'strip_width': 480, 'row_height': 112, 'tabs_count': 0, 'headers': 2, 'header_height': 80, 'button_width': 64, 'padding': 24}, [1520, 1600, 0, 160, 0, 392])], 5: [({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 200, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 0, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 1120, 0, 0, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 20, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 2800, 200, 1000, 490]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 400, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [2100, 2000, 1120, 200, 0, 290]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 8, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 0}, [1900, 2000, 1120, 200, 0, 520]), ({'pane_width': 2500, 'pane_height': 2000, 'strip_width': 600, 'row_height': 140, 'tabs_count': 0, 'headers': 2, 'header_height': 100, 'button_width': 80, 'padding': 30}, [1900, 2000, 0, 200, 0, 490])]}
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 close button x.

Vertical tab strips consume pane width rather than height, reserve group-header rows, size scroll content from row heights and keep close buttons aligned to the strip trailing edge.

split: open-access


prompt:
The tab workspace reports an incorrect old anchor origin.

When tab widths change, keep the anchored tab at the same viewport coordinate using sums of preceding widths, then clamp to the new content range.

split: open-access


prompt:
The tab workspace reports an incorrect new anchor origin.

When tab widths change, keep the anchored tab at the same viewport coordinate using sums of preceding widths, then clamp to the new content range.

split: open-access


prompt:
The tab workspace reports an incorrect anchor screen coordinate.

When tab widths change, keep the anchored tab at the same viewport coordinate using sums of preceding widths, then clamp to the new content range.

split: open-access


prompt:
The tab workspace reports an incorrect resize scroll delta.

When tab widths change, keep the anchored tab at the same viewport coordinate using sums of preceding widths, then clamp to the new content range.

split: open-access


prompt:
The tab workspace reports an incorrect new content limit.

When tab widths change, keep the anchored tab at the same viewport coordinate using sums of preceding widths, then clamp to the new content range.

split: open-access


prompt:
The tab workspace reports an incorrect anchored scroll clamp.

When tab widths change, keep the anchored tab at the same viewport coordinate using sums of preceding widths, then clamp to the new content range.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = x['icon']+x['gap']
    r1 = x['dirty_width']+x['gap'] if x['dirty'] else 0
    r2 = x['close_width']+x['gap'] if x['close'] else 0
    r3 = 2*x['padding']
    r4 = max(0,x['width']-2*x['padding']-(x['icon']+x['gap'] if x['icon_visible'] else 0)-(x['dirty_width']+x['gap'] if x['dirty'] else 0)-(x['close_width']+x['gap'] if x['close'] else 0))
    r5 = x['title_width']>max(0,x['width']-2*x['padding']-(x['icon']+x['gap'] if x['icon_visible'] else 0)-(x['dirty_width']+x['gap'] if x['dirty'] else 0)-(x['close_width']+x['gap'] if x['close'] else 0))
    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: [({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 22, 16, 72, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': False, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [0, 10, 22, 16, 92, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': False, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 0, 22, 16, 82, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': False, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 0, 16, 94, True]), ({'width': 220, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 22, 16, 152, False]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 0, 'title_width': 110}, [16, 6, 18, 16, 84, True])], 2: [({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 44, 32, 144, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': False, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [0, 20, 44, 32, 184, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': False, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 0, 44, 32, 164, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': False, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 0, 32, 188, True]), ({'width': 440, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 44, 32, 304, False]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 0, 'title_width': 220}, [32, 12, 36, 32, 168, True])], 3: [({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 66, 48, 216, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': False, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [0, 30, 66, 48, 276, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': False, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 0, 66, 48, 246, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': False, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 0, 48, 282, True]), ({'width': 660, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 66, 48, 456, False]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 0, 'title_width': 330}, [48, 18, 54, 48, 252, True])], 4: [({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 88, 64, 288, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': False, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [0, 40, 88, 64, 368, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': False, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 0, 88, 64, 328, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': False, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 0, 64, 376, True]), ({'width': 880, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 88, 64, 608, False]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 0, 'title_width': 440}, [64, 24, 72, 64, 336, True])], 5: [({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 110, 80, 360, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': False, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [0, 50, 110, 80, 460, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': False, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 0, 110, 80, 410, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': False, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 0, 80, 470, True]), ({'width': 1100, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 110, 80, 760, False]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 0, 'title_width': 550}, [80, 30, 90, 80, 420, True])]}
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['icon'] if x['icon_visible'] else 0
    r1 = x['dirty_width']+x['gap'] if x['dirty'] else 0
    r2 = x['close_width']+x['gap'] if x['close'] else 0
    r3 = 2*x['padding']
    r4 = max(0,x['width']-2*x['padding']-(x['icon']+x['gap'] if x['icon_visible'] else 0)-(x['dirty_width']+x['gap'] if x['dirty'] else 0)-(x['close_width']+x['gap'] if x['close'] else 0))
    r5 = x['title_width']>max(0,x['width']-2*x['padding']-(x['icon']+x['gap'] if x['icon_visible'] else 0)-(x['dirty_width']+x['gap'] if x['dirty'] else 0)-(x['close_width']+x['gap'] if x['close'] else 0))
    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: [({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 22, 16, 72, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': False, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [0, 10, 22, 16, 92, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': False, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 0, 22, 16, 82, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': False, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 0, 16, 94, True]), ({'width': 220, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 22, 16, 152, False]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 0, 'title_width': 110}, [16, 6, 18, 16, 84, True])], 2: [({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 44, 32, 144, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': False, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [0, 20, 44, 32, 184, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': False, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 0, 44, 32, 164, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': False, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 0, 32, 188, True]), ({'width': 440, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 44, 32, 304, False]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 0, 'title_width': 220}, [32, 12, 36, 32, 168, True])], 3: [({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 66, 48, 216, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': False, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [0, 30, 66, 48, 276, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': False, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 0, 66, 48, 246, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': False, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 0, 48, 282, True]), ({'width': 660, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 66, 48, 456, False]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 0, 'title_width': 330}, [48, 18, 54, 48, 252, True])], 4: [({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 88, 64, 288, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': False, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [0, 40, 88, 64, 368, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': False, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 0, 88, 64, 328, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': False, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 0, 64, 376, True]), ({'width': 880, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 88, 64, 608, False]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 0, 'title_width': 440}, [64, 24, 72, 64, 336, True])], 5: [({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 110, 80, 360, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': False, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [0, 50, 110, 80, 460, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': False, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 0, 110, 80, 410, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': False, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 0, 80, 470, True]), ({'width': 1100, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 110, 80, 760, False]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 0, 'title_width': 550}, [80, 30, 90, 80, 420, True])]}
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 icon footprint.

Tab label layout reserves distinct icon, dirty marker, close button and padding footprints before truncating the title; absent decorations consume no width.

split: open-access


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

N = 1
observations = []
def solve(x):
    r0 = x['icon']+x['gap'] if x['icon_visible'] else 0
    r1 = 0
    r2 = x['close_width']+x['gap'] if x['close'] else 0
    r3 = 2*x['padding']
    r4 = max(0,x['width']-2*x['padding']-(x['icon']+x['gap'] if x['icon_visible'] else 0)-(x['dirty_width']+x['gap'] if x['dirty'] else 0)-(x['close_width']+x['gap'] if x['close'] else 0))
    r5 = x['title_width']>max(0,x['width']-2*x['padding']-(x['icon']+x['gap'] if x['icon_visible'] else 0)-(x['dirty_width']+x['gap'] if x['dirty'] else 0)-(x['close_width']+x['gap'] if x['close'] else 0))
    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: [({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 22, 16, 72, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': False, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [0, 10, 22, 16, 92, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': False, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 0, 22, 16, 82, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': False, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 0, 16, 94, True]), ({'width': 220, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 22, 16, 152, False]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 0, 'title_width': 110}, [16, 6, 18, 16, 84, True])], 2: [({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 44, 32, 144, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': False, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [0, 20, 44, 32, 184, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': False, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 0, 44, 32, 164, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': False, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 0, 32, 188, True]), ({'width': 440, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 44, 32, 304, False]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 0, 'title_width': 220}, [32, 12, 36, 32, 168, True])], 3: [({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 66, 48, 216, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': False, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [0, 30, 66, 48, 276, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': False, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 0, 66, 48, 246, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': False, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 0, 48, 282, True]), ({'width': 660, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 66, 48, 456, False]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 0, 'title_width': 330}, [48, 18, 54, 48, 252, True])], 4: [({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 88, 64, 288, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': False, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [0, 40, 88, 64, 368, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': False, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 0, 88, 64, 328, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': False, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 0, 64, 376, True]), ({'width': 880, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 88, 64, 608, False]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 0, 'title_width': 440}, [64, 24, 72, 64, 336, True])], 5: [({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 110, 80, 360, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': False, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [0, 50, 110, 80, 460, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': False, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 0, 110, 80, 410, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': False, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 0, 80, 470, True]), ({'width': 1100, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 110, 80, 760, False]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 0, 'title_width': 550}, [80, 30, 90, 80, 420, True])]}
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['icon']+x['gap'] if x['icon_visible'] else 0
    r1 = x['dirty_width'] if x['dirty'] else 0
    r2 = x['close_width']+x['gap'] if x['close'] else 0
    r3 = 2*x['padding']
    r4 = max(0,x['width']-2*x['padding']-(x['icon']+x['gap'] if x['icon_visible'] else 0)-(x['dirty_width']+x['gap'] if x['dirty'] else 0)-(x['close_width']+x['gap'] if x['close'] else 0))
    r5 = x['title_width']>max(0,x['width']-2*x['padding']-(x['icon']+x['gap'] if x['icon_visible'] else 0)-(x['dirty_width']+x['gap'] if x['dirty'] else 0)-(x['close_width']+x['gap'] if x['close'] else 0))
    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: [({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 22, 16, 72, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': False, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [0, 10, 22, 16, 92, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': False, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 0, 22, 16, 82, True]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': False, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 0, 16, 94, True]), ({'width': 220, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 4, 'title_width': 110}, [20, 10, 22, 16, 152, False]), ({'width': 140, 'padding': 8, 'icon': 16, 'icon_visible': True, 'dirty': True, 'dirty_width': 6, 'close': True, 'close_width': 18, 'gap': 0, 'title_width': 110}, [16, 6, 18, 16, 84, True])], 2: [({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 44, 32, 144, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': False, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [0, 20, 44, 32, 184, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': False, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 0, 44, 32, 164, True]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': False, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 0, 32, 188, True]), ({'width': 440, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 8, 'title_width': 220}, [40, 20, 44, 32, 304, False]), ({'width': 280, 'padding': 16, 'icon': 32, 'icon_visible': True, 'dirty': True, 'dirty_width': 12, 'close': True, 'close_width': 36, 'gap': 0, 'title_width': 220}, [32, 12, 36, 32, 168, True])], 3: [({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 66, 48, 216, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': False, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [0, 30, 66, 48, 276, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': False, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 0, 66, 48, 246, True]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': False, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 0, 48, 282, True]), ({'width': 660, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 12, 'title_width': 330}, [60, 30, 66, 48, 456, False]), ({'width': 420, 'padding': 24, 'icon': 48, 'icon_visible': True, 'dirty': True, 'dirty_width': 18, 'close': True, 'close_width': 54, 'gap': 0, 'title_width': 330}, [48, 18, 54, 48, 252, True])], 4: [({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 88, 64, 288, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': False, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [0, 40, 88, 64, 368, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': False, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 0, 88, 64, 328, True]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': False, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 0, 64, 376, True]), ({'width': 880, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 16, 'title_width': 440}, [80, 40, 88, 64, 608, False]), ({'width': 560, 'padding': 32, 'icon': 64, 'icon_visible': True, 'dirty': True, 'dirty_width': 24, 'close': True, 'close_width': 72, 'gap': 0, 'title_width': 440}, [64, 24, 72, 64, 336, True])], 5: [({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 110, 80, 360, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': False, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [0, 50, 110, 80, 460, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': False, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 0, 110, 80, 410, True]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': False, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 0, 80, 470, True]), ({'width': 1100, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 20, 'title_width': 550}, [100, 50, 110, 80, 760, False]), ({'width': 700, 'padding': 40, 'icon': 80, 'icon_visible': True, 'dirty': True, 'dirty_width': 30, 'close': True, 'close_width': 90, 'gap': 0, 'title_width': 550}, [80, 30, 90, 80, 420, True])]}
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 dirty footprint.

Tab label layout reserves distinct icon, dirty marker, close button and padding footprints before truncating the title; absent decorations consume no width.

split: open-access