FAILURE MAP
← Case archive

FA-39736 / Tree accessibility / Open access

Hierarchical branch command lock: Busy exposure fails to follow subtree boundary · case 01

Busy exposure fails to follow subtree boundary produces the wrong hierarchical widget state in a regression fixture.

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

ROOT CAUSE

The branch-command-lock contract is violated at `x in newlocks or any(a in newlocks for a in d['ancestors'].get(x,[]))` by replacing it with `x in newlocks`.

VERIFIED REPAIR

Restore `x in newlocks or any(a in newlocks for a in d['ancestors'].get(x,[]))` at this fault site while retaining the other tree state decisions.

Unsuccessful approach: The partial repair `bool(newlocks)` still violates a boundary or preservation case.

Case contract

A pending subtree mutation locks that branch and descendants, but does not lock siblings. Read-only inspection remains available. New commands use nearest locking ancestor for reason attribution; completed operation tokens release only their owned locks and never a replacement lock.

Why this case matters

Offline executable model of a hierarchical accessibility interaction; inputs are bounded and valid as stipulated. No browser, assistive technology, or normative ARIA conformance is claimed.

1 / The failure

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

N = 1
observations = []
def solve(d):
    locks=dict(d['locks'])
    if d['complete_node'] in locks and locks[d['complete_node']]==d['complete_token']: del locks[d['complete_node']]
    chain=d['ancestors'].get(d['target'],[])+[d['target']]
    owner=next((x for x in reversed(chain) if x in locks),None)
    mutating=d['command'] in ['rename','delete','move','check']
    allowed=d['target'] in d['rows'] and (not mutating or owner is None) and (not mutating or d['target'] not in d['readonly'])
    reason=('missing' if d['target'] not in d['rows'] else ('busy:'+owner if owner is not None and mutating else ('readonly' if mutating and d['target'] in d['readonly'] else None)))
    newlocks=dict(locks)
    if allowed and d['command'] in ['delete','move']: newlocks[d['target']]=d['new_token']
    busy=[x for x in d['rows'] if x in newlocks]
    return [allowed,reason,newlocks,busy]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N1'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': ['v0'], 'new_token': 'N1'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N1'}, ['r', 'b', 'c', 'q', 's']])], 2: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N2'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': ['v0'], 'new_token': 'N2'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N2'}, ['r', 'b', 'c', 'q', 's']])], 3: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N3'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': ['v0'], 'new_token': 'N3'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N3'}, ['r', 'b', 'c', 'q', 's']])], 4: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N4'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': ['v0'], 'new_token': 'N4'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N4'}, ['r', 'b', 'c', 'q', 's']])], 5: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N5'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': ['v0'], 'new_token': 'N5'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N5'}, ['r', 'b', 'c', 'q', 's']])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
nested lock[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'q']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
locked delete[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'q']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
inspection[True, None, {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'q']][True, None, {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
release nearest[False, 'busy:r', {'q': 'Q', 'r': 'R'}, ['r', 'q']][False, 'busy:r', {'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
stale completion[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'q']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
self lock[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'q']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
free sibling delete[True, None, {'b': 'B', 'q': 'Q', 'r': 'R', 'v0': 'N1'}, ['r', 'b', 'q', 'v0']][True, None, {'b': 'B', 'q': 'Q', 'r': 'R', 'v0': 'N1'}, ['r', 'b', 'c', 'q', 's', 'v0']]Failed
protected free[False, 'readonly', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'q']][False, 'readonly', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
missing target[False, 'missing', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'q']][False, 'missing', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
release and move[True, None, {'b': 'B', 'q': 'N1', 'r': 'R'}, ['r', 'b', 'q']][True, None, {'b': 'B', 'q': 'N1', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed

SHA-256 / a6ed2860d0795c2025439706f419b2b8b98cdcb943a6ddf13b578a187baa66c7

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    locks=dict(d['locks'])
    if d['complete_node'] in locks and locks[d['complete_node']]==d['complete_token']: del locks[d['complete_node']]
    chain=d['ancestors'].get(d['target'],[])+[d['target']]
    owner=next((x for x in reversed(chain) if x in locks),None)
    mutating=d['command'] in ['rename','delete','move','check']
    allowed=d['target'] in d['rows'] and (not mutating or owner is None) and (not mutating or d['target'] not in d['readonly'])
    reason=('missing' if d['target'] not in d['rows'] else ('busy:'+owner if owner is not None and mutating else ('readonly' if mutating and d['target'] in d['readonly'] else None)))
    newlocks=dict(locks)
    if allowed and d['command'] in ['delete','move']: newlocks[d['target']]=d['new_token']
    busy=[x for x in d['rows'] if bool(newlocks)]
    return [allowed,reason,newlocks,busy]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N1'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': ['v0'], 'new_token': 'N1'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N1'}, ['r', 'b', 'c', 'q', 's']])], 2: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N2'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': ['v0'], 'new_token': 'N2'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N2'}, ['r', 'b', 'c', 'q', 's']])], 3: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N3'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': ['v0'], 'new_token': 'N3'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N3'}, ['r', 'b', 'c', 'q', 's']])], 4: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N4'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': ['v0'], 'new_token': 'N4'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N4'}, ['r', 'b', 'c', 'q', 's']])], 5: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N5'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': ['v0'], 'new_token': 'N5'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N5'}, ['r', 'b', 'c', 'q', 's']])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
