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

N = 1
observations = []
def solve(cols, order, hidden, widths, minimum, maximum, default):
    by_id = {c['id']: c for c in cols}
    ids = [c for c in order if c in by_id and c not in hidden]
    ids += [c['id'] for c in cols if c['id'] not in order and c['id'] not in hidden]
    resolved = {c: max(minimum.get(c, 0), min(maximum.get(c, 10000), widths.get(c, by_id[c].get('width', default)))) for c in ids}
    starts = {c: sum(resolved[x] for x in ids[:i]) for i,c in enumerate(ids)}
    return {'ids': ids, 'widths': resolved, 'starts': starts, 'total': sum(resolved.values()), 'resizable': ids, 'handles': [c for c in ids[:-1] if by_id[c].get('resize', True)], 'last': ids[-1] if ids else None}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*1}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 12, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 12, 'c': 22}, 'total': 42, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 2:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*2}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 24, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 24, 'c': 34}, 'total': 54, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 3:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*3}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 36, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 36, 'c': 46}, 'total': 66, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 4:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*4}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 48, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 48, 'c': 58}, 'total': 78, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 5:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*5}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 60, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 60, 'c': 70}, 'total': 90, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

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(cols, order, hidden, widths, minimum, maximum, default):
    by_id = {c['id']: c for c in cols}
    ids = [c for c in order if c in by_id and c not in hidden]
    ids += [c['id'] for c in cols if c['id'] not in order and c['id'] not in hidden]
    resolved = {c: max(minimum.get(c, 0), min(maximum.get(c, 10000), widths.get(c, by_id[c].get('width', default)))) for c in ids}
    starts = {c: sum(resolved[x] for x in ids[:i]) for i,c in enumerate(ids)}
    return {'ids': ids, 'widths': resolved, 'starts': starts, 'total': sum(resolved.values()), 'resizable': [c for c in ids if by_id[c].get('resize', False)], 'handles': [c for c in ids[:-1] if by_id[c].get('resize', True)], 'last': ids[-1] if ids else None}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*1}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 12, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 12, 'c': 22}, 'total': 42, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 2:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*2}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 24, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 24, 'c': 34}, 'total': 54, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 3:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*3}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 36, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 36, 'c': 46}, 'total': 66, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 4:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*4}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 48, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 48, 'c': 58}, 'total': 78, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 5:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*5}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 60, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 60, 'c': 70}, 'total': 90, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

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 table resizable policy result violates the stipulated column track resolution contract.

Resolve unique schema IDs in saved order then append unlisted visible columns; clamp widths to per-column bounds, keep explicit zero, compute prefix starts, omit a terminal resize handle, and use None for no terminal column.

split: open-access


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

N = 1
observations = []
def solve(cols, order, hidden, widths, minimum, maximum, default):
    by_id = {c['id']: c for c in cols}
    ids = [c for c in order if c in by_id and c not in hidden]
    ids += [c['id'] for c in cols if c['id'] not in order and c['id'] not in hidden]
    resolved = {c: max(minimum.get(c, 0), min(maximum.get(c, 10000), widths.get(c, by_id[c].get('width', default)))) for c in ids}
    starts = {c: sum(resolved[x] for x in ids[:i]) for i,c in enumerate(ids)}
    return {'ids': ids, 'widths': resolved, 'starts': starts, 'total': sum(resolved.values()), 'resizable': [c for c in ids if by_id[c].get('resize', True)], 'handles': [c for c in ids if by_id[c].get('resize', True)], 'last': ids[-1] if ids else None}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*1}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 12, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 12, 'c': 22}, 'total': 42, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 2:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*2}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 24, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 24, 'c': 34}, 'total': 54, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 3:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*3}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 36, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 36, 'c': 46}, 'total': 66, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 4:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*4}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 48, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 48, 'c': 58}, 'total': 78, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 5:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*5}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 60, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 60, 'c': 70}, 'total': 90, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

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(cols, order, hidden, widths, minimum, maximum, default):
    by_id = {c['id']: c for c in cols}
    ids = [c for c in order if c in by_id and c not in hidden]
    ids += [c['id'] for c in cols if c['id'] not in order and c['id'] not in hidden]
    resolved = {c: max(minimum.get(c, 0), min(maximum.get(c, 10000), widths.get(c, by_id[c].get('width', default)))) for c in ids}
    starts = {c: sum(resolved[x] for x in ids[:i]) for i,c in enumerate(ids)}
    return {'ids': ids, 'widths': resolved, 'starts': starts, 'total': sum(resolved.values()), 'resizable': [c for c in ids if by_id[c].get('resize', True)], 'handles': [c for c in ids[1:] if by_id[c].get('resize', True)], 'last': ids[-1] if ids else None}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*1}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 12, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 12, 'c': 22}, 'total': 42, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 2:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*2}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 24, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 24, 'c': 34}, 'total': 54, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 3:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*3}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 36, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 36, 'c': 46}, 'total': 66, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 4:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*4}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 48, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 48, 'c': 58}, 'total': 78, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 5:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*5}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 60, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 60, 'c': 70}, 'total': 90, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

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 table terminal handle result violates the stipulated column track resolution contract.

