FAILURE MAP
← Case archive

FA-38916 / Tree accessibility / Open access

Paged tree children accessibility merge: Repeated page entry corrupts newly loaded child order · case 01

Repeated page entry corrupts newly loaded child order produces the wrong hierarchical widget state in a regression fixture.

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

ROOT CAUSE

The sibling-page contract is violated at `new=list(dict.fromkeys(new))` by replacing it with `new=new`.

THE FAILURE

The sibling-page contract is violated at `new=list(dict.fromkeys(new))` by replacing it with `new=new`.

Unsuccessful approach: The partial repair `new=sorted(set(new))` 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=new
    nextcursor=d['next'] if accept else d['expected_cursor']
    more=nextcursor is not None
    size=d['total'] if accept and d['total'] is not None 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 fixtureActualExpectedOutcome
overlap page[['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b', 'y'], 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}]Failed
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', 'y'], '', 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}]Failed
empty terminal[['z', 'a'], {'a': 2, 'z': 1}, [], None, False, 0, 'p', {'a': 2, 'z': 1}][['z', 'a'], {'a': 2, 'z': 1}, [], None, False, 0, 'p', {'a': 2, 'z': 1}]Passed
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', 'y'], 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}]Failed
focus elsewhere[['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['y', 'b', 'y'], 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}]Failed

SHA-256 / aafb7a50da8330f4fd6177c9084425cd2e95582c64d26b746a1a4505d3560c72

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=sorted(set(new))
    nextcursor=d['next'] if accept else d['expected_cursor']
    more=nextcursor is not None
    size=d['total'] if accept and d['total'] is not None 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 fixtureActualExpectedOutcome
overlap page[['z', 'a', 'y', 'b'], {'a': 3, 'b': 8, 'y': 2, 'z': 1}, ['b', 'y'], None, False, 9, 'b', {'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, -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}, ['b', 'y'], '', True, 9, 'b', {'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, 0, 'p', {'a': 2, 'z': 1}][['z', 'a'], {'a': 2, 'z': 1}, [], None, False, 0, 'p', {'a': 2, 'z': 1}]Passed
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}, ['b', 'y'], None, False, -1, 'b', {'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}, ['b', 'y'], 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}]Failed

SHA-256 / 3af696c3b608c71c25a438fec9b732c3d2f128cdbc396c76e84b30e9212e0fe0

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 / 539df49b8b85b1137d31431e11629b6c0024396e4b1722c0168337e4602b3bb2