{"abstract":"Offscreen focus lease alters tree selection produces the wrong hierarchical widget state in a regression fixture.","category":"Tree accessibility","checks":8,"contract":"A virtualized active row keeps its identity while offscreen. Expose an active descendant only after a matching mount generation acknowledges the row; scrolling requests mount without changing selection. A recycled slot must not satisfy an old lease. Collapse repairs the logical active row to the closest visible ancestor before mounting.","evaluation_group":"s3-tree-virtual-focus-lease","failed_approach":"The partial repair `selection=[]` still violates a boundary or preservation case.","family":"s3-tree_accessibility-virtual-focus-lease-08","id":"FA-39126","implementations":{"attempt":{"sha256":"19eabc6abe4ed36f0b464cde8f00188331d218f9052baf2200b84ae26cfc5651","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    visible=d['visible']\n    logical=d['active'] if d['active'] in visible else next((a for a in reversed(d['ancestors']) if a in visible),(visible[0] if visible else None))\n    slot=next((slot for slot,row in d['slots'].items() if row==logical),None)\n    ack=slot is not None and d['acks'].get(slot)==[logical,d['generation']]\n    aria=(d['tree']+':'+logical) if ack else None\n    request=logical if logical is not None and not ack else None\n    scroll=visible.index(logical) if logical in visible and slot is None else None\n    selection=[]\n    lease=[logical,d['generation']] if request is not None else None\n    pinned=[logical] if ack else []\n    return [logical,aria,request,scroll,selection,lease,pinned]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {1: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 0]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 1], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 1], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 1], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 1], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 1], []])], 2: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 1]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 2], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 2], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 2], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 2], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 2], []])], 3: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 2]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 3], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 3], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 3], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 3], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 3], []])], 4: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 3]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 4], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 4], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 4], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 4], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 4], []])], 5: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 4]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 5], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 5], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 5], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 5], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 5], []])]}\nfor label, data, expected in cases[N]:\n    check(label, solve(data), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"0b7c8cf45e9e6631484720198d723ac5924dbce8c71457a8242154bd55185b73","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    visible=d['visible']\n    logical=d['active'] if d['active'] in visible else next((a for a in reversed(d['ancestors']) if a in visible),(visible[0] if visible else None))\n    slot=next((slot for slot,row in d['slots'].items() if row==logical),None)\n    ack=slot is not None and d['acks'].get(slot)==[logical,d['generation']]\n    aria=(d['tree']+':'+logical) if ack else None\n    request=logical if logical is not None and not ack else None\n    scroll=visible.index(logical) if logical in visible and slot is None else None\n    selection=[logical] if logical else []\n    lease=[logical,d['generation']] if request is not None else None\n    pinned=[logical] if ack else []\n    return [logical,aria,request,scroll,selection,lease,pinned]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {1: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 0]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 1], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 1], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 1], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 1], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 1], []])], 2: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 1]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 2], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 2], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 2], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 2], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 2], []])], 3: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 2]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 3], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 3], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 3], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 3], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 3], []])], 4: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 3]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 4], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 4], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 4], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 4], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 4], []])], 5: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 4]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 5], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 5], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 5], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 5], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 5], []])]}\nfor label, data, expected in cases[N]:\n    check(label, solve(data), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"3c7cd20b733546b54a016d1b01122f7cf354a1d29a4c6142582405ed7b37b39d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(d):\n    visible=d['visible']\n    logical=d['active'] if d['active'] in visible else next((a for a in reversed(d['ancestors']) if a in visible),(visible[0] if visible else None))\n    slot=next((slot for slot,row in d['slots'].items() if row==logical),None)\n    ack=slot is not None and d['acks'].get(slot)==[logical,d['generation']]\n    aria=(d['tree']+':'+logical) if ack else None\n    request=logical if logical is not None and not ack else None\n    scroll=visible.index(logical) if logical in visible and slot is None else None\n    selection=d['selection']\n    lease=[logical,d['generation']] if request is not None else None\n    pinned=[logical] if ack else []\n    return [logical,aria,request,scroll,selection,lease,pinned]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = {1: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 0]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 1], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 1], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 1], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 1], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 1], 'slot1': ['b', 1]}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 1, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 1], []])], 2: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 1]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 2], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 2], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 2], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 2], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 2], 'slot1': ['b', 2]}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 2, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 2], []])], 3: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 2]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 3], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 3], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 3], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 3], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 3], 'slot1': ['b', 3]}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 3, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 3], []])], 4: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 3]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 4], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 4], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 4], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 4], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 4], 'slot1': ['b', 4]}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 4, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 4], []])], 5: [('mounted lease', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', 'tree:b', None, None, ['a'], None, ['b']]), ('old ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['b', 4]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 5], []]), ('recycled ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot1': ['gone', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 5], []]), ('offscreen', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'r'}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', 2, ['a'], ['b', 5], []]), ('collapse', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['a', 'tree:a', None, None, ['a'], None, ['a']]), ('collapse offscreen', {'visible': ['r', 'a'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['a', None, 'a', 1, ['a'], ['a', 5], []]), ('empty tree', {'visible': [], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {}, 'acks': {'slot0': ['a', 5], 'slot1': ['b', 5]}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, [None, None, None, None, ['a'], None, []]), ('no ack', {'visible': ['r', 'a', 'b', 'x0', 'x1', 'x2', 'x3', 'x4'], 'active': 'b', 'ancestors': ['r', 'a'], 'slots': {'slot0': 'a', 'slot1': 'b'}, 'acks': {}, 'generation': 5, 'tree': 'tree', 'selection': ['a']}, ['b', None, 'b', None, ['a'], ['b', 5], []])]}\nfor label, data, expected in cases[N]:\n    check(label, solve(data), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-tree_accessibility-virtual-focus-lease-08","generated_at":"2026-09-29T14:43:18.140592+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"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.","repair":"Restore `selection=d['selection']` at this fault site while retaining the other tree state decisions.","root_cause":"The virtual-focus-lease contract is violated at `selection=d['selection']` by replacing it with `selection=[logical] if logical else []`.","sha256":"516fea4f0ebc3c61aaed49ed46ac507970d735f5dda09d3567bf878b912284d0","title":"Virtual tree active-descendant lease: Offscreen focus lease alters tree selection · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.172,"exit_code":1,"observations":[{"actual":["b","tree:b",null,null,[],null,["b"]],"check":"mounted lease","expected":["b","tree:b",null,null,["a"],null,["b"]],"passed":false},{"actual":["b",null,"b",null,[],["b",1],[]],"check":"old ack","expected":["b",null,"b",null,["a"],["b",1],[]],"passed":false},{"actual":["b",null,"b",null,[],["b",1],[]],"check":"recycled ack","expected":["b",null,"b",null,["a"],["b",1],[]],"passed":false},{"actual":["b",null,"b",2,[],["b",1],[]],"check":"offscreen","expected":["b",null,"b",2,["a"],["b",1],[]],"passed":false},{"actual":["a","tree:a",null,null,[],null,["a"]],"check":"collapse","expected":["a","tree:a",null,null,["a"],null,["a"]],"passed":false},{"actual":["a",null,"a",1,[],["a",1],[]],"check":"collapse offscreen","expected":["a",null,"a",1,["a"],["a",1],[]],"passed":false},{"actual":[null,null,null,null,[],null,[]],"check":"empty tree","expected":[null,null,null,null,["a"],null,[]],"passed":false},{"actual":["b",null,"b",null,[],["b",1],[]],"check":"no ack","expected":["b",null,"b",null,["a"],["b",1],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mounted lease\", \"actual\": [\"b\", \"tree:b\", null, null, [], null, [\"b\"]], \"expected\": [\"b\", \"tree:b\", null, null, [\"a\"], null, [\"b\"]], \"passed\": false}, {\"check\": \"old ack\", \"actual\": [\"b\", null, \"b\", null, [], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"passed\": false}, {\"check\": \"recycled ack\", \"actual\": [\"b\", null, \"b\", null, [], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"passed\": false}, {\"check\": \"offscreen\", \"actual\": [\"b\", null, \"b\", 2, [], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", 2, [\"a\"], [\"b\", 1], []], \"passed\": false}, {\"check\": \"collapse\", \"actual\": [\"a\", \"tree:a\", null, null, [], null, [\"a\"]], \"expected\": [\"a\", \"tree:a\", null, null, [\"a\"], null, [\"a\"]], \"passed\": false}, {\"check\": \"collapse offscreen\", \"actual\": [\"a\", null, \"a\", 1, [], [\"a\", 1], []], \"expected\": [\"a\", null, \"a\", 1, [\"a\"], [\"a\", 1], []], \"passed\": false}, {\"check\": \"empty tree\", \"actual\": [null, null, null, null, [], null, []], \"expected\": [null, null, null, null, [\"a\"], null, []], \"passed\": false}, {\"check\": \"no ack\", \"actual\": [\"b\", null, \"b\", null, [], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.106,"exit_code":1,"observations":[{"actual":["b","tree:b",null,null,["b"],null,["b"]],"check":"mounted lease","expected":["b","tree:b",null,null,["a"],null,["b"]],"passed":false},{"actual":["b",null,"b",null,["b"],["b",1],[]],"check":"old ack","expected":["b",null,"b",null,["a"],["b",1],[]],"passed":false},{"actual":["b",null,"b",null,["b"],["b",1],[]],"check":"recycled ack","expected":["b",null,"b",null,["a"],["b",1],[]],"passed":false},{"actual":["b",null,"b",2,["b"],["b",1],[]],"check":"offscreen","expected":["b",null,"b",2,["a"],["b",1],[]],"passed":false},{"actual":["a","tree:a",null,null,["a"],null,["a"]],"check":"collapse","expected":["a","tree:a",null,null,["a"],null,["a"]],"passed":true},{"actual":["a",null,"a",1,["a"],["a",1],[]],"check":"collapse offscreen","expected":["a",null,"a",1,["a"],["a",1],[]],"passed":true},{"actual":[null,null,null,null,[],null,[]],"check":"empty tree","expected":[null,null,null,null,["a"],null,[]],"passed":false},{"actual":["b",null,"b",null,["b"],["b",1],[]],"check":"no ack","expected":["b",null,"b",null,["a"],["b",1],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mounted lease\", \"actual\": [\"b\", \"tree:b\", null, null, [\"b\"], null, [\"b\"]], \"expected\": [\"b\", \"tree:b\", null, null, [\"a\"], null, [\"b\"]], \"passed\": false}, {\"check\": \"old ack\", \"actual\": [\"b\", null, \"b\", null, [\"b\"], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"passed\": false}, {\"check\": \"recycled ack\", \"actual\": [\"b\", null, \"b\", null, [\"b\"], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"passed\": false}, {\"check\": \"offscreen\", \"actual\": [\"b\", null, \"b\", 2, [\"b\"], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", 2, [\"a\"], [\"b\", 1], []], \"passed\": false}, {\"check\": \"collapse\", \"actual\": [\"a\", \"tree:a\", null, null, [\"a\"], null, [\"a\"]], \"expected\": [\"a\", \"tree:a\", null, null, [\"a\"], null, [\"a\"]], \"passed\": true}, {\"check\": \"collapse offscreen\", \"actual\": [\"a\", null, \"a\", 1, [\"a\"], [\"a\", 1], []], \"expected\": [\"a\", null, \"a\", 1, [\"a\"], [\"a\", 1], []], \"passed\": true}, {\"check\": \"empty tree\", \"actual\": [null, null, null, null, [], null, []], \"expected\": [null, null, null, null, [\"a\"], null, []], \"passed\": false}, {\"check\": \"no ack\", \"actual\": [\"b\", null, \"b\", null, [\"b\"], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.141,"exit_code":0,"observations":[{"actual":["b","tree:b",null,null,["a"],null,["b"]],"check":"mounted lease","expected":["b","tree:b",null,null,["a"],null,["b"]],"passed":true},{"actual":["b",null,"b",null,["a"],["b",1],[]],"check":"old ack","expected":["b",null,"b",null,["a"],["b",1],[]],"passed":true},{"actual":["b",null,"b",null,["a"],["b",1],[]],"check":"recycled ack","expected":["b",null,"b",null,["a"],["b",1],[]],"passed":true},{"actual":["b",null,"b",2,["a"],["b",1],[]],"check":"offscreen","expected":["b",null,"b",2,["a"],["b",1],[]],"passed":true},{"actual":["a","tree:a",null,null,["a"],null,["a"]],"check":"collapse","expected":["a","tree:a",null,null,["a"],null,["a"]],"passed":true},{"actual":["a",null,"a",1,["a"],["a",1],[]],"check":"collapse offscreen","expected":["a",null,"a",1,["a"],["a",1],[]],"passed":true},{"actual":[null,null,null,null,["a"],null,[]],"check":"empty tree","expected":[null,null,null,null,["a"],null,[]],"passed":true},{"actual":["b",null,"b",null,["a"],["b",1],[]],"check":"no ack","expected":["b",null,"b",null,["a"],["b",1],[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"mounted lease\", \"actual\": [\"b\", \"tree:b\", null, null, [\"a\"], null, [\"b\"]], \"expected\": [\"b\", \"tree:b\", null, null, [\"a\"], null, [\"b\"]], \"passed\": true}, {\"check\": \"old ack\", \"actual\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"passed\": true}, {\"check\": \"recycled ack\", \"actual\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"passed\": true}, {\"check\": \"offscreen\", \"actual\": [\"b\", null, \"b\", 2, [\"a\"], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", 2, [\"a\"], [\"b\", 1], []], \"passed\": true}, {\"check\": \"collapse\", \"actual\": [\"a\", \"tree:a\", null, null, [\"a\"], null, [\"a\"]], \"expected\": [\"a\", \"tree:a\", null, null, [\"a\"], null, [\"a\"]], \"passed\": true}, {\"check\": \"collapse offscreen\", \"actual\": [\"a\", null, \"a\", 1, [\"a\"], [\"a\", 1], []], \"expected\": [\"a\", null, \"a\", 1, [\"a\"], [\"a\", 1], []], \"passed\": true}, {\"check\": \"empty tree\", \"actual\": [null, null, null, null, [\"a\"], null, []], \"expected\": [null, null, null, null, [\"a\"], null, []], \"passed\": true}, {\"check\": \"no ack\", \"actual\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"expected\": [\"b\", null, \"b\", null, [\"a\"], [\"b\", 1], []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}