FA-38931 / Tree accessibility / Open access
Paged tree children accessibility merge: Logical child total is replaced by mounted count · case 01
Logical child total is replaced by mounted count produces the wrong hierarchical widget state in a regression fixture.
ROOT CAUSE
The sibling-page contract is violated at `d['total'] if accept and d['total'] is not None else d['size']` by replacing it with `len(order)`.
THE FAILURE
The sibling-page contract is violated at `d['total'] if accept and d['total'] is not None else d['size']` by replacing it with `len(order)`.
Unsuccessful approach: The partial repair `d['total'] if accept and d['total'] else d['size']` still violates a boundary or preservation case.
Case contract
Only the expected cursor and branch revision admit a page. Repeated child IDs preserve their first position but update their record. An empty string is a valid next cursor. Logical count is authoritative when supplied; otherwise unknown. Focus on the load-more row moves to first newly inserted child, or parent if no continuation.
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):
accept=d['cursor']==d['expected_cursor'] and d['revision']==d['expected_revision']
order=list(dict.fromkeys(d['order']+[r[0] for r in d['page']])) if accept else d['order']
records=dict(d['records'])
if accept: records.update(dict(d['page']))
new=[r[0] for r in d['page'] if r[0] not in d['order']] if accept else []
new=list(dict.fromkeys(new))
nextcursor=d['next'] if accept else d['expected_cursor']
more=nextcursor is not None
size=len(order)
focus=(new[0] if new else (d['parent'] if not more else d['focus'])) if accept and d['focus']=='more' else d['focus']
positions={x:i+1 for i,x in enumerate(order)}
return [order,records,new,nextcursor,more,size,focus,positions]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 2, 'b': 8}, ['y', 'b'], None, False, 9, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 0, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': '', 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 2, 'b': 8}, ['y', 'b'], '', True, 9, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 9, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 2, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': 9, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 2, 'b': 8}, ['y', 'b'], None, False, 9, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])], 2: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 3, 'b': 8}, ['y', 'b'], None, False, 10, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': '', 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 3, 'b': 8}, ['y', 'b'], '', True, 10, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 10, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 3, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': 10, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 3, 'b': 8}, ['y', 'b'], None, False, 10, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])], 3: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 4, 'b': 8}, ['y', 'b'], None, False, 11, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': '', 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 4, 'b': 8}, ['y', 'b'], '', True, 11, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 11, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 4, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': 11, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 4, 'b': 8}, ['y', 'b'], None, False, 11, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])], 4: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 5, 'b': 8}, ['y', 'b'], None, False, 12, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': '', 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 5, 'b': 8}, ['y', 'b'], '', True, 12, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 12, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 5, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': 12, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 5, 'b': 8}, ['y', 'b'], None, False, 12, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])], 5: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 6, 'b': 8}, ['y', 'b'], None, False, 13, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': '', 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 6, 'b': 8}, ['y', 'b'], '', True, 13, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 13, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 6, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': 13, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 6, 'b': 8}, ['y', 'b'], None, False, 13, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])]}
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 |
|---|---|---|---|
| overlap page | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, 4, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, 9, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | Failed |
| stale cursor | [['z', 'a'], {'a': 2, 'z': 1}, [], 'c', True, 2, 'more', {'a': 2, 'z': 1}] | [['z', 'a'], {'a': 2, 'z': 1}, [], 'c', True, -1, 'more', {'a': 2, 'z': 1}] | Failed |
| stale revision | [['z', 'a'], {'a': 2, 'z': 1}, [], 'c', True, 2, 'more', {'a': 2, 'z': 1}] | [['z', 'a'], {'a': 2, 'z': 1}, [], 'c', True, -1, 'more', {'a': 2, 'z': 1}] | Failed |
| empty cursor | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], '', True, 4, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], '', True, 9, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | Failed |
| empty terminal | [['z', 'a'], {'a': 2, 'z': 1}, [], None, False, 2, 'p', {'a': 2, 'z': 1}] | [['z', 'a'], {'a': 2, 'z': 1}, [], None, False, 0, 'p', {'a': 2, 'z': 1}] | Failed |
| empty continued | [['z', 'a'], {'a': 2, 'z': 1}, [], 'x', True, 2, 'more', {'a': 2, 'z': 1}] | [['z', 'a'], {'a': 2, 'z': 1}, [], 'x', True, 9, 'more', {'a': 2, 'z': 1}] | Failed |
| unknown total | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, 4, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, -1, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | Failed |
| focus elsewhere | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, 4, 'z', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, 9, 'z', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | Failed |
SHA-256 / 3794bf79231ef22b7be3e66f4b00d96f9ef9fa9989dfe772fd80dee5132c8f6d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
accept=d['cursor']==d['expected_cursor'] and d['revision']==d['expected_revision']
order=list(dict.fromkeys(d['order']+[r[0] for r in d['page']])) if accept else d['order']
records=dict(d['records'])
if accept: records.update(dict(d['page']))
new=[r[0] for r in d['page'] if r[0] not in d['order']] if accept else []
new=list(dict.fromkeys(new))
nextcursor=d['next'] if accept else d['expected_cursor']
more=nextcursor is not None
size=d['total'] if accept and d['total'] else d['size']
focus=(new[0] if new else (d['parent'] if not more else d['focus'])) if accept and d['focus']=='more' else d['focus']
positions={x:i+1 for i,x in enumerate(order)}
return [order,records,new,nextcursor,more,size,focus,positions]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 2, 'b': 8}, ['y', 'b'], None, False, 9, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 0, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': '', 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 2, 'b': 8}, ['y', 'b'], '', True, 9, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 9, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 9, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 2, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 1, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 1], ['b', 8], ['y', 2]], 'next': None, 'total': 9, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 2, 'b': 8}, ['y', 'b'], None, False, 9, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])], 2: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 3, 'b': 8}, ['y', 'b'], None, False, 10, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 1, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': '', 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 3, 'b': 8}, ['y', 'b'], '', True, 10, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 10, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 10, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 3, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 2, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 2], ['b', 8], ['y', 3]], 'next': None, 'total': 10, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 3, 'b': 8}, ['y', 'b'], None, False, 10, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])], 3: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 4, 'b': 8}, ['y', 'b'], None, False, 11, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 2, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': '', 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 4, 'b': 8}, ['y', 'b'], '', True, 11, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 11, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 11, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 4, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 3, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 3], ['b', 8], ['y', 4]], 'next': None, 'total': 11, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 4, 'b': 8}, ['y', 'b'], None, False, 11, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])], 4: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 5, 'b': 8}, ['y', 'b'], None, False, 12, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 3, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': '', 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 5, 'b': 8}, ['y', 'b'], '', True, 12, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 12, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 12, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 5, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 4, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 4], ['b', 8], ['y', 5]], 'next': None, 'total': 12, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 5, 'b': 8}, ['y', 'b'], None, False, 12, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])], 5: [('overlap page', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 6, 'b': 8}, ['y', 'b'], None, False, 13, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('stale cursor', {'cursor': 'old', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('stale revision', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 4, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'c', True, -1, 'more', {'z': 1, 'a': 2}]), ('empty cursor', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': '', 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 6, 'b': 8}, ['y', 'b'], '', True, 13, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('empty terminal', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': None, 'total': 0, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], None, False, 0, 'p', {'z': 1, 'a': 2}]), ('empty continued', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [], 'next': 'x', 'total': 13, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a'], {'z': 1, 'a': 2}, [], 'x', True, 13, 'more', {'z': 1, 'a': 2}]), ('unknown total', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': None, 'size': -1, 'focus': 'more', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 6, 'b': 8}, ['y', 'b'], None, False, -1, 'y', {'z': 1, 'a': 2, 'y': 3, 'b': 4}]), ('focus elsewhere', {'cursor': 'c', 'expected_cursor': 'c', 'revision': 5, 'expected_revision': 5, 'order': ['z', 'a'], 'records': {'z': 1, 'a': 2}, 'page': [['a', 3], ['y', 5], ['b', 8], ['y', 6]], 'next': None, 'total': 13, 'size': -1, 'focus': 'z', 'parent': 'p'}, [['z', 'a', 'y', 'b'], {'z': 1, 'a': 3, 'y': 6, 'b': 8}, ['y', 'b'], None, False, 13, 'z', {'z': 1, 'a': 2, 'y': 3, 'b': 4}])]}
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 |
|---|---|---|---|
| overlap page | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, 9, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, 9, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | Passed |
| stale cursor | [['z', 'a'], {'a': 2, 'z': 1}, [], 'c', True, -1, 'more', {'a': 2, 'z': 1}] | [['z', 'a'], {'a': 2, 'z': 1}, [], 'c', True, -1, 'more', {'a': 2, 'z': 1}] | Passed |
| stale revision | [['z', 'a'], {'a': 2, 'z': 1}, [], 'c', True, -1, 'more', {'a': 2, 'z': 1}] | [['z', 'a'], {'a': 2, 'z': 1}, [], 'c', True, -1, 'more', {'a': 2, 'z': 1}] | Passed |
| empty cursor | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], '', True, 9, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], '', True, 9, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | Passed |
| empty terminal | [['z', 'a'], {'a': 2, 'z': 1}, [], None, False, -1, 'p', {'a': 2, 'z': 1}] | [['z', 'a'], {'a': 2, 'z': 1}, [], None, False, 0, 'p', {'a': 2, 'z': 1}] | Failed |
| empty continued | [['z', 'a'], {'a': 2, 'z': 1}, [], 'x', True, 9, 'more', {'a': 2, 'z': 1}] | [['z', 'a'], {'a': 2, 'z': 1}, [], 'x', True, 9, 'more', {'a': 2, 'z': 1}] | Passed |
| unknown total | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, -1, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, -1, 'y', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | Passed |
| focus elsewhere | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, 9, 'z', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | [['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b'], None, False, 9, 'z', {'a': 2, 'b': 4, 'y': 3, 'z': 1}] | Passed |
SHA-256 / e60e625f892a89021c7c02228bfcb01d922634a702153b8b0c3c0a4e32e68c69
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:16.280880+00:00.
Case digest / ccc5c790fde77646a3f9c3494a8d1b182075aaee34ae587f5174affcc216f914