FAILURE MAP
← Case archive

FA-37126 / Table interactions / Open access

Table rectangular selection projection: top outline · case 01

The table top outline result violates the stipulated table rectangular selection projection contract.

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

ROOT CAUSE

The top outline decision uses '(rr[-1],c)' instead of '(rr[0],c)'.

VERIFIED REPAIR

Apply the complete top outline rule: (rr[0],c).

Unsuccessful approach: The attempted repair '(rows[ri[0]],c)' still loses a required part of the table contract.

Case contract

A rectangular cell selection is inclusive on both axes and independent of drag direction; hidden rows and columns are omitted, locked cells remain selected but are not editable, and outline edges follow visible surviving cells.

Why this case matters

An offline table UI model isolates table rectangular selection projection, 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, cols, start, end, hidden_rows, hidden_cols, locked):
    ri=sorted([rows.index(start[0]),rows.index(end[0])])
    ci=sorted([cols.index(start[1]),cols.index(end[1])])
    rr=[r for r in rows[ri[0]:ri[1]+1] if r not in hidden_rows]
    cc=[c for c in cols[ci[0]:ci[1]+1] if c not in hidden_cols]
    cells=[(r,c) for r in rr for c in cc]
    return {'cells':cells,'editable':[x for x in cells if x not in locked],'top':[(rr[-1],c) for c in cc] if rr else [],'bottom':[(rr[-1],c) for c in cc] if rr else [],'left':[(r,cc[0]) for r in rr] if cc else [],'right':[(r,cc[-1]) for r in rr] if cc else [],'rows':rr,'cols':cc}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(1),'b'], ['x','y'], ('a'+str(1),'x'), ('a'+str(1),'x'), [], [], []), {'cells': [('a1', 'x')], 'editable': [('a1', 'x')], 'top': [('a1', 'x')], 'bottom': [('a1', 'x')], 'left': [('a1', 'x')], 'right': [('a1', 'x')], 'rows': ['a1'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 2:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(2),'b'], ['x','y'], ('a'+str(2),'x'), ('a'+str(2),'x'), [], [], []), {'cells': [('a2', 'x')], 'editable': [('a2', 'x')], 'top': [('a2', 'x')], 'bottom': [('a2', 'x')], 'left': [('a2', 'x')], 'right': [('a2', 'x')], 'rows': ['a2'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 3:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(3),'b'], ['x','y'], ('a'+str(3),'x'), ('a'+str(3),'x'), [], [], []), {'cells': [('a3', 'x')], 'editable': [('a3', 'x')], 'top': [('a3', 'x')], 'bottom': [('a3', 'x')], 'left': [('a3', 'x')], 'right': [('a3', 'x')], 'rows': ['a3'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 4:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(4),'b'], ['x','y'], ('a'+str(4),'x'), ('a'+str(4),'x'), [], [], []), {'cells': [('a4', 'x')], 'editable': [('a4', 'x')], 'top': [('a4', 'x')], 'bottom': [('a4', 'x')], 'left': [('a4', 'x')], 'right': [('a4', 'x')], 'rows': ['a4'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 5:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(5),'b'], ['x','y'], ('a'+str(5),'x'), ('a'+str(5),'x'), [], [], []), {'cells': [('a5', 'x')], 'editable': [('a5', 'x')], 'top': [('a5', 'x')], 'bottom': [('a5', 'x')], 'left': [('a5', 'x')], 'right': [('a5', 'x')], 'rows': ['a5'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

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
forward rectangle{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['c', 'x'], ['c', 'y'], ['c', 'z']]}{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}Failed
reverse rectangle{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['c', 'x'], ['c', 'y'], ['c', 'z']]}{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}Failed
hidden edges{'bottom': [['c', 'y'], ['c', 'z']], 'cells': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'cols': ['y', 'z'], 'editable': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'left': [['b', 'y'], ['c', 'y']], 'right': [['b', 'z'], ['c', 'z']], 'rows': ['b', 'c'], 'top': [['c', 'y'], ['c', 'z']]}{'bottom': [['c', 'y'], ['c', 'z']], 'cells': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'cols': ['y', 'z'], 'editable': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'left': [['b', 'y'], ['c', 'y']], 'right': [['b', 'z'], ['c', 'z']], 'rows': ['b', 'c'], 'top': [['b', 'y'], ['b', 'z']]}Failed
singleton{'bottom': [['a1', 'x']], 'cells': [['a1', 'x']], 'cols': ['x'], 'editable': [['a1', 'x']], 'left': [['a1', 'x']], 'right': [['a1', 'x']], 'rows': ['a1'], 'top': [['a1', 'x']]}{'bottom': [['a1', 'x']], 'cells': [['a1', 'x']], 'cols': ['x'], 'editable': [['a1', 'x']], 'left': [['a1', 'x']], 'right': [['a1', 'x']], 'rows': ['a1'], 'top': [['a1', 'x']]}Passed
hidden complete{'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []}{'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []}Passed
mixed reversed axes{'bottom': [['b', 'y'], ['b', 'z']], 'cells': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'cols': ['y', 'z'], 'editable': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'left': [['a', 'y'], ['b', 'y']], 'right': [['a', 'z'], ['b', 'z']], 'rows': ['a', 'b'], 'top': [['b', 'y'], ['b', 'z']]}{'bottom': [['b', 'y'], ['b', 'z']], 'cells': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'cols': ['y', 'z'], 'editable': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'left': [['a', 'y'], ['b', 'y']], 'right': [['a', 'z'], ['b', 'z']], 'rows': ['a', 'b'], 'top': [['a', 'y'], ['a', 'z']]}Failed

