FAILURE MAP
← Case archive

FA-37961 / Table interactions / Open access

Table column auto-fit measurement: cell icon width · case 01

The table cell icon width result violates the stipulated table column auto-fit measurement contract.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The cell icon width decision uses '' instead of "+c.get('icon_width',0)".

VERIFIED REPAIR

Apply the complete cell icon width rule: +c.get('icon_width',0).

Unsuccessful approach: The attempted repair '+icons' still loses a required part of the table contract.

Case contract

Auto-fit measures only this column’s visible measured cells, includes indentation and cell icons, optionally measures header text plus both controls, takes the widest content, adds two-sided padding and reserved icons, clamps bounds, and reports changes in either direction.

Why this case matters

An offline table UI model isolates table column auto-fit measurement, 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(column, cells, header, padding, minimum, maximum, include_header, icons, current):
    eligible=[c for c in cells if c['column']==column and not c.get('hidden') and c.get('measured',True)]
    widths=[c['text_width']+c.get('indent',0) for c in eligible]
    if include_header: widths.append(header['text_width']+header.get('sort_width',0)+header.get('menu_width',0))
    content=max(widths,default=0)
    result=max(minimum,min(maximum,content+2*padding+icons))
    return {'width':result,'changed':result!=current,'samples':len(eligible),'header_used':include_header,'clipped':content+2*padding+icons>maximum}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':1+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 21, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 2:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':2+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 22, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 3:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':3+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 23, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 4:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':4+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 24, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 5:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':5+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 25, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

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 fixtureActualExpectedOutcome
varied cell decorations{'changed': True, 'clipped': False, 'header_used': True, 'samples': 2, 'width': 17}{'changed': True, 'clipped': False, 'header_used': True, 'samples': 2, 'width': 21}Failed
hidden and unmeasured{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 6}{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 6}Passed
header wider{'changed': True, 'clipped': False, 'header_used': True, 'samples': 1, 'width': 15}{'changed': True, 'clipped': False, 'header_used': True, 'samples': 1, 'width': 15}Passed
header excluded{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 4}{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 4}Passed
empty with header{'changed': True, 'clipped': False, 'header_used': True, 'samples': 0, 'width': 14}{'changed': True, 'clipped': False, 'header_used': True, 'samples': 0, 'width': 14}Passed
clipped sample{'changed': False, 'clipped': True, 'header_used': False, 'samples': 1, 'width': 20}{'changed': False, 'clipped': True, 'header_used': False, 'samples': 1, 'width': 20}Passed
empty without header{'changed': False, 'clipped': False, 'header_used': False, 'samples': 0, 'width': 5}{'changed': False, 'clipped': False, 'header_used': False, 'samples': 0, 'width': 5}Passed

SHA-256 / 5d7c6b212c41fa2125a59578697e24bed33bdc8b980bcc2e137993b16121811b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(column, cells, header, padding, minimum, maximum, include_header, icons, current):
    eligible=[c for c in cells if c['column']==column and not c.get('hidden') and c.get('measured',True)]
    widths=[c['text_width']+c.get('indent',0)+icons for c in eligible]
    if include_header: widths.append(header['text_width']+header.get('sort_width',0)+header.get('menu_width',0))
    content=max(widths,default=0)
    result=max(minimum,min(maximum,content+2*padding+icons))
    return {'width':result,'changed':result!=current,'samples':len(eligible),'header_used':include_header,'clipped':content+2*padding+icons>maximum}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':1+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 21, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 2:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':2+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 22, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 3:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':3+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 23, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 4:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':4+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 24, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 5:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':5+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 25, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

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 fixtureActualExpectedOutcome
varied cell decorations{'changed': True, 'clipped': False, 'header_used': True, 'samples': 2, 'width': 18}{'changed': True, 'clipped': False, 'header_used': True, 'samples': 2, 'width': 21}Failed
hidden and unmeasured{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 6}{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 6}Passed
header wider{'changed': True, 'clipped': False, 'header_used': True, 'samples': 1, 'width': 15}{'changed': True, 'clipped': False, 'header_used': True, 'samples': 1, 'width': 15}Passed
header excluded{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 4}{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 4}Passed
empty with header{'changed': True, 'clipped': False, 'header_used': True, 'samples': 0, 'width': 14}{'changed': True, 'clipped': False, 'header_used': True, 'samples': 0, 'width': 14}Passed
clipped sample{'changed': False, 'clipped': True, 'header_used': False, 'samples': 1, 'width': 20}{'changed': False, 'clipped': True, 'header_used': False, 'samples': 1, 'width': 20}Passed
empty without header{'changed': False, 'clipped': False, 'header_used': False, 'samples': 0, 'width': 5}{'changed': False, 'clipped': False, 'header_used': False, 'samples': 0, 'width': 5}Passed

