FA-36861 / Table interactions / Open access
Column track resolution: maximum width · case 01
The table maximum width result violates the stipulated column track resolution contract.
ROOT CAUSE
The maximum width decision uses '10000' instead of 'maximum.get(c, 10000)'.
VERIFIED REPAIR
Apply the complete maximum width rule: maximum.get(c, 10000).
Unsuccessful approach: The attempted repair 'maximum.get(c, 10000) + 1' still loses a required part of the table contract.
Case 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.
Why this case matters
An offline table UI model isolates column track resolution, including adversarial row/column relationships.
1 / The failure
Exit 1"""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(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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| mixed schema | {'handles': ['b'], 'ids': ['b', 'a', 'c'], 'last': 'c', 'resizable': ['b', 'c'], 'starts': {'a': 12, 'b': 0, 'c': 22}, 'total': 52, 'widths': {'a': 10, 'b': 12, 'c': 30}} | {'handles': ['b'], 'ids': ['b', 'a', 'c'], 'last': 'c', 'resizable': ['b', 'c'], 'starts': {'a': 12, 'b': 0, 'c': 22}, 'total': 42, 'widths': {'a': 10, 'b': 12, 'c': 20}} | Failed |
| zero override | {'handles': ['a'], 'ids': ['a', 'b'], 'last': 'b', 'resizable': ['a', 'b'], 'starts': {'a': 0, 'b': 0}, 'total': 9, 'widths': {'a': 0, 'b': 9}} | {'handles': ['a'], 'ids': ['a', 'b'], 'last': 'b', 'resizable': ['a', 'b'], 'starts': {'a': 0, 'b': 0}, 'total': 9, 'widths': {'a': 0, 'b': 9}} | Passed |
| multiple hidden | {'handles': [], 'ids': ['c'], 'last': 'c', 'resizable': ['c'], 'starts': {'c': 0}, 'total': 6, 'widths': {'c': 6}} | {'handles': [], 'ids': ['c'], 'last': 'c', 'resizable': ['c'], 'starts': {'c': 0}, 'total': 6, 'widths': {'c': 6}} | Passed |
| empty table | {'handles': [], 'ids': [], 'last': None, 'resizable': [], 'starts': {}, 'total': 0, 'widths': {}} | {'handles': [], 'ids': [], 'last': None, 'resizable': [], 'starts': {}, 'total': 0, 'widths': {}} | Passed |
| fixed singleton | {'handles': [], 'ids': ['x'], 'last': 'x', 'resizable': [], 'starts': {'x': 0}, 'total': 11, 'widths': {'x': 11}} | {'handles': [], 'ids': ['x'], 'last': 'x', 'resizable': [], 'starts': {'x': 0}, 'total': 11, 'widths': {'x': 11}} | Passed |
| default tracks | {'handles': ['q'], 'ids': ['q', 'r'], 'last': 'r', 'resizable': ['q', 'r'], 'starts': {'q': 0, 'r': 4}, 'total': 8, 'widths': {'q': 4, 'r': 4}} | {'handles': ['q'], 'ids': ['q', 'r'], 'last': 'r', 'resizable': ['q', 'r'], 'starts': {'q': 0, 'r': 4}, 'total': 8, 'widths': {'q': 4, 'r': 4}} | Passed |
SHA-256 / 414e0755d1aede0a8330caa88663d40ad7edb254551589de6f840d16d762c051
2 / The unsuccessful fix
Exit 1"""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) + 1, 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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| mixed schema | {'handles': ['b'], 'ids': ['b', 'a', 'c'], 'last': 'c', 'resizable': ['b', 'c'], 'starts': {'a': 12, 'b': 0, 'c': 22}, 'total': 43, 'widths': {'a': 10, 'b': 12, 'c': 21}} | {'handles': ['b'], 'ids': ['b', 'a', 'c'], 'last': 'c', 'resizable': ['b', 'c'], 'starts': {'a': 12, 'b': 0, 'c': 22}, 'total': 42, 'widths': {'a': 10, 'b': 12, 'c': 20}} | Failed |
| zero override | {'handles': ['a'], 'ids': ['a', 'b'], 'last': 'b', 'resizable': ['a', 'b'], 'starts': {'a': 0, 'b': 0}, 'total': 9, 'widths': {'a': 0, 'b': 9}} | {'handles': ['a'], 'ids': ['a', 'b'], 'last': 'b', 'resizable': ['a', 'b'], 'starts': {'a': 0, 'b': 0}, 'total': 9, 'widths': {'a': 0, 'b': 9}} | Passed |
| multiple hidden | {'handles': [], 'ids': ['c'], 'last': 'c', 'resizable': ['c'], 'starts': {'c': 0}, 'total': 6, 'widths': {'c': 6}} | {'handles': [], 'ids': ['c'], 'last': 'c', 'resizable': ['c'], 'starts': {'c': 0}, 'total': 6, 'widths': {'c': 6}} | Passed |
| empty table | {'handles': [], 'ids': [], 'last': None, 'resizable': [], 'starts': {}, 'total': 0, 'widths': {}} | {'handles': [], 'ids': [], 'last': None, 'resizable': [], 'starts': {}, 'total': 0, 'widths': {}} | Passed |
| fixed singleton | {'handles': [], 'ids': ['x'], 'last': 'x', 'resizable': [], 'starts': {'x': 0}, 'total': 11, 'widths': {'x': 11}} | {'handles': [], 'ids': ['x'], 'last': 'x', 'resizable': [], 'starts': {'x': 0}, 'total': 11, 'widths': {'x': 11}} | Passed |
| default tracks | {'handles': ['q'], 'ids': ['q', 'r'], 'last': 'r', 'resizable': ['q', 'r'], 'starts': {'q': 0, 'r': 4}, 'total': 8, 'widths': {'q': 4, 'r': 4}} | {'handles': ['q'], 'ids': ['q', 'r'], 'last': 'r', 'resizable': ['q', 'r'], 'starts': {'q': 0, 'r': 4}, 'total': 8, 'widths': {'q': 4, 'r': 4}} | Passed |
SHA-256 / 67d61580f553fb730255fad3bd0bd88d03927816910de6a495b6f2129968a95b
3 / The verified repair
Exit 0"""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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| mixed schema | {'handles': ['b'], 'ids': ['b', 'a', 'c'], 'last': 'c', 'resizable': ['b', 'c'], 'starts': {'a': 12, 'b': 0, 'c': 22}, 'total': 42, 'widths': {'a': 10, 'b': 12, 'c': 20}} | {'handles': ['b'], 'ids': ['b', 'a', 'c'], 'last': 'c', 'resizable': ['b', 'c'], 'starts': {'a': 12, 'b': 0, 'c': 22}, 'total': 42, 'widths': {'a': 10, 'b': 12, 'c': 20}} | Passed |
| zero override | {'handles': ['a'], 'ids': ['a', 'b'], 'last': 'b', 'resizable': ['a', 'b'], 'starts': {'a': 0, 'b': 0}, 'total': 9, 'widths': {'a': 0, 'b': 9}} | {'handles': ['a'], 'ids': ['a', 'b'], 'last': 'b', 'resizable': ['a', 'b'], 'starts': {'a': 0, 'b': 0}, 'total': 9, 'widths': {'a': 0, 'b': 9}} | Passed |
| multiple hidden | {'handles': [], 'ids': ['c'], 'last': 'c', 'resizable': ['c'], 'starts': {'c': 0}, 'total': 6, 'widths': {'c': 6}} | {'handles': [], 'ids': ['c'], 'last': 'c', 'resizable': ['c'], 'starts': {'c': 0}, 'total': 6, 'widths': {'c': 6}} | Passed |
| empty table | {'handles': [], 'ids': [], 'last': None, 'resizable': [], 'starts': {}, 'total': 0, 'widths': {}} | {'handles': [], 'ids': [], 'last': None, 'resizable': [], 'starts': {}, 'total': 0, 'widths': {}} | Passed |
| fixed singleton | {'handles': [], 'ids': ['x'], 'last': 'x', 'resizable': [], 'starts': {'x': 0}, 'total': 11, 'widths': {'x': 11}} | {'handles': [], 'ids': ['x'], 'last': 'x', 'resizable': [], 'starts': {'x': 0}, 'total': 11, 'widths': {'x': 11}} | Passed |
| default tracks | {'handles': ['q'], 'ids': ['q', 'r'], 'last': 'r', 'resizable': ['q', 'r'], 'starts': {'q': 0, 'r': 4}, 'total': 8, 'widths': {'q': 4, 'r': 4}} | {'handles': ['q'], 'ids': ['q', 'r'], 'last': 'r', 'resizable': ['q', 'r'], 'starts': {'q': 0, 'r': 4}, 'total': 8, 'widths': {'q': 4, 'r': 4}} | Passed |
SHA-256 / 112073f4da16d83a932d9add5a920460ba3a6e6a77aa94f4b73f4bf7c6703959
Verification & scope
Schema IDs are unique; width bounds satisfy 0 <= minimum <= maximum. Deterministic offline table UI model; no browser, DOM, framework, or standards conformance is claimed. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:42:55.552268+00:00.
Case digest / 3fe5719ab9a1a853b8ec21659b8dd7f437b92b9b466c8e27549591ba1720af14