Resolve unique schema IDs in saved order then append unlisted visible columns; clamp widths to per-column bounds, keep explicit zero, compute prefix starts, omit a terminal resize handle, and use None for no terminal column.

split: open-access


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

N = 1
observations = []
def solve(cols, order, hidden, widths, minimum, maximum, default):
    by_id = {c['id']: c for c in cols}
    ids = [c for c in order if c in by_id and c not in hidden]
    ids += [c['id'] for c in cols if c['id'] not in order and c['id'] not in hidden]
    resolved = {c: max(minimum.get(c, 0), min(maximum.get(c, 10000), widths.get(c, by_id[c].get('width', default)))) for c in ids}
    starts = {c: sum(resolved[x] for x in ids[:i]) for i,c in enumerate(ids)}
    return {'ids': ids, 'widths': resolved, 'starts': starts, 'total': sum(resolved.values()), 'resizable': [c for c in ids if by_id[c].get('resize', True)], 'handles': [c for c in ids[:-1] if by_id[c].get('resize', True)], 'last': ids[0] if ids else None}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*1}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 12, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 12, 'c': 22}, 'total': 42, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 2:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*2}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 24, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 24, 'c': 34}, 'total': 54, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 3:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*3}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 36, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 36, 'c': 46}, 'total': 66, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 4:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*4}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 48, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 48, 'c': 58}, 'total': 78, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 5:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*5}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 60, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 60, 'c': 70}, 'total': 90, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

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(cols, order, hidden, widths, minimum, maximum, default):
    by_id = {c['id']: c for c in cols}
    ids = [c for c in order if c in by_id and c not in hidden]
    ids += [c['id'] for c in cols if c['id'] not in order and c['id'] not in hidden]
    resolved = {c: max(minimum.get(c, 0), min(maximum.get(c, 10000), widths.get(c, by_id[c].get('width', default)))) for c in ids}
    starts = {c: sum(resolved[x] for x in ids[:i]) for i,c in enumerate(ids)}
    return {'ids': ids, 'widths': resolved, 'starts': starts, 'total': sum(resolved.values()), 'resizable': [c for c in ids if by_id[c].get('resize', True)], 'handles': [c for c in ids[:-1] if by_id[c].get('resize', True)], 'last': ids[-1] if ids else ""}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*1}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 12, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 12, 'c': 22}, 'total': 42, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 2:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*2}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 24, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 24, 'c': 34}, 'total': 54, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 3:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*3}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 36, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 36, 'c': 46}, 'total': 66, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 4:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*4}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 48, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 48, 'c': 58}, 'total': 78, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

if N == 5:
    check('mixed schema', solve([{'id':'a','width':8,'resize':False},{'id':'b'},{'id':'c','width':30}], ['b','gone','a'], [], {'b':12*5}, {'a':10}, {'c':20}, 7), {'ids': ['b', 'a', 'c'], 'widths': {'b': 60, 'a': 10, 'c': 20}, 'starts': {'b': 0, 'a': 60, 'c': 70}, 'total': 90, 'resizable': ['b', 'c'], 'handles': ['b'], 'last': 'c'})
    check('zero override', solve([{'id':'a','width':8},{'id':'b','width':9}], ['a','b'], [], {'a':0}, {}, {}, 5), {'ids': ['a', 'b'], 'widths': {'a': 0, 'b': 9}, 'starts': {'a': 0, 'b': 0}, 'total': 9, 'resizable': ['a', 'b'], 'handles': ['a'], 'last': 'b'})
    check('multiple hidden', solve([{'id':'a'},{'id':'b'},{'id':'c'},{'id':'d'}], ['a','b','c'], ['a','b','d'], {}, {}, {}, 6), {'ids': ['c'], 'widths': {'c': 6}, 'starts': {'c': 0}, 'total': 6, 'resizable': ['c'], 'handles': [], 'last': 'c'})
    check('empty table', solve([], [], [], {}, {}, {}, 5), {'ids': [], 'widths': {}, 'starts': {}, 'total': 0, 'resizable': [], 'handles': [], 'last': None})
    check('fixed singleton', solve([{'id':'x','resize':False}], ['x'], [], {}, {'x':11}, {'x':11}, 3), {'ids': ['x'], 'widths': {'x': 11}, 'starts': {'x': 0}, 'total': 11, 'resizable': [], 'handles': [], 'last': 'x'})
    check('default tracks', solve([{'id':'q'},{'id':'r'}], [], [], {}, {}, {}, 4), {'ids': ['q', 'r'], 'widths': {'q': 4, 'r': 4}, 'starts': {'q': 0, 'r': 4}, 'total': 8, 'resizable': ['q', 'r'], 'handles': ['q'], 'last': 'r'})

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 table empty terminal result violates the stipulated column track resolution contract.