SHA-256 / 95a47761790d9f2d45e43c33a031d9c89502a6e0752b1826bbea8c065cfc642c

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(column, cells, header, padding, minimum, maximum, include_header, icons, current):
    eligible=[c for c in cells if c['column']==column and not c.get('hidden') and c.get('measured',True)]
    widths=[c['text_width']+c.get('indent',0)+c.get('icon_width',0) for c in eligible]
    if include_header: widths.append(header['text_width']+header.get('sort_width',0)+header.get('menu_width',0))
    content=max(widths,default=0)
    result=max(minimum,min(maximum,content+2*padding+icons))
    return {'width':result,'changed':result!=current,'samples':len(eligible),'header_used':include_header,'clipped':content+2*padding+icons>maximum}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':1+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 21, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 2:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':2+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 22, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 3:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':3+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 23, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 4:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':4+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 24, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

if N == 5:
    check('varied cell decorations', solve('amount', [{'column':'amount','text_width':5+8,'indent':3,'icon_width':4},{'column':'amount','text_width':7},{'column':'other','text_width':90}], {'text_width':5,'sort_width':3,'menu_width':2}, 2, 1, 100, True, 1, 30), {'width': 25, 'changed': True, 'samples': 2, 'header_used': True, 'clipped': False})
    check('hidden and unmeasured', solve('a', [{'column':'a','text_width':90,'hidden':True},{'column':'a','text_width':80,'measured':False},{'column':'a','text_width':4,'offscreen':True}], {'text_width':2}, 1, 1, 100, False, 0, 6), {'width': 6, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('header wider', solve('a', [{'column':'a','text_width':2}], {'text_width':8,'sort_width':3,'menu_width':2}, 1, 1, 100, True, 0, 1), {'width': 15, 'changed': True, 'samples': 1, 'header_used': True, 'clipped': False})
    check('header excluded', solve('a', [{'column':'a','text_width':2}], {'text_width':30}, 1, 1, 100, False, 0, 4), {'width': 4, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': False})
    check('empty with header', solve('a', [], {'text_width':10}, 2, 1, 100, True, 0, 1), {'width': 14, 'changed': True, 'samples': 0, 'header_used': True, 'clipped': False})
    check('clipped sample', solve('a', [{'column':'a','text_width':50}], {'text_width':2}, 2, 5, 20, False, 1, 20), {'width': 20, 'changed': False, 'samples': 1, 'header_used': False, 'clipped': True})
    check('empty without header', solve('a', [], {'text_width':10}, 0, 5, 20, False, 0, 5), {'width': 5, 'changed': False, 'samples': 0, 'header_used': False, 'clipped': False})

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 fixtureActualExpectedOutcome
varied cell decorations{'changed': True, 'clipped': False, 'header_used': True, 'samples': 2, 'width': 21}{'changed': True, 'clipped': False, 'header_used': True, 'samples': 2, 'width': 21}Passed
hidden and unmeasured{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 6}{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 6}Passed
header wider{'changed': True, 'clipped': False, 'header_used': True, 'samples': 1, 'width': 15}{'changed': True, 'clipped': False, 'header_used': True, 'samples': 1, 'width': 15}Passed
header excluded{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 4}{'changed': False, 'clipped': False, 'header_used': False, 'samples': 1, 'width': 4}Passed
empty with header{'changed': True, 'clipped': False, 'header_used': True, 'samples': 0, 'width': 14}{'changed': True, 'clipped': False, 'header_used': True, 'samples': 0, 'width': 14}Passed
clipped sample{'changed': False, 'clipped': True, 'header_used': False, 'samples': 1, 'width': 20}{'changed': False, 'clipped': True, 'header_used': False, 'samples': 1, 'width': 20}Passed
empty without header{'changed': False, 'clipped': False, 'header_used': False, 'samples': 0, 'width': 5}{'changed': False, 'clipped': False, 'header_used': False, 'samples': 0, 'width': 5}Passed

SHA-256 / db6fff2ef3683eba1c65be3774ffa033e6ff18a7152bc71b7806940d95ba4b6c

Verification & scope

Measurements, padding, and reserved decorations are nonnegative finite widths; minimum does not exceed 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:43:06.385932+00:00.

Case digest / b55fc47d0f87cca0ac0d9c71bda5da25c2c5f2307de485adb83c32944f4c3eb2