FA-39411 / Tree accessibility / Open access
Tree indentation disclosure hit region: Outside row edge is treated as a tree hit · case 01
Outside row edge is treated as a tree hit produces the wrong hierarchical widget state in a regression fixture.
ROOT CAUSE
The tree-hit-zone contract is violated at `0<=d['x']<d['width'] and 0<=d['y']<d['height']` by replacing it with `0<=d['x']<=d['width'] and 0<=d['y']<=d['height']`.
VERIFIED REPAIR
Restore `0<=d['x']<d['width'] and 0<=d['y']<d['height']` at this fault site while retaining the other tree state decisions.
Unsuccessful approach: The partial repair `0<=d['x']<d['width']` still violates a boundary or preservation case.
Case contract
Hit testing is in logical row coordinates after horizontal scrolling. Disclosure zone occupies one indent unit at the row depth; row text starts after it. Leaves have no disclosure action. RTL reflects the physical x coordinate. Drag handles and editable fields take priority over row selection.
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):
local=d['width']-d['x'] if d['rtl'] else d['x']
logical=local+d['scroll']
start=d['depth']*d['indent']
end=start+d['indent']
inside=0<=d['x']<=d['width'] and 0<=d['y']<=d['height']
disclosure=start<=logical<end and d['branch']
text=logical>=end
control=next((name for name,left,right in d['controls'] if left<=logical<right),None)
action=('control:'+control) if control is not None else ('toggle' if disclosure else ('select' if text else 'none'))
action=action if inside and not d['disabled'] else 'none'
return [action,logical,start,end]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('disclosure start', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 130, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 130, 'x': 110, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 130, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 130, 'x': 130, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 130, 20, 30]), ('bottom edge', {'width': 130, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 130, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 2: [('disclosure start', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 140, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 140, 'x': 120, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 140, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 140, 'x': 140, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 140, 20, 30]), ('bottom edge', {'width': 140, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 140, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 3: [('disclosure start', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 150, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 150, 'x': 130, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 150, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 150, 'x': 150, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 150, 20, 30]), ('bottom edge', {'width': 150, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 150, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 4: [('disclosure start', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 160, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 160, 'x': 140, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 160, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 160, 'x': 160, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 160, 20, 30]), ('bottom edge', {'width': 160, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 160, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 5: [('disclosure start', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 170, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 170, 'x': 150, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 170, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 170, 'x': 170, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 170, 20, 30]), ('bottom edge', {'width': 170, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 170, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])]}
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 |
|---|---|---|---|
| disclosure start | ['toggle', 20, 20, 30] | ['toggle', 20, 20, 30] | Passed |
| text boundary | ['select', 30, 20, 30] | ['select', 30, 20, 30] | Passed |
| leaf disclosure | ['none', 20, 20, 30] | ['none', 20, 20, 30] | Passed |
| leaf indent | ['none', 25, 20, 30] | ['none', 25, 20, 30] | Passed |
| scrolled control | ['control:edit', 30, 20, 30] | ['control:edit', 30, 20, 30] | Passed |
| RTL | ['toggle', 20, 20, 30] | ['toggle', 20, 20, 30] | Passed |
| scrolled | ['toggle', 20, 20, 30] | ['toggle', 20, 20, 30] | Passed |
| control overlay | ['control:edit', 20, 20, 30] | ['control:edit', 20, 20, 30] | Passed |
| control start | ['control:edit', 30, 20, 30] | ['control:edit', 30, 20, 30] | Passed |
| right edge | ['select', 130, 20, 30] | ['none', 130, 20, 30] | Failed |
| bottom edge | ['select', 40, 20, 30] | ['none', 40, 20, 30] | Failed |
| above row | ['none', 40, 20, 30] | ['none', 40, 20, 30] | Passed |
| disabled | ['none', 20, 20, 30] | ['none', 20, 20, 30] | Passed |
SHA-256 / 25ccb01c9159679d90d2dca8f5aaea9392561756460269f7c1d1f2e1d02113fa
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
local=d['width']-d['x'] if d['rtl'] else d['x']
logical=local+d['scroll']
start=d['depth']*d['indent']
end=start+d['indent']
inside=0<=d['x']<d['width']
disclosure=start<=logical<end and d['branch']
text=logical>=end
control=next((name for name,left,right in d['controls'] if left<=logical<right),None)
action=('control:'+control) if control is not None else ('toggle' if disclosure else ('select' if text else 'none'))
action=action if inside and not d['disabled'] else 'none'
return [action,logical,start,end]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('disclosure start', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 130, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 130, 'x': 110, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 130, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 130, 'x': 130, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 130, 20, 30]), ('bottom edge', {'width': 130, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 130, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 2: [('disclosure start', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 140, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 140, 'x': 120, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 140, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 140, 'x': 140, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 140, 20, 30]), ('bottom edge', {'width': 140, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 140, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 3: [('disclosure start', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 150, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 150, 'x': 130, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 150, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 150, 'x': 150, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 150, 20, 30]), ('bottom edge', {'width': 150, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 150, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 4: [('disclosure start', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 160, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 160, 'x': 140, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 160, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 160, 'x': 160, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 160, 20, 30]), ('bottom edge', {'width': 160, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 160, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 5: [('disclosure start', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 170, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 170, 'x': 150, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 170, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 170, 'x': 170, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 170, 20, 30]), ('bottom edge', {'width': 170, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 170, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])]}
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 |
|---|---|---|---|
| disclosure start | ['toggle', 20, 20, 30] | ['toggle', 20, 20, 30] | Passed |
| text boundary | ['select', 30, 20, 30] | ['select', 30, 20, 30] | Passed |
| leaf disclosure | ['none', 20, 20, 30] | ['none', 20, 20, 30] | Passed |
| leaf indent | ['none', 25, 20, 30] | ['none', 25, 20, 30] | Passed |
| scrolled control | ['control:edit', 30, 20, 30] | ['control:edit', 30, 20, 30] | Passed |
| RTL | ['toggle', 20, 20, 30] | ['toggle', 20, 20, 30] | Passed |
| scrolled | ['toggle', 20, 20, 30] | ['toggle', 20, 20, 30] | Passed |
| control overlay | ['control:edit', 20, 20, 30] | ['control:edit', 20, 20, 30] | Passed |
| control start | ['control:edit', 30, 20, 30] | ['control:edit', 30, 20, 30] | Passed |
| right edge | ['none', 130, 20, 30] | ['none', 130, 20, 30] | Passed |
| bottom edge | ['select', 40, 20, 30] | ['none', 40, 20, 30] | Failed |
| above row | ['select', 40, 20, 30] | ['none', 40, 20, 30] | Failed |
| disabled | ['none', 20, 20, 30] | ['none', 20, 20, 30] | Passed |
SHA-256 / a43d7be283688ebb0e1c51095a68e4e0c2d527bffd020feaaff00d08d104efe6
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
local=d['width']-d['x'] if d['rtl'] else d['x']
logical=local+d['scroll']
start=d['depth']*d['indent']
end=start+d['indent']
inside=0<=d['x']<d['width'] and 0<=d['y']<d['height']
disclosure=start<=logical<end and d['branch']
text=logical>=end
control=next((name for name,left,right in d['controls'] if left<=logical<right),None)
action=('control:'+control) if control is not None else ('toggle' if disclosure else ('select' if text else 'none'))
action=action if inside and not d['disabled'] else 'none'
return [action,logical,start,end]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('disclosure start', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 130, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 130, 'x': 110, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 130, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 130, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 130, 'x': 130, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 130, 20, 30]), ('bottom edge', {'width': 130, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 130, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 130, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 2: [('disclosure start', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 140, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 140, 'x': 120, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 140, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 140, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 140, 'x': 140, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 140, 20, 30]), ('bottom edge', {'width': 140, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 140, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 140, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 3: [('disclosure start', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 150, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 150, 'x': 130, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 150, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 150, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 150, 'x': 150, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 150, 20, 30]), ('bottom edge', {'width': 150, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 150, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 150, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 4: [('disclosure start', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 160, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 160, 'x': 140, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 160, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 160, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 160, 'x': 160, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 160, 20, 30]), ('bottom edge', {'width': 160, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 160, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 160, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])], 5: [('disclosure start', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('text boundary', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['select', 30, 20, 30]), ('leaf disclosure', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 20, 20, 30]), ('leaf indent', {'width': 170, 'x': 25, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': False, 'controls': [], 'disabled': False}, ['none', 25, 20, 30]), ('scrolled control', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('RTL', {'width': 170, 'x': 150, 'y': 3, 'rtl': True, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('scrolled', {'width': 170, 'x': 10, 'y': 3, 'rtl': False, 'scroll': 10, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['toggle', 20, 20, 30]), ('control overlay', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 20, 30]], 'disabled': False}, ['control:edit', 20, 20, 30]), ('control start', {'width': 170, 'x': 30, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [['edit', 30, 40]], 'disabled': False}, ['control:edit', 30, 20, 30]), ('right edge', {'width': 170, 'x': 170, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 170, 20, 30]), ('bottom edge', {'width': 170, 'x': 40, 'y': 20, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('above row', {'width': 170, 'x': 40, 'y': -1, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': False}, ['none', 40, 20, 30]), ('disabled', {'width': 170, 'x': 20, 'y': 3, 'rtl': False, 'scroll': 0, 'depth': 2, 'indent': 10, 'height': 20, 'branch': True, 'controls': [], 'disabled': True}, ['none', 20, 20, 30])]}
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 |
|---|---|---|---|
| disclosure start | ['toggle', 20, 20, 30] | ['toggle', 20, 20, 30] | Passed |
| text boundary | ['select', 30, 20, 30] | ['select', 30, 20, 30] | Passed |
| leaf disclosure | ['none', 20, 20, 30] | ['none', 20, 20, 30] | Passed |
| leaf indent | ['none', 25, 20, 30] | ['none', 25, 20, 30] | Passed |
| scrolled control | ['control:edit', 30, 20, 30] | ['control:edit', 30, 20, 30] | Passed |
| RTL | ['toggle', 20, 20, 30] | ['toggle', 20, 20, 30] | Passed |
| scrolled | ['toggle', 20, 20, 30] | ['toggle', 20, 20, 30] | Passed |
| control overlay | ['control:edit', 20, 20, 30] | ['control:edit', 20, 20, 30] | Passed |
| control start | ['control:edit', 30, 20, 30] | ['control:edit', 30, 20, 30] | Passed |
| right edge | ['none', 130, 20, 30] | ['none', 130, 20, 30] | Passed |
| bottom edge | ['none', 40, 20, 30] | ['none', 40, 20, 30] | Passed |
| above row | ['none', 40, 20, 30] | ['none', 40, 20, 30] | Passed |
| disabled | ['none', 20, 20, 30] | ['none', 20, 20, 30] | Passed |
SHA-256 / 20304ba39a6e1e4bffabb379ff1e7f67c5ca068994eac00355b418c4c7a0b015
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:20.973002+00:00.
Case digest / 8e3bf4c55b06953a31df912e06e889d9996dff9547301d21f400c7910b575173