FAILURE MAP
← Case archive

FA-38521 / Tree accessibility / Open access

Lazy tree branch request lifecycle: Branch completeness mistakes empty page or empty cursor for terminal · case 01

Branch completeness mistakes empty page or empty cursor for terminal produces the wrong hierarchical widget state in a regression fixture.

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

ROOT CAUSE

The lazy-request contract is violated at `(d['next'] is None) if accept else d['complete']` by replacing it with `(not children) if accept else d['complete']`.

VERIFIED REPAIR

Restore `(d['next'] is None) if accept else d['complete']` at this fault site while retaining the other tree state decisions.

Unsuccessful approach: The partial repair `(not d['next']) if accept else d['complete']` still violates a boundary or preservation case.

Case contract

A request is accepted only for a live open branch with matching epoch and token. Accepted pages replace a placeholder with deduplicated child IDs, clear busy/error state, and derive completeness from a next cursor. Rejected responses preserve all branch state.

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):
    match=d['reply_epoch']==d['epoch'] and d['reply_token']==d['token']
    accept=match and d['live'] and d['open']
    children=list(dict.fromkeys(d['reply'])) if accept else d['children']
    busy=False if accept else d['busy']
    error=None if accept else d['error']
    cursor=d['next'] if accept else d['cursor']
    complete=(not children) if accept else d['complete']
    placeholder=False if accept else d['placeholder']
    token=None if accept else d['token']
    focus=(children[0] if children else d['parent']) if accept and d['focus']=='placeholder' else d['focus']
    return [children,busy,error,cursor,complete,placeholder,token,focus]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('accepted', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 0, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0'], False, None, None, True, False, None, 'outside'])], 2: [('accepted', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 1, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1'], False, None, None, True, False, None, 'outside'])], 3: [('accepted', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 2, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1', 'c2'], False, None, None, True, False, None, 'outside'])], 4: [('accepted', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 3, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1', 'c2', 'c3'], False, None, None, True, False, None, 'outside'])], 5: [('accepted', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3', 'c4'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 4, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3', 'c4'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1', 'c2', 'c3', 'c4'], False, None, None, True, False, None, 'outside'])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
accepted[['z', 'c0'], False, None, None, False, False, None, 'z'][['z', 'c0'], False, None, None, True, False, None, 'z']Failed
old epoch[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
old token[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
collapsed[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
deleted[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
empty terminal[[], False, None, None, True, False, None, 'p'][[], False, None, None, True, False, None, 'p']Passed
empty cursor[['z', 'c0'], False, None, '', False, False, None, 'z'][['z', 'c0'], False, None, '', False, False, None, 'z']Passed
focus elsewhere[['z', 'c0'], False, None, None, False, False, None, 'outside'][['z', 'c0'], False, None, None, True, False, None, 'outside']Failed

SHA-256 / 5e78b6e906888517a17de8950eaeca0bdbaa8f83875758192e18d7f10ea4fb48

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    match=d['reply_epoch']==d['epoch'] and d['reply_token']==d['token']
    accept=match and d['live'] and d['open']
    children=list(dict.fromkeys(d['reply'])) if accept else d['children']
    busy=False if accept else d['busy']
    error=None if accept else d['error']
    cursor=d['next'] if accept else d['cursor']
    complete=(not d['next']) if accept else d['complete']
    placeholder=False if accept else d['placeholder']
    token=None if accept else d['token']
    focus=(children[0] if children else d['parent']) if accept and d['focus']=='placeholder' else d['focus']
    return [children,busy,error,cursor,complete,placeholder,token,focus]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('accepted', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 0, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0'], False, None, None, True, False, None, 'outside'])], 2: [('accepted', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 1, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1'], False, None, None, True, False, None, 'outside'])], 3: [('accepted', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 2, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1', 'c2'], False, None, None, True, False, None, 'outside'])], 4: [('accepted', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 3, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1', 'c2', 'c3'], False, None, None, True, False, None, 'outside'])], 5: [('accepted', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3', 'c4'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 4, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3', 'c4'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1', 'c2', 'c3', 'c4'], False, None, None, True, False, None, 'outside'])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
accepted[['z', 'c0'], False, None, None, True, False, None, 'z'][['z', 'c0'], False, None, None, True, False, None, 'z']Passed
old epoch[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
old token[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
collapsed[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
deleted[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
empty terminal[[], False, None, None, True, False, None, 'p'][[], False, None, None, True, False, None, 'p']Passed
empty cursor[['z', 'c0'], False, None, '', True, False, None, 'z'][['z', 'c0'], False, None, '', False, False, None, 'z']Failed
focus elsewhere[['z', 'c0'], False, None, None, True, False, None, 'outside'][['z', 'c0'], False, None, None, True, False, None, 'outside']Passed

SHA-256 / ec2532579794085b8345114a99cae6b2bc564edf3d081901891b3785b24b0179

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    match=d['reply_epoch']==d['epoch'] and d['reply_token']==d['token']
    accept=match and d['live'] and d['open']
    children=list(dict.fromkeys(d['reply'])) if accept else d['children']
    busy=False if accept else d['busy']
    error=None if accept else d['error']
    cursor=d['next'] if accept else d['cursor']
    complete=(d['next'] is None) if accept else d['complete']
    placeholder=False if accept else d['placeholder']
    token=None if accept else d['token']
    focus=(children[0] if children else d['parent']) if accept and d['focus']=='placeholder' else d['focus']
    return [children,busy,error,cursor,complete,placeholder,token,focus]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('accepted', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 0, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 1, 'epoch': 1, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0'], False, None, None, True, False, None, 'outside'])], 2: [('accepted', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 1, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 2, 'epoch': 2, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1'], False, None, None, True, False, None, 'outside'])], 3: [('accepted', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 2, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 3, 'epoch': 3, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1', 'c2'], False, None, None, True, False, None, 'outside'])], 4: [('accepted', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 3, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 4, 'epoch': 4, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1', 'c2', 'c3'], False, None, None, True, False, None, 'outside'])], 5: [('accepted', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3', 'c4'], False, None, None, True, False, None, 'z']), ('old epoch', {'reply_epoch': 4, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('old token', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 'old', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('collapsed', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': False, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('deleted', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': False, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']), ('empty terminal', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': [], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [[], False, None, None, True, False, None, 'p']), ('empty cursor', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': '', 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'placeholder'}, [['z', 'c0', 'c1', 'c2', 'c3', 'c4'], False, None, '', False, False, None, 'z']), ('focus elsewhere', {'reply_epoch': 5, 'epoch': 5, 'reply_token': 't', 'token': 't', 'live': True, 'open': True, 'reply': ['z', 'c0', 'c1', 'c2', 'c3', 'c4', 'z'], 'children': ['old'], 'busy': True, 'error': 'old-error', 'next': None, 'cursor': 'oldcursor', 'complete': False, 'placeholder': True, 'parent': 'p', 'focus': 'outside'}, [['z', 'c0', 'c1', 'c2', 'c3', 'c4'], False, None, None, True, False, None, 'outside'])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
accepted[['z', 'c0'], False, None, None, True, False, None, 'z'][['z', 'c0'], False, None, None, True, False, None, 'z']Passed
old epoch[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
old token[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
collapsed[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
deleted[['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder'][['old'], True, 'old-error', 'oldcursor', False, True, 't', 'placeholder']Passed
empty terminal[[], False, None, None, True, False, None, 'p'][[], False, None, None, True, False, None, 'p']Passed
empty cursor[['z', 'c0'], False, None, '', False, False, None, 'z'][['z', 'c0'], False, None, '', False, False, None, 'z']Passed
focus elsewhere[['z', 'c0'], False, None, None, True, False, None, 'outside'][['z', 'c0'], False, None, None, True, False, None, 'outside']Passed

SHA-256 / 1ecc9bb995dd535ec2c2ef3c7eb8af52ab37ca34c06032e7d4038de6bdee2d08

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:12.043694+00:00.

Case digest / 750568c493bb5d83419c1c7322b2c36db07cd675340c659fd8f72232d5184e08