broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'initial': return d['pending'] and not d['rows']
    if event == 'refreshing': return d['pending'] and bool(d['rows'])
    if event == 'empty': return d['settled'] and not d['pending'] and not d['rows'] and d['error'] is None
    if event == 'error': return d['error'] if d['error_epoch']==d['epoch'] else None
    if event == 'selectable': return d['rows'] if d['rows_query']==d['query'] else []
    if event == 'cancel': return None if d['cancelled'] else d['error']
    if event == 'busy': return d['pending']
    if event == 'preserve': return d['rows']
    if event == 'status-priority': return 'error' if d['error'] else 'loading' if d['pending'] else 'empty' if not d['rows'] else 'results'
    if event == 'retry-label': return {'query':d['error'],'error':d['error']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pending':True,'rows':['a'],'query':'pe','rows_query':'p','error':'timeout','error_epoch':N-1,'epoch':N,'settled':False,'cancelled':True}
boundary = {'pending':False,'rows':[],'query':'','rows_query':'','error':None,'error_epoch':N,'epoch':N,'settled':True,'cancelled':False}
check('normal initial', solve('initial', normal), False)
check('boundary initial', solve('initial', boundary), False)
check('normal refreshing', solve('refreshing', normal), True)
check('boundary refreshing', solve('refreshing', boundary), False)
check('normal empty', solve('empty', normal), False)
check('boundary empty', solve('empty', boundary), True)
check('normal error', solve('error', normal), None)
check('boundary error', solve('error', boundary), None)
check('normal selectable', solve('selectable', normal), [])
check('boundary selectable', solve('selectable', boundary), [])
check('normal cancel', solve('cancel', normal), None)
check('boundary cancel', solve('cancel', boundary), None)
check('normal busy', solve('busy', normal), True)
check('boundary busy', solve('busy', boundary), False)
check('normal preserve', solve('preserve', normal), ['a'])
check('boundary preserve', solve('preserve', boundary), [])
check('normal status-priority', solve('status-priority', normal), 'error')
check('boundary status-priority', solve('status-priority', boundary), 'empty')
check('normal retry-label', solve('retry-label', normal), {'query':'pe','error':'timeout'})
check('boundary retry-label', solve('retry-label', boundary), {'query':'','error':None})
variant = dict(normal, **{'query':'q'*N})
check('variant query or selection payload', solve('retry-label', variant), {'query':'q'*N,'error':'timeout'})
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'initial': return d['pending'] and not d['rows']
    if event == 'refreshing': return d['pending'] and bool(d['rows'])
    if event == 'empty': return d['settled'] and not d['pending'] and not d['rows'] and d['error'] is None
    if event == 'error': return d['error'] if d['error_epoch']==d['epoch'] else None
    if event == 'selectable': return d['rows'] if d['rows_query']==d['query'] else []
    if event == 'cancel': return None if d['cancelled'] else d['error']
    if event == 'busy': return d['pending']
    if event == 'preserve': return d['rows']
    if event == 'status-priority': return 'error' if d['error'] else 'loading' if d['pending'] else 'empty' if not d['rows'] else 'results'
    if event == 'retry-label': return {'query':d['rows_query'],'error':d['error']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pending':True,'rows':['a'],'query':'pe','rows_query':'p','error':'timeout','error_epoch':N-1,'epoch':N,'settled':False,'cancelled':True}
boundary = {'pending':False,'rows':[],'query':'','rows_query':'','error':None,'error_epoch':N,'epoch':N,'settled':True,'cancelled':False}
check('normal initial', solve('initial', normal), False)
check('boundary initial', solve('initial', boundary), False)
check('normal refreshing', solve('refreshing', normal), True)
check('boundary refreshing', solve('refreshing', boundary), False)
check('normal empty', solve('empty', normal), False)
check('boundary empty', solve('empty', boundary), True)
check('normal error', solve('error', normal), None)
check('boundary error', solve('error', boundary), None)
check('normal selectable', solve('selectable', normal), [])
check('boundary selectable', solve('selectable', boundary), [])
check('normal cancel', solve('cancel', normal), None)
check('boundary cancel', solve('cancel', boundary), None)
check('normal busy', solve('busy', normal), True)
check('boundary busy', solve('busy', boundary), False)
check('normal preserve', solve('preserve', normal), ['a'])
check('boundary preserve', solve('preserve', boundary), [])
check('normal status-priority', solve('status-priority', normal), 'error')
check('boundary status-priority', solve('status-priority', boundary), 'empty')
check('normal retry-label', solve('retry-label', normal), {'query':'pe','error':'timeout'})
check('boundary retry-label', solve('retry-label', boundary), {'query':'','error':None})
variant = dict(normal, **{'query':'q'*N})
check('variant query or selection payload', solve('retry-label', variant), {'query':'q'*N,'error':'timeout'})
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The retry-label completion transition produces an incorrect observable state.

A loading snapshot distinguishes initial loading, background refreshing, settled-empty, error and cancellation. Only settled successful empty responses show no-results. Existing rows may remain visible during refresh but are bound to the draft they represent; stale errors never overwrite a newer query status.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['page']
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+d['page']
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The append completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['rows']+d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['rows']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The first completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['used']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return None
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The continuation completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return True
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return bool(d['rows']) or not d['page']
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The has-more completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']<=d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return False
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The page-epoch completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return len(d['page'])+d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return len(d['rows'])-1 if d['rows'] else 0
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The active completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return None
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['active']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The value completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['cursor']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return ''
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The draft completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return d['cursor'] is not None
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return True
    if event == 'footer': return len(d['rows'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The more-busy completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])+(d['cursor'] is not None)
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
    if event == 'first': return d['page']
    if event == 'continuation': return d['cursor']
    if event == 'has-more': return d['cursor'] is not None
    if event == 'page-epoch': return d['page_epoch']==d['epoch']
    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
    if event == 'value': return d['value']
    if event == 'draft': return d['draft']
    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
    if event == 'footer': return len(d['rows'])+1
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), 'q'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The footer completion transition produces an incorrect observable state.

Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['hover']
    if event == 'same-row': return d['pressed'] is not None and d['pressed']==d['released']
    if event == 'same-pointer': return d['pointer']==d['release_pointer']
    if event == 'inside': return d['inside']
    if event == 'slop': return d['distance']<=d['slop']
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['released']
    if event == 'same-row': return d['pressed'] is not None and d['pressed']==d['released']
    if event == 'same-pointer': return d['pointer']==d['release_pointer']
    if event == 'inside': return d['inside']
    if event == 'slop': return d['distance']<=d['slop']
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The capture completion transition produces an incorrect observable state.

Pointer acceptance captures option identity on press; release must match the captured pointer and row, remain inside, and exceed neither drag slop nor query epoch. Blur defers while a valid option press is pending. Hover is only preview and never a value commit.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['pressed']
    if event == 'same-row': return d['pressed'] is not None
    if event == 'same-pointer': return d['pointer']==d['release_pointer']
    if event == 'inside': return d['inside']
    if event == 'slop': return d['distance']<=d['slop']
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['pressed']
    if event == 'same-row': return d['pressed']==d['released']
    if event == 'same-pointer': return d['pointer']==d['release_pointer']
    if event == 'inside': return d['inside']
    if event == 'slop': return d['distance']<=d['slop']
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The same-row completion transition produces an incorrect observable state.

Pointer acceptance captures option identity on press; release must match the captured pointer and row, remain inside, and exceed neither drag slop nor query epoch. Blur defers while a valid option press is pending. Hover is only preview and never a value commit.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['pressed']
    if event == 'same-row': return d['pressed'] is not None and d['pressed']==d['released']
    if event == 'same-pointer': return True
    if event == 'inside': return d['inside']
    if event == 'slop': return d['distance']<=d['slop']
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['pressed']
    if event == 'same-row': return d['pressed'] is not None and d['pressed']==d['released']
    if event == 'same-pointer': return d['pointer']<=d['release_pointer']
    if event == 'inside': return d['inside']
    if event == 'slop': return d['distance']<=d['slop']
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The same-pointer completion transition produces an incorrect observable state.

Pointer acceptance captures option identity on press; release must match the captured pointer and row, remain inside, and exceed neither drag slop nor query epoch. Blur defers while a valid option press is pending. Hover is only preview and never a value commit.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['pressed']
    if event == 'same-row': return d['pressed'] is not None and d['pressed']==d['released']
    if event == 'same-pointer': return d['pointer']==d['release_pointer']
    if event == 'inside': return True
    if event == 'slop': return d['distance']<=d['slop']
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['pressed']
    if event == 'same-row': return d['pressed'] is not None and d['pressed']==d['released']
    if event == 'same-pointer': return d['pointer']==d['release_pointer']
    if event == 'inside': return d['pressed'] is not None
    if event == 'slop': return d['distance']<=d['slop']
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The inside completion transition produces an incorrect observable state.

Pointer acceptance captures option identity on press; release must match the captured pointer and row, remain inside, and exceed neither drag slop nor query epoch. Blur defers while a valid option press is pending. Hover is only preview and never a value commit.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['pressed']
    if event == 'same-row': return d['pressed'] is not None and d['pressed']==d['released']
    if event == 'same-pointer': return d['pointer']==d['release_pointer']
    if event == 'inside': return d['inside']
    if event == 'slop': return True
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(event, d):
    if event == 'capture': return d['pressed']
    if event == 'same-row': return d['pressed'] is not None and d['pressed']==d['released']
    if event == 'same-pointer': return d['pointer']==d['release_pointer']
    if event == 'inside': return d['inside']
    if event == 'slop': return d['distance']<d['slop']
    if event == 'fresh': return d['press_epoch']==d['epoch']
    if event == 'blur-defer': return d['pressed'] is not None
    if event == 'hover-value': return d['value']
    if event == 'cancel': return {'pressed':None,'pointer':None}
    if event == 'press-epoch': return d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'pressed':'a','released':'b','pointer':N,'release_pointer':N+1,'inside':False,'distance':8,'slop':3,'epoch':N,'press_epoch':N-1,'hover':'c','value':'v'}
