FA-37501 / Table interactions / Open access
Table row height measurement cache: column width validity · case 01
The table column width validity result violates the stipulated table row height measurement cache contract.
ROOT CAUSE
The column width validity decision uses 'True' instead of "m['width_key']==width_key".
THE FAILURE
The column width validity decision uses 'True' instead of "m['width_key']==width_key".
Unsuccessful approach: The attempted repair "str(m['width_key'])==str(width_key)" still loses a required part of the table contract.
Case contract
Measured row heights are keyed by stable row ID plus row-data generation and column-width fingerprint. Invalid measurements use an estimate, minimum applies before detail height, positions are ordered prefixes, and stale row measurements are pruned.
Why this case matters
An offline table UI model isolates table row height measurement cache, 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(rows, measurements, generation, width_key, minimum, estimate, details):
heights={}
for r in rows:
k=r['id']; m=measurements.get(k)
valid=m is not None and m['generation']==generation and True
h=m['height'] if valid else estimate
heights[k]=max(minimum,h)+details.get(k,0)
ids=[r['id'] for r in rows]
offsets={k:sum(heights[x] for x in ids[:i]) for i,k in enumerate(ids)}
return {'heights':heights,'offsets':offsets,'total':sum(heights.values()),'remeasure':[r['id'] for r in rows if r['id'] not in measurements or measurements[r['id']]['generation']!=generation or measurements[r['id']]['width_key']!=width_key],'retained':{k:v for k,v in measurements.items() if k in ids}}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 7, 'b': 8}, 'offsets': {'a': 0, 'b': 7}, 'total': 15, 'remeasure': [], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
if N == 2:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':2+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 8, 'b': 8}, 'offsets': {'a': 0, 'b': 8}, 'total': 16, 'remeasure': [], 'retained': {'a': {'height': 5, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
if N == 3:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':3+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 9, 'b': 8}, 'offsets': {'a': 0, 'b': 9}, 'total': 17, 'remeasure': [], 'retained': {'a': {'height': 6, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
if N == 4:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':4+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 10, 'b': 8}, 'offsets': {'a': 0, 'b': 10}, 'total': 18, 'remeasure': [], 'retained': {'a': {'height': 7, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
if N == 5:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':5+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 11, 'b': 8}, 'offsets': {'a': 0, 'b': 11}, 'total': 19, 'remeasure': [], 'retained': {'a': {'height': 8, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
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 |
|---|---|---|---|
| fresh variable rows | {'heights': {'a': 7, 'b': 8}, 'offsets': {'a': 0, 'b': 7}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 'w'}, 'b': {'generation': 2, 'height': 8, 'width_key': 'w'}}, 'total': 15} | {'heights': {'a': 7, 'b': 8}, 'offsets': {'a': 0, 'b': 7}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 'w'}, 'b': {'generation': 2, 'height': 8, 'width_key': 'w'}}, 'total': 15} | Passed |
| stale generation | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 1, 'height': 4, 'width_key': 'w'}}, 'total': 10} | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 1, 'height': 4, 'width_key': 'w'}}, 'total': 10} | Passed |
| changed widths | {'heights': {'a': 4}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 'old'}}, 'total': 4} | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 'old'}}, 'total': 10} | Failed |
| typed width key | {'heights': {'a': 4}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 1}}, 'total': 4} | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 1}}, 'total': 10} | Failed |
| zero and stale id | {'heights': {'a': 0}, 'offsets': {'a': 0}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 0, 'width_key': 'w'}}, 'total': 0} | {'heights': {'a': 0}, 'offsets': {'a': 0}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 0, 'width_key': 'w'}}, 'total': 0} | Passed |
| minimum clamp | {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'remeasure': ['b'], 'retained': {'a': {'generation': 2, 'height': 1, 'width_key': 'w'}}, 'total': 15} | {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'remeasure': ['b'], 'retained': {'a': {'generation': 2, 'height': 1, 'width_key': 'w'}}, 'total': 15} | Passed |
| empty | {'heights': {}, 'offsets': {}, 'remeasure': [], 'retained': {}, 'total': 0} | {'heights': {}, 'offsets': {}, 'remeasure': [], 'retained': {}, 'total': 0} | Passed |
SHA-256 / 54b43ccf631a8bc133b1f95fa49579ab3f1b6e4bae878b039e6a45ad9a815a6d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, measurements, generation, width_key, minimum, estimate, details):
heights={}
for r in rows:
k=r['id']; m=measurements.get(k)
valid=m is not None and m['generation']==generation and str(m['width_key'])==str(width_key)
h=m['height'] if valid else estimate
heights[k]=max(minimum,h)+details.get(k,0)
ids=[r['id'] for r in rows]
offsets={k:sum(heights[x] for x in ids[:i]) for i,k in enumerate(ids)}
return {'heights':heights,'offsets':offsets,'total':sum(heights.values()),'remeasure':[r['id'] for r in rows if r['id'] not in measurements or measurements[r['id']]['generation']!=generation or measurements[r['id']]['width_key']!=width_key],'retained':{k:v for k,v in measurements.items() if k in ids}}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 7, 'b': 8}, 'offsets': {'a': 0, 'b': 7}, 'total': 15, 'remeasure': [], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
if N == 2:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':2+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 8, 'b': 8}, 'offsets': {'a': 0, 'b': 8}, 'total': 16, 'remeasure': [], 'retained': {'a': {'height': 5, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
if N == 3:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':3+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 9, 'b': 8}, 'offsets': {'a': 0, 'b': 9}, 'total': 17, 'remeasure': [], 'retained': {'a': {'height': 6, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
if N == 4:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':4+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 10, 'b': 8}, 'offsets': {'a': 0, 'b': 10}, 'total': 18, 'remeasure': [], 'retained': {'a': {'height': 7, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
if N == 5:
check('fresh variable rows', solve([{'id':'a'},{'id':'b'}], {'a':{'height':5+3,'generation':2,'width_key':'w'},'b':{'height':8,'generation':2,'width_key':'w'}}, 2, 'w', 2, 10, {'a':3}), {'heights': {'a': 11, 'b': 8}, 'offsets': {'a': 0, 'b': 11}, 'total': 19, 'remeasure': [], 'retained': {'a': {'height': 8, 'generation': 2, 'width_key': 'w'}, 'b': {'height': 8, 'generation': 2, 'width_key': 'w'}}})
check('stale generation', solve([{'id':'a'}], {'a':{'height':4,'generation':1,'width_key':'w'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 1, 'width_key': 'w'}}})
check('changed widths', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':'old'}}, 2, 'w', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 'old'}}})
check('typed width key', solve([{'id':'a'}], {'a':{'height':4,'generation':2,'width_key':1}}, 2, '1', 2, 10, {}), {'heights': {'a': 10}, 'offsets': {'a': 0}, 'total': 10, 'remeasure': ['a'], 'retained': {'a': {'height': 4, 'generation': 2, 'width_key': 1}}})
check('zero and stale id', solve([{'id':'a'}], {'a':{'height':0,'generation':2,'width_key':'w'},'gone':{'height':7,'generation':2,'width_key':'w'}}, 2, 'w', 0, 10, {}), {'heights': {'a': 0}, 'offsets': {'a': 0}, 'total': 0, 'remeasure': [], 'retained': {'a': {'height': 0, 'generation': 2, 'width_key': 'w'}}})
check('minimum clamp', solve([{'id':'a'},{'id':'b'}], {'a':{'height':1,'generation':2,'width_key':'w'}}, 2, 'w', 3, 10, {'b':2}), {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'total': 15, 'remeasure': ['b'], 'retained': {'a': {'height': 1, 'generation': 2, 'width_key': 'w'}}})
check('empty', solve([], {}, 2, 'w', 3, 10, {}), {'heights': {}, 'offsets': {}, 'total': 0, 'remeasure': [], 'retained': {}})
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 |
|---|---|---|---|
| fresh variable rows | {'heights': {'a': 7, 'b': 8}, 'offsets': {'a': 0, 'b': 7}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 'w'}, 'b': {'generation': 2, 'height': 8, 'width_key': 'w'}}, 'total': 15} | {'heights': {'a': 7, 'b': 8}, 'offsets': {'a': 0, 'b': 7}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 'w'}, 'b': {'generation': 2, 'height': 8, 'width_key': 'w'}}, 'total': 15} | Passed |
| stale generation | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 1, 'height': 4, 'width_key': 'w'}}, 'total': 10} | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 1, 'height': 4, 'width_key': 'w'}}, 'total': 10} | Passed |
| changed widths | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 'old'}}, 'total': 10} | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 'old'}}, 'total': 10} | Passed |
| typed width key | {'heights': {'a': 4}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 1}}, 'total': 4} | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 1}}, 'total': 10} | Failed |
| zero and stale id | {'heights': {'a': 0}, 'offsets': {'a': 0}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 0, 'width_key': 'w'}}, 'total': 0} | {'heights': {'a': 0}, 'offsets': {'a': 0}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 0, 'width_key': 'w'}}, 'total': 0} | Passed |
| minimum clamp | {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'remeasure': ['b'], 'retained': {'a': {'generation': 2, 'height': 1, 'width_key': 'w'}}, 'total': 15} | {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'remeasure': ['b'], 'retained': {'a': {'generation': 2, 'height': 1, 'width_key': 'w'}}, 'total': 15} | Passed |
| empty | {'heights': {}, 'offsets': {}, 'remeasure': [], 'retained': {}, 'total': 0} | {'heights': {}, 'offsets': {}, 'remeasure': [], 'retained': {}, 'total': 0} | Passed |
SHA-256 / b52343026591e7a99b0c93c596d627a9c5d7da44a4d2c7798c4a7a3f34e40c67
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Row IDs are unique; estimates and minimum/detail heights are nonnegative; width fingerprints are scalar. 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:02.155506+00:00.
Case digest / 23dcc5795ecdff7d142c411f6d0721ae62a6443a1719b011e844a3fe723d4f7d