FA-37936 / Table interactions / Open access
Pivot table column descriptor generation: total path scope · case 01
The table total path scope result violates the stipulated pivot table column descriptor generation contract.
ROOT CAUSE
The total path scope decision uses "'path':['TOTAL'],'label':'Total'" instead of "'path':[],'label':'Total'".
THE FAILURE
The total path scope decision uses "'path':['TOTAL'],'label':'Total'" instead of "'path':[],'label':'Total'".
Unsuccessful approach: The attempted repair "'path':list(seen[0]) if seen else [],'label':'Total'" still loses a required part of the table contract.
Case contract
Pivot columns use typed dimension tuples plus measure IDs as identity, deduplicate paths in encounter order, keep measure-specific visibility, distinguish missing/empty/zero dimensions in labels, and represent grand totals with empty ancestry and separately hideable measure keys.
Why this case matters
An offline table UI model isolates pivot table column descriptor generation, 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(tuples, measures, hidden, totals, separator):
seen=[]
for t in tuples:
if t not in seen: seen.append(t)
cols=[]
for t in seen:
for m in measures:
key=(tuple(t),m['id'])
if key in hidden: continue
cols.append({'key':key,'path':list(t),'label':separator.join(str(x) if x is not None else '(missing)' for x in t)+separator+m['label'],'measure':m['id'],'total':False})
if totals:
for m in measures:
key=(('TOTAL',),m['id'])
if key not in hidden: cols.append({'key':key,'path':['TOTAL'],'label':'Total'+separator+m['label'],'measure':m['id'],'total':True})
return cols
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('duplicate paths measures', solve([('east',1),('west',2),('east',1)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 1), 'sum'), 'path': ['east', 1], 'label': 'east / 1 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 1), 'cnt'), 'path': ['east', 1], 'label': 'east / 1 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], False, ':'), [])
if N == 2:
check('duplicate paths measures', solve([('east',2),('west',2),('east',2)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 2), 'sum'), 'path': ['east', 2], 'label': 'east / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 2), 'cnt'), 'path': ['east', 2], 'label': 'east / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], False, ':'), [])
if N == 3:
check('duplicate paths measures', solve([('east',3),('west',2),('east',3)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 3), 'sum'), 'path': ['east', 3], 'label': 'east / 3 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 3), 'cnt'), 'path': ['east', 3], 'label': 'east / 3 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], False, ':'), [])
if N == 4:
check('duplicate paths measures', solve([('east',4),('west',2),('east',4)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 4), 'sum'), 'path': ['east', 4], 'label': 'east / 4 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 4), 'cnt'), 'path': ['east', 4], 'label': 'east / 4 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], False, ':'), [])
if N == 5:
check('duplicate paths measures', solve([('east',5),('west',2),('east',5)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 5), 'sum'), 'path': ['east', 5], 'label': 'east / 5 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 5), 'cnt'), 'path': ['east', 5], 'label': 'east / 5 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| duplicate paths measures | [{'key': [['east', 1], 'sum'], 'label': 'east / 1 / Sales', 'measure': 'sum', 'path': ['east', 1], 'total': False}, {'key': [['east', 1], 'cnt'], 'label': 'east / 1 / Count', 'measure': 'cnt', 'path': ['east', 1], 'total': False}, {'key': [['west', 2], 'sum'], 'label': 'west / 2 / Sales', 'measure': 'sum', 'path': ['west', 2], 'total': False}, {'key': [['west', 2], 'cnt'], 'label': 'west / 2 / Count', 'measure': 'cnt', 'path': ['west', 2], 'total': False}, {'key': [['TOTAL'], 'sum'], 'label': 'Total / Sales', 'measure': 'sum', 'path': ['TOTAL'], 'total': True}, {'key': [['TOTAL'], 'cnt'], 'label': 'Total / Count', 'measure': 'cnt', 'path': ['TOTAL'], 'total': True}] | [{'key': [['east', 1], 'sum'], 'label': 'east / 1 / Sales', 'measure': 'sum', 'path': ['east', 1], 'total': False}, {'key': [['east', 1], 'cnt'], 'label': 'east / 1 / Count', 'measure': 'cnt', 'path': ['east', 1], 'total': False}, {'key': [['west', 2], 'sum'], 'label': 'west / 2 / Sales', 'measure': 'sum', 'path': ['west', 2], 'total': False}, {'key': [['west', 2], 'cnt'], 'label': 'west / 2 / Count', 'measure': 'cnt', 'path': ['west', 2], 'total': False}, {'key': [['TOTAL'], 'sum'], 'label': 'Total / Sales', 'measure': 'sum', 'path': [], 'total': True}, {'key': [['TOTAL'], 'cnt'], 'label': 'Total / Count', 'measure': 'cnt', 'path': [], 'total': True}] | Failed |
| hidden one measure | [{'key': [['a'], 'y'], 'label': 'a:Y', 'measure': 'y', 'path': ['a'], 'total': False}] | [{'key': [['a'], 'y'], 'label': 'a:Y', 'measure': 'y', 'path': ['a'], 'total': False}] | Passed |
| missing and empty dimensions | [{'key': [[None], 'x'], 'label': '(missing):X', 'measure': 'x', 'path': [None], 'total': False}, {'key': [[''], 'x'], 'label': ':X', 'measure': 'x', 'path': [''], 'total': False}, {'key': [[0], 'x'], 'label': '0:X', 'measure': 'x', 'path': [0], 'total': False}, {'key': [[1], 'x'], 'label': '1:X', 'measure': 'x', 'path': [1], 'total': False}, {'key': [['1'], 'x'], 'label': '1:X', 'measure': 'x', 'path': ['1'], 'total': False}] | [{'key': [[None], 'x'], 'label': '(missing):X', 'measure': 'x', 'path': [None], 'total': False}, {'key': [[''], 'x'], 'label': ':X', 'measure': 'x', 'path': [''], 'total': False}, {'key': [[0], 'x'], 'label': '0:X', 'measure': 'x', 'path': [0], 'total': False}, {'key': [[1], 'x'], 'label': '1:X', 'measure': 'x', 'path': [1], 'total': False}, {'key': [['1'], 'x'], 'label': '1:X', 'measure': 'x', 'path': ['1'], 'total': False}] | Passed |
| hidden one total | [{'key': [['a'], 'x'], 'label': 'a:X', 'measure': 'x', 'path': ['a'], 'total': False}, {'key': [['a'], 'y'], 'label': 'a:Y', 'measure': 'y', 'path': ['a'], 'total': False}, {'key': [['TOTAL'], 'y'], 'label': 'Total:Y', 'measure': 'y', 'path': ['TOTAL'], 'total': True}] | [{'key': [['a'], 'x'], 'label': 'a:X', 'measure': 'x', 'path': ['a'], 'total': False}, {'key': [['a'], 'y'], 'label': 'a:Y', 'measure': 'y', 'path': ['a'], 'total': False}, {'key': [['TOTAL'], 'y'], 'label': 'Total:Y', 'measure': 'y', 'path': [], 'total': True}] | Failed |
| totals without tuples | [{'key': [['TOTAL'], 'x'], 'label': 'Total:X', 'measure': 'x', 'path': ['TOTAL'], 'total': True}] | [{'key': [['TOTAL'], 'x'], 'label': 'Total:X', 'measure': 'x', 'path': [], 'total': True}] | Failed |
| no measures | [] | [] | Passed |
SHA-256 / a848300e4af7f97cb6320866606b392a88f5860087e6c9476eb52810c447f977
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tuples, measures, hidden, totals, separator):
seen=[]
for t in tuples:
if t not in seen: seen.append(t)
cols=[]
for t in seen:
for m in measures:
key=(tuple(t),m['id'])
if key in hidden: continue
cols.append({'key':key,'path':list(t),'label':separator.join(str(x) if x is not None else '(missing)' for x in t)+separator+m['label'],'measure':m['id'],'total':False})
if totals:
for m in measures:
key=(('TOTAL',),m['id'])
if key not in hidden: cols.append({'key':key,'path':list(seen[0]) if seen else [],'label':'Total'+separator+m['label'],'measure':m['id'],'total':True})
return cols
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('duplicate paths measures', solve([('east',1),('west',2),('east',1)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 1), 'sum'), 'path': ['east', 1], 'label': 'east / 1 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 1), 'cnt'), 'path': ['east', 1], 'label': 'east / 1 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], False, ':'), [])
if N == 2:
check('duplicate paths measures', solve([('east',2),('west',2),('east',2)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 2), 'sum'), 'path': ['east', 2], 'label': 'east / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 2), 'cnt'), 'path': ['east', 2], 'label': 'east / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], False, ':'), [])
if N == 3:
check('duplicate paths measures', solve([('east',3),('west',2),('east',3)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 3), 'sum'), 'path': ['east', 3], 'label': 'east / 3 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 3), 'cnt'), 'path': ['east', 3], 'label': 'east / 3 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], False, ':'), [])
if N == 4:
check('duplicate paths measures', solve([('east',4),('west',2),('east',4)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 4), 'sum'), 'path': ['east', 4], 'label': 'east / 4 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 4), 'cnt'), 'path': ['east', 4], 'label': 'east / 4 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], False, ':'), [])
if N == 5:
check('duplicate paths measures', solve([('east',5),('west',2),('east',5)], [{'id':'sum','label':'Sales'},{'id':'cnt','label':'Count'}], [], True, ' / '), [{'key': (('east', 5), 'sum'), 'path': ['east', 5], 'label': 'east / 5 / Sales', 'measure': 'sum', 'total': False}, {'key': (('east', 5), 'cnt'), 'path': ['east', 5], 'label': 'east / 5 / Count', 'measure': 'cnt', 'total': False}, {'key': (('west', 2), 'sum'), 'path': ['west', 2], 'label': 'west / 2 / Sales', 'measure': 'sum', 'total': False}, {'key': (('west', 2), 'cnt'), 'path': ['west', 2], 'label': 'west / 2 / Count', 'measure': 'cnt', 'total': False}, {'key': (('TOTAL',), 'sum'), 'path': [], 'label': 'Total / Sales', 'measure': 'sum', 'total': True}, {'key': (('TOTAL',), 'cnt'), 'path': [], 'label': 'Total / Count', 'measure': 'cnt', 'total': True}])
check('hidden one measure', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('a',),'x')], False, ':'), [{'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}])
check('missing and empty dimensions', solve([(None,),('',),(0,),(1,),('1',)], [{'id':'x','label':'X'}], [], False, ':'), [{'key': ((None,), 'x'), 'path': [None], 'label': '(missing):X', 'measure': 'x', 'total': False}, {'key': (('',), 'x'), 'path': [''], 'label': ':X', 'measure': 'x', 'total': False}, {'key': ((0,), 'x'), 'path': [0], 'label': '0:X', 'measure': 'x', 'total': False}, {'key': ((1,), 'x'), 'path': [1], 'label': '1:X', 'measure': 'x', 'total': False}, {'key': (('1',), 'x'), 'path': ['1'], 'label': '1:X', 'measure': 'x', 'total': False}])
check('hidden one total', solve([('a',)], [{'id':'x','label':'X'},{'id':'y','label':'Y'}], [(('TOTAL',),'x')], True, ':'), [{'key': (('a',), 'x'), 'path': ['a'], 'label': 'a:X', 'measure': 'x', 'total': False}, {'key': (('a',), 'y'), 'path': ['a'], 'label': 'a:Y', 'measure': 'y', 'total': False}, {'key': (('TOTAL',), 'y'), 'path': [], 'label': 'Total:Y', 'measure': 'y', 'total': True}])
check('totals without tuples', solve([], [{'id':'x','label':'X'}], [], True, ':'), [{'key': (('TOTAL',), 'x'), 'path': [], 'label': 'Total:X', 'measure': 'x', 'total': True}])
check('no measures', solve([('a',)], [], [], 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| duplicate paths measures | [{'key': [['east', 1], 'sum'], 'label': 'east / 1 / Sales', 'measure': 'sum', 'path': ['east', 1], 'total': False}, {'key': [['east', 1], 'cnt'], 'label': 'east / 1 / Count', 'measure': 'cnt', 'path': ['east', 1], 'total': False}, {'key': [['west', 2], 'sum'], 'label': 'west / 2 / Sales', 'measure': 'sum', 'path': ['west', 2], 'total': False}, {'key': [['west', 2], 'cnt'], 'label': 'west / 2 / Count', 'measure': 'cnt', 'path': ['west', 2], 'total': False}, {'key': [['TOTAL'], 'sum'], 'label': 'Total / Sales', 'measure': 'sum', 'path': ['east', 1], 'total': True}, {'key': [['TOTAL'], 'cnt'], 'label': 'Total / Count', 'measure': 'cnt', 'path': ['east', 1], 'total': True}] | [{'key': [['east', 1], 'sum'], 'label': 'east / 1 / Sales', 'measure': 'sum', 'path': ['east', 1], 'total': False}, {'key': [['east', 1], 'cnt'], 'label': 'east / 1 / Count', 'measure': 'cnt', 'path': ['east', 1], 'total': False}, {'key': [['west', 2], 'sum'], 'label': 'west / 2 / Sales', 'measure': 'sum', 'path': ['west', 2], 'total': False}, {'key': [['west', 2], 'cnt'], 'label': 'west / 2 / Count', 'measure': 'cnt', 'path': ['west', 2], 'total': False}, {'key': [['TOTAL'], 'sum'], 'label': 'Total / Sales', 'measure': 'sum', 'path': [], 'total': True}, {'key': [['TOTAL'], 'cnt'], 'label': 'Total / Count', 'measure': 'cnt', 'path': [], 'total': True}] | Failed |
| hidden one measure | [{'key': [['a'], 'y'], 'label': 'a:Y', 'measure': 'y', 'path': ['a'], 'total': False}] | [{'key': [['a'], 'y'], 'label': 'a:Y', 'measure': 'y', 'path': ['a'], 'total': False}] | Passed |
| missing and empty dimensions | [{'key': [[None], 'x'], 'label': '(missing):X', 'measure': 'x', 'path': [None], 'total': False}, {'key': [[''], 'x'], 'label': ':X', 'measure': 'x', 'path': [''], 'total': False}, {'key': [[0], 'x'], 'label': '0:X', 'measure': 'x', 'path': [0], 'total': False}, {'key': [[1], 'x'], 'label': '1:X', 'measure': 'x', 'path': [1], 'total': False}, {'key': [['1'], 'x'], 'label': '1:X', 'measure': 'x', 'path': ['1'], 'total': False}] | [{'key': [[None], 'x'], 'label': '(missing):X', 'measure': 'x', 'path': [None], 'total': False}, {'key': [[''], 'x'], 'label': ':X', 'measure': 'x', 'path': [''], 'total': False}, {'key': [[0], 'x'], 'label': '0:X', 'measure': 'x', 'path': [0], 'total': False}, {'key': [[1], 'x'], 'label': '1:X', 'measure': 'x', 'path': [1], 'total': False}, {'key': [['1'], 'x'], 'label': '1:X', 'measure': 'x', 'path': ['1'], 'total': False}] | Passed |
| hidden one total | [{'key': [['a'], 'x'], 'label': 'a:X', 'measure': 'x', 'path': ['a'], 'total': False}, {'key': [['a'], 'y'], 'label': 'a:Y', 'measure': 'y', 'path': ['a'], 'total': False}, {'key': [['TOTAL'], 'y'], 'label': 'Total:Y', 'measure': 'y', 'path': ['a'], 'total': True}] | [{'key': [['a'], 'x'], 'label': 'a:X', 'measure': 'x', 'path': ['a'], 'total': False}, {'key': [['a'], 'y'], 'label': 'a:Y', 'measure': 'y', 'path': ['a'], 'total': False}, {'key': [['TOTAL'], 'y'], 'label': 'Total:Y', 'measure': 'y', 'path': [], 'total': True}] | Failed |
| totals without tuples | [{'key': [['TOTAL'], 'x'], 'label': 'Total:X', 'measure': 'x', 'path': [], 'total': True}] | [{'key': [['TOTAL'], 'x'], 'label': 'Total:X', 'measure': 'x', 'path': [], 'total': True}] | Passed |
| no measures | [] | [] | Passed |
SHA-256 / f0ef0bc169628722f5c436e459dbd291c1474a914827f3e0dcc66a03a335e00e
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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
Measure IDs are unique and dimensions are finite scalar tuples; the singleton dimension path (TOTAL,) is reserved for grand totals. 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.147142+00:00.
Case digest / 8c59969b427d7aa2e11e262ca434a1742128aeec514bf66b06f8897a49cd7b52