FA-39486 / Tree accessibility / Open access
Asynchronous tree reveal path: Reveal continuation includes completed prefix or drops pending path · case 01
Reveal continuation includes completed prefix or drops pending path produces the wrong hierarchical widget state in a regression fixture.
ROOT CAUSE
The reveal-path contract is violated at `d['path'][d['path'].index(reached)+1:] if current and reached in d['path'] else (d['path'] if current else [])` by replacing it with `d['path'][d['path'].index(reached):] if current and reached in d['path'] else (d['path'] if current else [])`.
VERIFIED REPAIR
Restore `d['path'][d['path'].index(reached)+1:] if current and reached in d['path'] else (d['path'] if current else [])` at this fault site while retaining the other tree state decisions.
Unsuccessful approach: The partial repair `[]` still violates a boundary or preservation case.
Case contract
Reveal consumes an ordered root-to-target path. Already loaded branches are opened in order until the first missing child link, then exactly one load is requested. Focus moves only when the target is visible and the request generation is current. A denied branch stops reveal before opening it.
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):
current=d['generation']==d['request_generation']
opened=set(d['opened']); request=None; blocked=None; reached=None
if current:
for i,node in enumerate(d['path']):
if node in d['denied']:
blocked=node; break
if i and node not in d['children'].get(d['path'][i-1],[]):
request=d['path'][i-1]; break
reached=node
if i<len(d['path'])-1: opened.add(node)
finished=current and bool(d['path']) and reached==d['path'][-1] and blocked is None and request is None
focus=d['path'][-1] if finished else d['focus']
pending=d['path'][d['path'].index(reached):] if current and reached in d['path'] else (d['path'] if current else [])
return [sorted(opened),request,blocked,finished,focus,pending]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('complete reveal', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 1, 'request_generation': 0, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 2: [('complete reveal', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 2, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 3: [('complete reveal', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 3, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 4: [('complete reveal', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 4, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 5: [('complete reveal', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 5, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| complete reveal | [['a', 'b', 'q', 'r'], None, None, True, 'c', ['c']] | [['a', 'b', 'q', 'r'], None, None, True, 'c', []] | Failed |
| missing deep child | [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['b', 'c']] | [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']] | Failed |
| wrong branch child | [['a', 'q', 'r'], 'a', None, False, 'q', ['a', 'b', 'c']] | [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']] | Failed |
| denied middle | [['a', 'q', 'r'], None, 'b', False, 'q', ['a', 'b', 'c']] | [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']] | Failed |
| stale request | [['q'], None, None, False, 'q', []] | [['q'], None, None, False, 'q', []] | Passed |
| empty path | [['q'], None, None, False, 'q', []] | [['q'], None, None, False, 'q', []] | Passed |
| denied root | [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']] | [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']] | Passed |
SHA-256 / 86cbbda8caaa2dc9ae91e4ef5deb8f5a8d87b932bfd50c79cf3fb54420ea2e6f
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
current=d['generation']==d['request_generation']
opened=set(d['opened']); request=None; blocked=None; reached=None
if current:
for i,node in enumerate(d['path']):
if node in d['denied']:
blocked=node; break
if i and node not in d['children'].get(d['path'][i-1],[]):
request=d['path'][i-1]; break
reached=node
if i<len(d['path'])-1: opened.add(node)
finished=current and bool(d['path']) and reached==d['path'][-1] and blocked is None and request is None
focus=d['path'][-1] if finished else d['focus']
pending=[]
return [sorted(opened),request,blocked,finished,focus,pending]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('complete reveal', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 1, 'request_generation': 0, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 2: [('complete reveal', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 2, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 3: [('complete reveal', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 3, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 4: [('complete reveal', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 4, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 5: [('complete reveal', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 5, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| complete reveal | [['a', 'b', 'q', 'r'], None, None, True, 'c', []] | [['a', 'b', 'q', 'r'], None, None, True, 'c', []] | Passed |
| missing deep child | [['a', 'b', 'q', 'r'], 'b', None, False, 'q', []] | [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']] | Failed |
| wrong branch child | [['a', 'q', 'r'], 'a', None, False, 'q', []] | [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']] | Failed |
| denied middle | [['a', 'q', 'r'], None, 'b', False, 'q', []] | [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']] | Failed |
| stale request | [['q'], None, None, False, 'q', []] | [['q'], None, None, False, 'q', []] | Passed |
| empty path | [['q'], None, None, False, 'q', []] | [['q'], None, None, False, 'q', []] | Passed |
| denied root | [['q'], None, 'r', False, 'q', []] | [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']] | Failed |
SHA-256 / 2c6a55fc597900dc05eb49f81950332f1fdf8d7cb0d3956ea64fbb5e54cb840a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
current=d['generation']==d['request_generation']
opened=set(d['opened']); request=None; blocked=None; reached=None
if current:
for i,node in enumerate(d['path']):
if node in d['denied']:
blocked=node; break
if i and node not in d['children'].get(d['path'][i-1],[]):
request=d['path'][i-1]; break
reached=node
if i<len(d['path'])-1: opened.add(node)
finished=current and bool(d['path']) and reached==d['path'][-1] and blocked is None and request is None
focus=d['path'][-1] if finished else d['focus']
pending=d['path'][d['path'].index(reached)+1:] if current and reached in d['path'] else (d['path'] if current else [])
return [sorted(opened),request,blocked,finished,focus,pending]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('complete reveal', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 1, 'request_generation': 0, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 1, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 2: [('complete reveal', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 2, 'request_generation': 1, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 2, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 3: [('complete reveal', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 3, 'request_generation': 2, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 3, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 4: [('complete reveal', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 4, 'request_generation': 3, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 4, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])], 5: [('complete reveal', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], None, None, True, 'c', []]), ('missing deep child', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': []}, 'focus': 'q'}, [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']]), ('wrong branch child', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a', 'b'], 'a': [], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']]), ('denied middle', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['b'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']]), ('stale request', {'generation': 5, 'request_generation': 4, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('empty path', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': [], 'denied': [], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, None, False, 'q', []]), ('denied root', {'generation': 5, 'request_generation': 5, 'opened': ['q'], 'path': ['r', 'a', 'b', 'c'], 'denied': ['r'], 'children': {'r': ['a'], 'a': ['b'], 'b': ['c']}, 'focus': 'q'}, [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']])]}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| complete reveal | [['a', 'b', 'q', 'r'], None, None, True, 'c', []] | [['a', 'b', 'q', 'r'], None, None, True, 'c', []] | Passed |
| missing deep child | [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']] | [['a', 'b', 'q', 'r'], 'b', None, False, 'q', ['c']] | Passed |
| wrong branch child | [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']] | [['a', 'q', 'r'], 'a', None, False, 'q', ['b', 'c']] | Passed |
| denied middle | [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']] | [['a', 'q', 'r'], None, 'b', False, 'q', ['b', 'c']] | Passed |
| stale request | [['q'], None, None, False, 'q', []] | [['q'], None, None, False, 'q', []] | Passed |
| empty path | [['q'], None, None, False, 'q', []] | [['q'], None, None, False, 'q', []] | Passed |
| denied root | [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']] | [['q'], None, 'r', False, 'q', ['r', 'a', 'b', 'c']] | Passed |
SHA-256 / ba73f8635d9cb8e4ebaa8bece3eea4a9c71c252b41b089c616f8b51b8eadfb28
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:21.693058+00:00.
Case digest / 68fd674c40e4ac12d4c9c3f34e4dab18e1f2855441f57bd3d8b5e7f9728bdf8f