SHA-256 / f15230442b358b540b7321f5e9fe88d7bf2beed87e5efc5e49c34c2784d0edd0

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(rows, cols, start, end, hidden_rows, hidden_cols, locked):
    ri=sorted([rows.index(start[0]),rows.index(end[0])])
    ci=sorted([cols.index(start[1]),cols.index(end[1])])
    rr=[r for r in rows[ri[0]:ri[1]+1] if r not in hidden_rows]
    cc=[c for c in cols[ci[0]:ci[1]+1] if c not in hidden_cols]
    cells=[(r,c) for r in rr for c in cc]
    return {'cells':cells,'editable':[x for x in cells if x not in locked],'top':[(rows[ri[0]],c) for c in cc] if rr else [],'bottom':[(rr[-1],c) for c in cc] if rr else [],'left':[(r,cc[0]) for r in rr] if cc else [],'right':[(r,cc[-1]) for r in rr] if cc else [],'rows':rr,'cols':cc}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(1),'b'], ['x','y'], ('a'+str(1),'x'), ('a'+str(1),'x'), [], [], []), {'cells': [('a1', 'x')], 'editable': [('a1', 'x')], 'top': [('a1', 'x')], 'bottom': [('a1', 'x')], 'left': [('a1', 'x')], 'right': [('a1', 'x')], 'rows': ['a1'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 2:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(2),'b'], ['x','y'], ('a'+str(2),'x'), ('a'+str(2),'x'), [], [], []), {'cells': [('a2', 'x')], 'editable': [('a2', 'x')], 'top': [('a2', 'x')], 'bottom': [('a2', 'x')], 'left': [('a2', 'x')], 'right': [('a2', 'x')], 'rows': ['a2'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 3:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(3),'b'], ['x','y'], ('a'+str(3),'x'), ('a'+str(3),'x'), [], [], []), {'cells': [('a3', 'x')], 'editable': [('a3', 'x')], 'top': [('a3', 'x')], 'bottom': [('a3', 'x')], 'left': [('a3', 'x')], 'right': [('a3', 'x')], 'rows': ['a3'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 4:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(4),'b'], ['x','y'], ('a'+str(4),'x'), ('a'+str(4),'x'), [], [], []), {'cells': [('a4', 'x')], 'editable': [('a4', 'x')], 'top': [('a4', 'x')], 'bottom': [('a4', 'x')], 'left': [('a4', 'x')], 'right': [('a4', 'x')], 'rows': ['a4'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 5:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(5),'b'], ['x','y'], ('a'+str(5),'x'), ('a'+str(5),'x'), [], [], []), {'cells': [('a5', 'x')], 'editable': [('a5', 'x')], 'top': [('a5', 'x')], 'bottom': [('a5', 'x')], 'left': [('a5', 'x')], 'right': [('a5', 'x')], 'rows': ['a5'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

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
forward rectangle{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}Passed
reverse rectangle{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}Passed
hidden edges{'bottom': [['c', 'y'], ['c', 'z']], 'cells': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'cols': ['y', 'z'], 'editable': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'left': [['b', 'y'], ['c', 'y']], 'right': [['b', 'z'], ['c', 'z']], 'rows': ['b', 'c'], 'top': [['a', 'y'], ['a', 'z']]}{'bottom': [['c', 'y'], ['c', 'z']], 'cells': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'cols': ['y', 'z'], 'editable': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'left': [['b', 'y'], ['c', 'y']], 'right': [['b', 'z'], ['c', 'z']], 'rows': ['b', 'c'], 'top': [['b', 'y'], ['b', 'z']]}Failed
singleton{'bottom': [['a1', 'x']], 'cells': [['a1', 'x']], 'cols': ['x'], 'editable': [['a1', 'x']], 'left': [['a1', 'x']], 'right': [['a1', 'x']], 'rows': ['a1'], 'top': [['a1', 'x']]}{'bottom': [['a1', 'x']], 'cells': [['a1', 'x']], 'cols': ['x'], 'editable': [['a1', 'x']], 'left': [['a1', 'x']], 'right': [['a1', 'x']], 'rows': ['a1'], 'top': [['a1', 'x']]}Passed
hidden complete{'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []}{'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []}Passed
mixed reversed axes{'bottom': [['b', 'y'], ['b', 'z']], 'cells': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'cols': ['y', 'z'], 'editable': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'left': [['a', 'y'], ['b', 'y']], 'right': [['a', 'z'], ['b', 'z']], 'rows': ['a', 'b'], 'top': [['a', 'y'], ['a', 'z']]}{'bottom': [['b', 'y'], ['b', 'z']], 'cells': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'cols': ['y', 'z'], 'editable': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'left': [['a', 'y'], ['b', 'y']], 'right': [['a', 'z'], ['b', 'z']], 'rows': ['a', 'b'], 'top': [['a', 'y'], ['a', 'z']]}Passed

SHA-256 / b49d2a9e1d75e1159c993d38c97aa8dd54cd5aacf33a5993d0ae68f0de8adc3a

3 / The verified repair

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

N = 1
observations = []
def solve(rows, cols, start, end, hidden_rows, hidden_cols, locked):
    ri=sorted([rows.index(start[0]),rows.index(end[0])])
    ci=sorted([cols.index(start[1]),cols.index(end[1])])
    rr=[r for r in rows[ri[0]:ri[1]+1] if r not in hidden_rows]
    cc=[c for c in cols[ci[0]:ci[1]+1] if c not in hidden_cols]
    cells=[(r,c) for r in rr for c in cc]
    return {'cells':cells,'editable':[x for x in cells if x not in locked],'top':[(rr[0],c) for c in cc] if rr else [],'bottom':[(rr[-1],c) for c in cc] if rr else [],'left':[(r,cc[0]) for r in rr] if cc else [],'right':[(r,cc[-1]) for r in rr] if cc else [],'rows':rr,'cols':cc}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(1),'b'], ['x','y'], ('a'+str(1),'x'), ('a'+str(1),'x'), [], [], []), {'cells': [('a1', 'x')], 'editable': [('a1', 'x')], 'top': [('a1', 'x')], 'bottom': [('a1', 'x')], 'left': [('a1', 'x')], 'right': [('a1', 'x')], 'rows': ['a1'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 2:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(2),'b'], ['x','y'], ('a'+str(2),'x'), ('a'+str(2),'x'), [], [], []), {'cells': [('a2', 'x')], 'editable': [('a2', 'x')], 'top': [('a2', 'x')], 'bottom': [('a2', 'x')], 'left': [('a2', 'x')], 'right': [('a2', 'x')], 'rows': ['a2'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 3:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(3),'b'], ['x','y'], ('a'+str(3),'x'), ('a'+str(3),'x'), [], [], []), {'cells': [('a3', 'x')], 'editable': [('a3', 'x')], 'top': [('a3', 'x')], 'bottom': [('a3', 'x')], 'left': [('a3', 'x')], 'right': [('a3', 'x')], 'rows': ['a3'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 4:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(4),'b'], ['x','y'], ('a'+str(4),'x'), ('a'+str(4),'x'), [], [], []), {'cells': [('a4', 'x')], 'editable': [('a4', 'x')], 'top': [('a4', 'x')], 'bottom': [('a4', 'x')], 'left': [('a4', 'x')], 'right': [('a4', 'x')], 'rows': ['a4'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

if N == 5:
    check('forward rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('c','z'), [], [], [('b','y')]), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('reverse rectangle', solve(['a','b','c','d'], ['x','y','z','w'], ('c','z'), ('a','x'), [], [], []), {'cells': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'editable': [('a', 'x'), ('a', 'y'), ('a', 'z'), ('b', 'x'), ('b', 'y'), ('b', 'z'), ('c', 'x'), ('c', 'y'), ('c', 'z')], 'top': [('a', 'x'), ('a', 'y'), ('a', 'z')], 'bottom': [('c', 'x'), ('c', 'y'), ('c', 'z')], 'left': [('a', 'x'), ('b', 'x'), ('c', 'x')], 'right': [('a', 'z'), ('b', 'z'), ('c', 'z')], 'rows': ['a', 'b', 'c'], 'cols': ['x', 'y', 'z']})
    check('hidden edges', solve(['a','b','c','d'], ['x','y','z','w'], ('a','x'), ('d','w'), ['a','d'], ['x','w'], []), {'cells': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'editable': [('b', 'y'), ('b', 'z'), ('c', 'y'), ('c', 'z')], 'top': [('b', 'y'), ('b', 'z')], 'bottom': [('c', 'y'), ('c', 'z')], 'left': [('b', 'y'), ('c', 'y')], 'right': [('b', 'z'), ('c', 'z')], 'rows': ['b', 'c'], 'cols': ['y', 'z']})
    check('singleton', solve(['a'+str(5),'b'], ['x','y'], ('a'+str(5),'x'), ('a'+str(5),'x'), [], [], []), {'cells': [('a5', 'x')], 'editable': [('a5', 'x')], 'top': [('a5', 'x')], 'bottom': [('a5', 'x')], 'left': [('a5', 'x')], 'right': [('a5', 'x')], 'rows': ['a5'], 'cols': ['x']})
    check('hidden complete', solve(['a','b'], ['x','y'], ('a','x'), ('b','y'), ['a','b'], ['x','y'], []), {'cells': [], 'editable': [], 'top': [], 'bottom': [], 'left': [], 'right': [], 'rows': [], 'cols': []})
    check('mixed reversed axes', solve(['a','b','c'], ['x','y','z'], ('a','z'), ('b','y'), [], [], []), {'cells': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'editable': [('a', 'y'), ('a', 'z'), ('b', 'y'), ('b', 'z')], 'top': [('a', 'y'), ('a', 'z')], 'bottom': [('b', 'y'), ('b', 'z')], 'left': [('a', 'y'), ('b', 'y')], 'right': [('a', 'z'), ('b', 'z')], 'rows': ['a', 'b'], 'cols': ['y', 'z']})

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
forward rectangle{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}Passed
reverse rectangle{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}{'bottom': [['c', 'x'], ['c', 'y'], ['c', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], 'top': [['a', 'x'], ['a', 'y'], ['a', 'z']]}Passed
hidden edges{'bottom': [['c', 'y'], ['c', 'z']], 'cells': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'cols': ['y', 'z'], 'editable': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'left': [['b', 'y'], ['c', 'y']], 'right': [['b', 'z'], ['c', 'z']], 'rows': ['b', 'c'], 'top': [['b', 'y'], ['b', 'z']]}{'bottom': [['c', 'y'], ['c', 'z']], 'cells': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'cols': ['y', 'z'], 'editable': [['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'left': [['b', 'y'], ['c', 'y']], 'right': [['b', 'z'], ['c', 'z']], 'rows': ['b', 'c'], 'top': [['b', 'y'], ['b', 'z']]}Passed
singleton{'bottom': [['a1', 'x']], 'cells': [['a1', 'x']], 'cols': ['x'], 'editable': [['a1', 'x']], 'left': [['a1', 'x']], 'right': [['a1', 'x']], 'rows': ['a1'], 'top': [['a1', 'x']]}{'bottom': [['a1', 'x']], 'cells': [['a1', 'x']], 'cols': ['x'], 'editable': [['a1', 'x']], 'left': [['a1', 'x']], 'right': [['a1', 'x']], 'rows': ['a1'], 'top': [['a1', 'x']]}Passed
hidden complete{'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []}{'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []}Passed
mixed reversed axes{'bottom': [['b', 'y'], ['b', 'z']], 'cells': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'cols': ['y', 'z'], 'editable': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'left': [['a', 'y'], ['b', 'y']], 'right': [['a', 'z'], ['b', 'z']], 'rows': ['a', 'b'], 'top': [['a', 'y'], ['a', 'z']]}{'bottom': [['b', 'y'], ['b', 'z']], 'cells': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'cols': ['y', 'z'], 'editable': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z']], 'left': [['a', 'y'], ['b', 'y']], 'right': [['a', 'z'], ['b', 'z']], 'rows': ['a', 'b'], 'top': [['a', 'y'], ['a', 'z']]}Passed

SHA-256 / e07afc2b6d8fbf2b17391c8fe70a86b7c99a886c12290e02e12055168b347691

Verification & scope

Both endpoints exist in unique source axes; lock entries are row-column pairs. Deterministic offline table UI model; no browser, DOM, framework, or standards conformance is claimed. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:42:58.154306+00:00.

Case digest / 207acb051251c272c4c5128891e2c37dfbef7e7de3ba0581e032029a4512e066