FA-37101 / Table interactions / Open access
Table rectangular selection projection: inclusive row end · case 01
The table inclusive row end result violates the stipulated table rectangular selection projection contract.
ROOT CAUSE
The inclusive row end decision uses 'ri[1]' instead of 'ri[1]+1'.
VERIFIED REPAIR
Apply the complete inclusive row end rule: ri[1]+1.
Unsuccessful approach: The attempted repair 'len(rows)' 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]] 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| forward rectangle | {'bottom': [['b', 'x'], ['b', 'y'], ['b', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'z']], 'left': [['a', 'x'], ['b', 'x']], 'right': [['a', 'z'], ['b', 'z']], 'rows': ['a', 'b'], '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']]} | Failed |
| reverse rectangle | {'bottom': [['b', 'x'], ['b', 'y'], ['b', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z']], 'left': [['a', 'x'], ['b', 'x']], 'right': [['a', 'z'], ['b', 'z']], 'rows': ['a', 'b'], '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']]} | 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': [['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': [], 'cells': [], 'cols': ['x'], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []} | {'bottom': [['a1', 'x']], 'cells': [['a1', 'x']], 'cols': ['x'], 'editable': [['a1', 'x']], 'left': [['a1', 'x']], 'right': [['a1', 'x']], 'rows': ['a1'], 'top': [['a1', 'x']]} | Failed |
| hidden complete | {'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []} | {'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []} | Passed |
| mixed reversed axes | {'bottom': [['a', 'y'], ['a', 'z']], 'cells': [['a', 'y'], ['a', 'z']], 'cols': ['y', 'z'], 'editable': [['a', 'y'], ['a', 'z']], 'left': [['a', 'y']], 'right': [['a', 'z']], 'rows': ['a'], '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']]} | Failed |
SHA-256 / 23f12268b9ed4c03d3acd73f8f5d02800985b33a52e72e7d7b696358c029cb9d
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]:len(rows)] 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| forward rectangle | {'bottom': [['d', 'x'], ['d', 'y'], ['d', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z'], ['d', 'x'], ['d', 'y'], ['d', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z'], ['d', 'x'], ['d', 'y'], ['d', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x'], ['d', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z'], ['d', 'z']], 'rows': ['a', 'b', 'c', 'd'], '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']]} | Failed |
| reverse rectangle | {'bottom': [['d', 'x'], ['d', 'y'], ['d', 'z']], 'cells': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z'], ['d', 'x'], ['d', 'y'], ['d', 'z']], 'cols': ['x', 'y', 'z'], 'editable': [['a', 'x'], ['a', 'y'], ['a', 'z'], ['b', 'x'], ['b', 'y'], ['b', 'z'], ['c', 'x'], ['c', 'y'], ['c', 'z'], ['d', 'x'], ['d', 'y'], ['d', 'z']], 'left': [['a', 'x'], ['b', 'x'], ['c', 'x'], ['d', 'x']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z'], ['d', 'z']], 'rows': ['a', 'b', 'c', 'd'], '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']]} | 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': [['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': [['b', 'x']], 'cells': [['a1', 'x'], ['b', 'x']], 'cols': ['x'], 'editable': [['a1', 'x'], ['b', 'x']], 'left': [['a1', 'x'], ['b', 'x']], 'right': [['a1', 'x'], ['b', 'x']], 'rows': ['a1', 'b'], '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']]} | Failed |
| hidden complete | {'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []} | {'bottom': [], 'cells': [], 'cols': [], 'editable': [], 'left': [], 'right': [], 'rows': [], 'top': []} | Passed |
| mixed reversed axes | {'bottom': [['c', 'y'], ['c', 'z']], 'cells': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'cols': ['y', 'z'], 'editable': [['a', 'y'], ['a', 'z'], ['b', 'y'], ['b', 'z'], ['c', 'y'], ['c', 'z']], 'left': [['a', 'y'], ['b', 'y'], ['c', 'y']], 'right': [['a', 'z'], ['b', 'z'], ['c', 'z']], 'rows': ['a', 'b', 'c'], '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']]} | Failed |
SHA-256 / 12bd24d1614ca1c4cdaaaa3f6aed66428c823f3d7a4100c2523d61f00bbb2fb7
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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:57.917473+00:00.
Case digest / 0bcbb8e157b6eafdba46e40b47434061b3cbebad0f420ba8eb95424c3addca2a