nested lock[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's', 'v0']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
locked delete[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's', 'v0']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
inspection[True, None, {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's', 'v0']][True, None, {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
release nearest[False, 'busy:r', {'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's', 'v0']][False, 'busy:r', {'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
stale completion[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's', 'v0']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
self lock[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's', 'v0']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
free sibling delete[True, None, {'b': 'B', 'q': 'Q', 'r': 'R', 'v0': 'N1'}, ['r', 'b', 'c', 'q', 's', 'v0']][True, None, {'b': 'B', 'q': 'Q', 'r': 'R', 'v0': 'N1'}, ['r', 'b', 'c', 'q', 's', 'v0']]Passed
protected free[False, 'readonly', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's', 'v0']][False, 'readonly', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
missing target[False, 'missing', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's', 'v0']][False, 'missing', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed
release and move[True, None, {'b': 'B', 'q': 'N1', 'r': 'R'}, ['r', 'b', 'c', 'q', 's', 'v0']][True, None, {'b': 'B', 'q': 'N1', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Failed

SHA-256 / 20281fcc27b581cc2ec8893fad2bf4f592d5e3326e323ab69fde41d403cbf36e

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    locks=dict(d['locks'])
    if d['complete_node'] in locks and locks[d['complete_node']]==d['complete_token']: del locks[d['complete_node']]
    chain=d['ancestors'].get(d['target'],[])+[d['target']]
    owner=next((x for x in reversed(chain) if x in locks),None)
    mutating=d['command'] in ['rename','delete','move','check']
    allowed=d['target'] in d['rows'] and (not mutating or owner is None) and (not mutating or d['target'] not in d['readonly'])
    reason=('missing' if d['target'] not in d['rows'] else ('busy:'+owner if owner is not None and mutating else ('readonly' if mutating and d['target'] in d['readonly'] else None)))
    newlocks=dict(locks)
    if allowed and d['command'] in ['delete','move']: newlocks[d['target']]=d['new_token']
    busy=[x for x in d['rows'] if x in newlocks or any(a in newlocks for a in d['ancestors'].get(x,[]))]
    return [allowed,reason,newlocks,busy]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N1'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': ['v0'], 'new_token': 'N1'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0'], 'readonly': [], 'new_token': 'N1'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N1'}, ['r', 'b', 'c', 'q', 's']])], 2: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N2'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': ['v0'], 'new_token': 'N2'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1'], 'readonly': [], 'new_token': 'N2'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N2'}, ['r', 'b', 'c', 'q', 's']])], 3: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N3'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': ['v0'], 'new_token': 'N3'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2'], 'readonly': [], 'new_token': 'N3'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N3'}, ['r', 'b', 'c', 'q', 's']])], 4: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N4'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': ['v0'], 'new_token': 'N4'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3'], 'readonly': [], 'new_token': 'N4'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N4'}, ['r', 'b', 'c', 'q', 's']])], 5: [('nested lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('locked delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('inspection', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'inspect', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release nearest', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'B', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:r', {'r': 'R', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('stale completion', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'b', 'complete_token': 'old', 'target': 'c', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('self lock', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'b', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'busy:b', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('free sibling delete', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'delete', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'Q', 'v0': 'N5'}, ['r', 'b', 'c', 'q', 's', 'v0']]), ('protected free', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'v0', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': ['v0'], 'new_token': 'N5'}, [False, 'readonly', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('missing target', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': None, 'complete_token': None, 'target': 'missing', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'rename', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [False, 'missing', {'r': 'R', 'b': 'B', 'q': 'Q'}, ['r', 'b', 'c', 'q', 's']]), ('release and move', {'locks': {'r': 'R', 'b': 'B', 'q': 'Q'}, 'complete_node': 'q', 'complete_token': 'Q', 'target': 'q', 'ancestors': {'b': ['r'], 'c': ['r', 'b'], 's': ['q']}, 'command': 'move', 'rows': ['r', 'b', 'c', 'q', 's', 'v0', 'v1', 'v2', 'v3', 'v4'], 'readonly': [], 'new_token': 'N5'}, [True, None, {'r': 'R', 'b': 'B', 'q': 'N5'}, ['r', 'b', 'c', 'q', 's']])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
nested lock[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Passed
locked delete[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Passed
inspection[True, None, {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']][True, None, {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Passed
release nearest[False, 'busy:r', {'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']][False, 'busy:r', {'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Passed
stale completion[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Passed
self lock[False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']][False, 'busy:b', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Passed
free sibling delete[True, None, {'b': 'B', 'q': 'Q', 'r': 'R', 'v0': 'N1'}, ['r', 'b', 'c', 'q', 's', 'v0']][True, None, {'b': 'B', 'q': 'Q', 'r': 'R', 'v0': 'N1'}, ['r', 'b', 'c', 'q', 's', 'v0']]Passed
protected free[False, 'readonly', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']][False, 'readonly', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Passed
missing target[False, 'missing', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']][False, 'missing', {'b': 'B', 'q': 'Q', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Passed
release and move[True, None, {'b': 'B', 'q': 'N1', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']][True, None, {'b': 'B', 'q': 'N1', 'r': 'R'}, ['r', 'b', 'c', 'q', 's']]Passed

SHA-256 / aba3f4bd3325fad5d56b714100f8548dd89c32ade9cc493d17146aceee45ca72

Verification & scope

Synthetic deterministic hierarchical-widget data contract; not an implementation of a browser accessibility tree. 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:24.219740+00:00.

Case digest / 9f63f70ce540e0caf57b2e79eba6ce600fc3bdff15affb11ddd10165a297cba9