FA-38236 / Table interactions / Open access
Table row action targeting: target specific revision · case 01
The table target specific revision result violates the stipulated table row action targeting contract.
ROOT CAUSE
The target specific revision decision uses 'revision.get(clicked)' instead of 'revision.get(k)'.
VERIFIED REPAIR
Apply the complete target specific revision rule: revision.get(k).
Unsuccessful approach: The attempted repair 'None' still loses a required part of the table contract.
Case contract
A row action uses current row order, bulk selection only when the clicked row belongs to it and the action permits bulk, optional visible scope, default-deny per-action permissions, atomic busy/permission rejection, explicit empty scope, confirmation policy, and per-row revision snapshots.
Why this case matters
An offline table UI model isolates table row action targeting, 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, clicked, selected, action, permissions, pending, include_hidden, visible, revision):
by={r['id']:r for r in rows}
if clicked not in by: return {'status':'missing','targets':[]}
ids=[r['id'] for r in rows if r['id'] in selected] if clicked in selected and action['bulk'] else [clicked]
if not include_hidden: ids=[k for k in ids if k in visible]
blocked=[k for k in ids if not permissions.get(k,{}).get(action['id'],False)]
busy=[k for k in ids if k in pending]
if blocked: return {'status':'forbidden','targets':[],'blocked':blocked}
if busy: return {'status':'busy','targets':[],'blocked':busy}
if not ids: return {'status':'empty','targets':[]}
return {'status':'confirm' if action.get('confirm') else 'ready','targets':[{'id':k,'revision':revision.get(clicked),'payload':{f:by[k].get(f) for f in action.get('fields',[])}} for k in ids],'action':action['id']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('ordered bulk selection', solve([{'id':'a','v':1},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 1}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 2:
check('ordered bulk selection', solve([{'id':'a','v':2},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 2}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 3:
check('ordered bulk selection', solve([{'id':'a','v':3},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 3}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 4:
check('ordered bulk selection', solve([{'id':'a','v':4},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 4}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 5:
check('ordered bulk selection', solve([{'id':'a','v':5},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 5}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
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 |
|---|---|---|---|
| ordered bulk selection | {'action': 'delete', 'status': 'confirm', 'targets': [{'id': 'a', 'payload': {'v': 1}, 'revision': 1}, {'id': 'c', 'payload': {'v': 3}, 'revision': 1}]} | {'action': 'delete', 'status': 'confirm', 'targets': [{'id': 'a', 'payload': {'v': 1}, 'revision': 1}, {'id': 'c', 'payload': {'v': 3}, 'revision': 3}]} | Failed |
| clicked outside selection | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'b', 'payload': {}, 'revision': 2}]} | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'b', 'payload': {}, 'revision': 2}]} | Passed |
| single action selected | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | Passed |
| one forbidden member | {'blocked': ['b'], 'status': 'forbidden', 'targets': []} | {'blocked': ['b'], 'status': 'forbidden', 'targets': []} | Passed |
| one busy member | {'blocked': ['b'], 'status': 'busy', 'targets': []} | {'blocked': ['b'], 'status': 'busy', 'targets': []} | Passed |
| hidden targets excluded | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | Passed |
| empty visible scope | {'status': 'empty', 'targets': []} | {'status': 'empty', 'targets': []} | Passed |
| missing row | {'status': 'missing', 'targets': []} | {'status': 'missing', 'targets': []} | Passed |
SHA-256 / aa9d75739ae521541c573b438c1a793dd0d01551fb1053241164221df242a0ce
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, clicked, selected, action, permissions, pending, include_hidden, visible, revision):
by={r['id']:r for r in rows}
if clicked not in by: return {'status':'missing','targets':[]}
ids=[r['id'] for r in rows if r['id'] in selected] if clicked in selected and action['bulk'] else [clicked]
if not include_hidden: ids=[k for k in ids if k in visible]
blocked=[k for k in ids if not permissions.get(k,{}).get(action['id'],False)]
busy=[k for k in ids if k in pending]
if blocked: return {'status':'forbidden','targets':[],'blocked':blocked}
if busy: return {'status':'busy','targets':[],'blocked':busy}
if not ids: return {'status':'empty','targets':[]}
return {'status':'confirm' if action.get('confirm') else 'ready','targets':[{'id':k,'revision':None,'payload':{f:by[k].get(f) for f in action.get('fields',[])}} for k in ids],'action':action['id']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('ordered bulk selection', solve([{'id':'a','v':1},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 1}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 2:
check('ordered bulk selection', solve([{'id':'a','v':2},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 2}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 3:
check('ordered bulk selection', solve([{'id':'a','v':3},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 3}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 4:
check('ordered bulk selection', solve([{'id':'a','v':4},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 4}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 5:
check('ordered bulk selection', solve([{'id':'a','v':5},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 5}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
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 |
|---|---|---|---|
| ordered bulk selection | {'action': 'delete', 'status': 'confirm', 'targets': [{'id': 'a', 'payload': {'v': 1}, 'revision': None}, {'id': 'c', 'payload': {'v': 3}, 'revision': None}]} | {'action': 'delete', 'status': 'confirm', 'targets': [{'id': 'a', 'payload': {'v': 1}, 'revision': 1}, {'id': 'c', 'payload': {'v': 3}, 'revision': 3}]} | Failed |
| clicked outside selection | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'b', 'payload': {}, 'revision': None}]} | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'b', 'payload': {}, 'revision': 2}]} | Failed |
| single action selected | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | Passed |
| one forbidden member | {'blocked': ['b'], 'status': 'forbidden', 'targets': []} | {'blocked': ['b'], 'status': 'forbidden', 'targets': []} | Passed |
| one busy member | {'blocked': ['b'], 'status': 'busy', 'targets': []} | {'blocked': ['b'], 'status': 'busy', 'targets': []} | Passed |
| hidden targets excluded | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | Passed |
| empty visible scope | {'status': 'empty', 'targets': []} | {'status': 'empty', 'targets': []} | Passed |
| missing row | {'status': 'missing', 'targets': []} | {'status': 'missing', 'targets': []} | Passed |
SHA-256 / b52d10fb6e7210eeff647315ad7932ec30338da3bfe51120cbd0fddceca04b4a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, clicked, selected, action, permissions, pending, include_hidden, visible, revision):
by={r['id']:r for r in rows}
if clicked not in by: return {'status':'missing','targets':[]}
ids=[r['id'] for r in rows if r['id'] in selected] if clicked in selected and action['bulk'] else [clicked]
if not include_hidden: ids=[k for k in ids if k in visible]
blocked=[k for k in ids if not permissions.get(k,{}).get(action['id'],False)]
busy=[k for k in ids if k in pending]
if blocked: return {'status':'forbidden','targets':[],'blocked':blocked}
if busy: return {'status':'busy','targets':[],'blocked':busy}
if not ids: return {'status':'empty','targets':[]}
return {'status':'confirm' if action.get('confirm') else 'ready','targets':[{'id':k,'revision':revision.get(k),'payload':{f:by[k].get(f) for f in action.get('fields',[])}} for k in ids],'action':action['id']}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
check('ordered bulk selection', solve([{'id':'a','v':1},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 1}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 2:
check('ordered bulk selection', solve([{'id':'a','v':2},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 2}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 3:
check('ordered bulk selection', solve([{'id':'a','v':3},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 3}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 4:
check('ordered bulk selection', solve([{'id':'a','v':4},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 4}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
if N == 5:
check('ordered bulk selection', solve([{'id':'a','v':5},{'id':'b','v':2},{'id':'c','v':3}], 'a', ['c','a'], {'id':'delete','bulk':True,'confirm':True,'fields':['v']}, {'a':{'delete':True},'c':{'delete':True}}, [], True, ['a','b'], {'a':1,'b':2,'c':3}), {'status': 'confirm', 'targets': [{'id': 'a', 'revision': 1, 'payload': {'v': 5}}, {'id': 'c', 'revision': 3, 'payload': {'v': 3}}], 'action': 'delete'})
check('clicked outside selection', solve([{'id':'a'},{'id':'b'}], 'b', ['a'], {'id':'open','bulk':True,'confirm':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {'a':1,'b':2}), {'status': 'ready', 'targets': [{'id': 'b', 'revision': 2, 'payload': {}}], 'action': 'open'})
check('single action selected', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':False}, {'a':{'open':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('one forbidden member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'open':True}}, [], True, ['a','b'], {}), {'status': 'forbidden', 'targets': [], 'blocked': ['b']})
check('one busy member', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'delete','bulk':True}, {'a':{'delete':True},'b':{'delete':True}}, ['unrelated','b'], True, ['a','b'], {}), {'status': 'busy', 'targets': [], 'blocked': ['b']})
check('hidden targets excluded', solve([{'id':'a'},{'id':'b'}], 'a', ['a','b'], {'id':'open','bulk':True}, {'a':{'open':True},'b':{'open':True}}, [], False, ['a'], {}), {'status': 'ready', 'targets': [{'id': 'a', 'revision': None, 'payload': {}}], 'action': 'open'})
check('empty visible scope', solve([{'id':'a'}], 'a', [], {'id':'open','bulk':False}, {'a':{'open':True}}, [], False, [], {}), {'status': 'empty', 'targets': []})
check('missing row', solve([], 'a', [], {'id':'open','bulk':False}, {}, [], True, [], {}), {'status': 'missing', 'targets': []})
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 |
|---|---|---|---|
| ordered bulk selection | {'action': 'delete', 'status': 'confirm', 'targets': [{'id': 'a', 'payload': {'v': 1}, 'revision': 1}, {'id': 'c', 'payload': {'v': 3}, 'revision': 3}]} | {'action': 'delete', 'status': 'confirm', 'targets': [{'id': 'a', 'payload': {'v': 1}, 'revision': 1}, {'id': 'c', 'payload': {'v': 3}, 'revision': 3}]} | Passed |
| clicked outside selection | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'b', 'payload': {}, 'revision': 2}]} | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'b', 'payload': {}, 'revision': 2}]} | Passed |
| single action selected | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | Passed |
| one forbidden member | {'blocked': ['b'], 'status': 'forbidden', 'targets': []} | {'blocked': ['b'], 'status': 'forbidden', 'targets': []} | Passed |
| one busy member | {'blocked': ['b'], 'status': 'busy', 'targets': []} | {'blocked': ['b'], 'status': 'busy', 'targets': []} | Passed |
| hidden targets excluded | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | {'action': 'open', 'status': 'ready', 'targets': [{'id': 'a', 'payload': {}, 'revision': None}]} | Passed |
| empty visible scope | {'status': 'empty', 'targets': []} | {'status': 'empty', 'targets': []} | Passed |
| missing row | {'status': 'missing', 'targets': []} | {'status': 'missing', 'targets': []} | Passed |
SHA-256 / 1fd041e3b20282a80cff41fe1641de6952a9b31714e3826153bead4ef663ce81
Verification & scope
Source row IDs are unique; permission maps hold per-action booleans and revision snapshots are explicit. Deterministic offline table UI model; no browser, DOM, framework, or standards conformance is claimed. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:43:09.209364+00:00.
Case digest / 7591885ec6d1d64d64ea45f19992fde927fdb0e5f861dff2ab341294606b24a5