FA-36881 / Table interactions / Open access
Column track resolution: terminal handle · case 01
The table terminal handle result violates the stipulated column track resolution contract.
ROOT CAUSE
The terminal handle decision uses 'ids' instead of 'ids[:-1]'.
VERIFIED REPAIR
Apply the complete terminal handle rule: ids[:-1].
Unsuccessful approach: The attempted repair 'ids[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(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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| mixed schema | {'handles': ['b', 'c'], '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}} | Failed |
| zero override | {'handles': ['a', 'b'], '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}} | Failed |
| multiple hidden | {'handles': ['c'], '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}} | Failed |
| 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', 'r'], '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}} | Failed |
SHA-256 / e3d132ba39704e41aca1b35934b7021f3ca3363d4a60e41a9afe4d8ccbb93606
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), 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': ['c'], '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}} | Failed |
| zero override | {'handles': ['b'], '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}} | Failed |
| 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': ['r'], '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}} | Failed |
SHA-256 / c165761666868e660a5630e8e12a11c33a33bfc132f681f29c3b6655cff8a109
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.660869+00:00.
Case digest / 868ce5aa6a96a7383165cd86f6c0fd2ae8c2c8dc1924a92dbb75ae05e5b85e80