FA-37526 / Table interactions / Open access
Table row height measurement cache: table total height · case 01
The table table total height result violates the stipulated table row height measurement cache contract.
ROOT CAUSE
The table total height decision uses 'max(heights.values(),default=0)' instead of 'sum(heights.values())'.
THE FAILURE
The table total height decision uses 'max(heights.values(),default=0)' instead of 'sum(heights.values())'.
Unsuccessful approach: The attempted repair 'estimate*len(rows)' 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 m['width_key']==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':max(heights.values(),default=0),'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': 8} | {'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} | Failed |
| 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': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 1}}, 'total': 10} | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 1}}, 'total': 10} | Passed |
| 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': 12} | {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'remeasure': ['b'], 'retained': {'a': {'generation': 2, 'height': 1, 'width_key': 'w'}}, 'total': 15} | Failed |
| empty | {'heights': {}, 'offsets': {}, 'remeasure': [], 'retained': {}, 'total': 0} | {'heights': {}, 'offsets': {}, 'remeasure': [], 'retained': {}, 'total': 0} | Passed |
SHA-256 / a72c637f319ee72c8d93285d20546027c41a030b7f7dabe0f37d40537c03eebe
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 m['width_key']==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':estimate*len(rows),'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': 20} | {'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} | Failed |
| 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': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 1}}, 'total': 10} | {'heights': {'a': 10}, 'offsets': {'a': 0}, 'remeasure': ['a'], 'retained': {'a': {'generation': 2, 'height': 4, 'width_key': 1}}, 'total': 10} | Passed |
| zero and stale id | {'heights': {'a': 0}, 'offsets': {'a': 0}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 0, 'width_key': 'w'}}, 'total': 10} | {'heights': {'a': 0}, 'offsets': {'a': 0}, 'remeasure': [], 'retained': {'a': {'generation': 2, 'height': 0, 'width_key': 'w'}}, 'total': 0} | Failed |
| minimum clamp | {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'remeasure': ['b'], 'retained': {'a': {'generation': 2, 'height': 1, 'width_key': 'w'}}, 'total': 20} | {'heights': {'a': 3, 'b': 12}, 'offsets': {'a': 0, 'b': 3}, 'remeasure': ['b'], 'retained': {'a': {'generation': 2, 'height': 1, 'width_key': 'w'}}, 'total': 15} | Failed |
| empty | {'heights': {}, 'offsets': {}, 'remeasure': [], 'retained': {}, 'total': 0} | {'heights': {}, 'offsets': {}, 'remeasure': [], 'retained': {}, 'total': 0} | Passed |
SHA-256 / 41fcf4ec66bca5bbc90627303e088fa3cdbef836c7af432cb82d365335ba6f6c
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 / 8f4a8ad2f12da705f8a8117407c613e0717254f930ce7b5b1ac942b48af2ac7e