boundary = {'pressed':None,'released':None,'pointer':N,'release_pointer':N,'inside':True,'distance':0,'slop':0,'epoch':N,'press_epoch':N,'hover':None,'value':None}
check('normal capture', solve('capture', normal), 'a')
check('boundary capture', solve('capture', boundary), None)
check('normal same-row', solve('same-row', normal), False)
check('boundary same-row', solve('same-row', boundary), False)
check('normal same-pointer', solve('same-pointer', normal), False)
check('boundary same-pointer', solve('same-pointer', boundary), True)
check('normal inside', solve('inside', normal), False)
check('boundary inside', solve('inside', boundary), True)
check('normal slop', solve('slop', normal), False)
check('boundary slop', solve('slop', boundary), True)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal blur-defer', solve('blur-defer', normal), True)
check('boundary blur-defer', solve('blur-defer', boundary), False)
check('normal hover-value', solve('hover-value', normal), 'v')
check('boundary hover-value', solve('hover-value', boundary), None)
check('normal cancel', solve('cancel', normal), {'pressed':None,'pointer':None})
check('boundary cancel', solve('cancel', boundary), {'pressed':None,'pointer':None})
check('normal press-epoch', solve('press-epoch', normal), N)
check('boundary press-epoch', solve('press-epoch', boundary), N)
variant = dict(normal, **{'pressed':'id'+str(N)})
check('variant query or selection payload', solve('capture', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
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)

prompt:
The slop completion transition produces an incorrect observable state.

Pointer acceptance captures option identity on press; release must match the captured pointer and row, remain inside, and exceed neither drag slop nor query epoch. Blur defers while a valid option press is pending. Hover is only preview and never a value commit.

split: open-access