Resolve unique schema IDs in saved order then append unlisted visible columns; clamp widths to per-column bounds, keep explicit zero, compute prefix starts, omit a terminal resize handle, and use None for no terminal column.

split: open-access


prompt:
The table visibility before pinning result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


prompt:
The table left schema order result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


prompt:
The table left precedence result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


prompt:
The table center exclusion result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


prompt:
The table left prefix result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


prompt:
The table right suffix result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


prompt:
The table center scroll result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


prompt:
The table left reservation result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


prompt:
The table right reservation result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


prompt:
The table left divider result violates the stipulated pinned table panes contract.

Partition visible schema columns into left, center, and right panes; left wins conflicting pin assignments. Pin order follows schema, left offsets are prefixes, right offsets suffixes, only center moves on scroll, reservations exclude hidden tracks.

split: open-access


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

N = 1
observations = []
def solve(leaves, hidden, pins):
    v = [x for x in leaves if True]
    runs=[]
    for x in v:
        pane=pins.get(x['id'], 'center')
        key=(x.get('group'),pane)
        if runs and runs[-1]['key']==key:
            runs[-1]['leaves'].append(x['id'])
            runs[-1]['width']+=x['width']
        else: runs.append({'key':key,'leaves':[x['id']],'width':x['width']})
    return [{'group':r['key'][0], 'pane':r['key'][1], 'span':len(r['leaves']), 'width':r['width'], 'first':r['leaves'][0], 'last':r['leaves'][-1], 'leaf_ids':r['leaves'], 'blank':r['key'][0] is None, 'resizable':len(r['leaves'])>1} for r in runs]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*1},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 5, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

if N == 2:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*2},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

if N == 3:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*3},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 9, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

if N == 4:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*4},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 11, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

if N == 5:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*5},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 13, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

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(leaves, hidden, pins):
    v = [x for x in leaves if x['id'] not in hidden[:1]]
    runs=[]
    for x in v:
        pane=pins.get(x['id'], 'center')
        key=(x.get('group'),pane)
        if runs and runs[-1]['key']==key:
            runs[-1]['leaves'].append(x['id'])
            runs[-1]['width']+=x['width']
        else: runs.append({'key':key,'leaves':[x['id']],'width':x['width']})
    return [{'group':r['key'][0], 'pane':r['key'][1], 'span':len(r['leaves']), 'width':r['width'], 'first':r['leaves'][0], 'last':r['leaves'][-1], 'leaf_ids':r['leaves'], 'blank':r['key'][0] is None, 'resizable':len(r['leaves'])>1} for r in runs]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*1},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 5, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

if N == 2:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*2},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

if N == 3:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*3},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 9, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

if N == 4:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*4},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 11, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

if N == 5:
    check('contiguous group', solve([{'id':'a','group':'G','width':2*5},{'id':'b','group':'G','width':3},{'id':'c','group':'H','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 2, 'width': 13, 'first': 'a', 'last': 'b', 'leaf_ids': ['a', 'b'], 'blank': False, 'resizable': True}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('pin splits group', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], [], {'a':'left'}), [{'group': 'G', 'pane': 'left', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 2, 'width': 7, 'first': 'b', 'last': 'c', 'leaf_ids': ['b', 'c'], 'blank': False, 'resizable': True}])
    check('hidden leaves', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'G','width':3},{'id':'c','group':'G','width':4}], ['a','b'], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('blank versus empty', solve([{'id':'a','width':2},{'id':'b','group':'','width':3}], [], {}), [{'group': None, 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': True, 'resizable': False}, {'group': '', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}])
    check('separated groups', solve([{'id':'a','group':'G','width':2},{'id':'b','group':'H','width':3},{'id':'c','group':'G','width':4}], [], {}), [{'group': 'G', 'pane': 'center', 'span': 1, 'width': 2, 'first': 'a', 'last': 'a', 'leaf_ids': ['a'], 'blank': False, 'resizable': False}, {'group': 'H', 'pane': 'center', 'span': 1, 'width': 3, 'first': 'b', 'last': 'b', 'leaf_ids': ['b'], 'blank': False, 'resizable': False}, {'group': 'G', 'pane': 'center', 'span': 1, 'width': 4, 'first': 'c', 'last': 'c', 'leaf_ids': ['c'], 'blank': False, 'resizable': False}])
    check('empty header', solve([], [], {}), [])

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 table hidden leaf span result violates the stipulated grouped table header runs contract.

Construct contiguous visible leaf runs keyed by exact group and pane, retaining leaf order and width sums. A missing group is a blank placeholder; an empty group string is an actual named group. Group resize handles require at least two visible leaves.

split: open-access