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

N = 1
observations = []
def solve(event, d):
    if event == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse'] and bool(d['draft'])
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return not d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 browse completion transition produces an incorrect observable state.

This stipulated picker searches only after minimum draft length unless explicit browse is requested. Empty-query browse uses recent suggestions, composition blocks query emission, and disabled/read-only interaction suppresses new requests. Draft erasure cancels pending search and clears query-bound results.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['rows']
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent']
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 recent completion transition produces an incorrect observable state.

This stipulated picker searches only after minimum draft length unless explicit browse is requested. Empty-query browse uses recent suggestions, composition blocks query emission, and disabled/read-only interaction suppresses new requests. Draft erasure cancels pending search and clears query-bound results.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':False,'query':d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'],'query':None}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 deferred-browse completion transition produces an incorrect observable state.

This stipulated picker searches only after minimum draft length unless explicit browse is requested. Empty-query browse uses recent suggestions, composition blocks query emission, and disabled/read-only interaction suppresses new requests. Draft erasure cancels pending search and clears query-bound results.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return True
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return False
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 disabled completion transition produces an incorrect observable state.

This stipulated picker searches only after minimum draft length unless explicit browse is requested. Empty-query browse uses recent suggestions, composition blocks query emission, and disabled/read-only interaction suppresses new requests. Draft erasure cancels pending search and clears query-bound results.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return True
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return False
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 readonly completion transition produces an incorrect observable state.

This stipulated picker searches only after minimum draft length unless explicit browse is requested. Empty-query browse uses recent suggestions, composition blocks query emission, and disabled/read-only interaction suppresses new requests. Draft erasure cancels pending search and clears query-bound results.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return d['pending']
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return d['draft']
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 erase-pending completion transition produces an incorrect observable state.

This stipulated picker searches only after minimum draft length unless explicit browse is requested. Empty-query browse uses recent suggestions, composition blocks query emission, and disabled/read-only interaction suppresses new requests. Draft erasure cancels pending search and clears query-bound results.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return d['rows']
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return d['recent']
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 erase-results completion transition produces an incorrect observable state.

This stipulated picker searches only after minimum draft length unless explicit browse is requested. Empty-query browse uses recent suggestions, composition blocks query emission, and disabled/read-only interaction suppresses new requests. Draft erasure cancels pending search and clears query-bound results.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'type-more' if not d['draft'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if d['browse'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse' if d['browse'] else 'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 empty-query-mode completion transition produces an incorrect observable state.

This stipulated picker searches only after minimum draft length unless explicit browse is requested. Empty-query browse uses recent suggestions, composition blocks query emission, and disabled/read-only interaction suppresses new requests. Draft erasure cancels pending search and clears query-bound results.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'query','text':d['draft']}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 == 'threshold': return len(d['draft'])>=d['minimum']
    if event == 'browse': return d['browse']
    if event == 'recent': return d['recent'] if not d['draft'] else []
    if event == 'deferred-browse': return {'defer_browse':d['browse'] and d['composing'],'query':None if d['composing'] else d['draft']}
    if event == 'disabled': return not d['disabled']
    if event == 'readonly': return not d['readonly']
    if event == 'erase-pending': return None
    if event == 'erase-results': return []
    if event == 'empty-query-mode': return 'recent' if not d['draft'] and d['browse'] else 'type-more' if len(d['draft'])<d['minimum'] else 'results'
    if event == 'browse-descriptor': return {'mode':'browse','text':''}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'p','minimum':2,'browse':False,'recent':['a'],'composing':True,'disabled':True,'readonly':True,'pending':'pe','rows':['p1'],'epoch':N}
boundary = {'draft':'','minimum':0,'browse':True,'recent':[],'composing':False,'disabled':False,'readonly':False,'pending':None,'rows':[],'epoch':N}
check('normal threshold', solve('threshold', normal), False)
check('boundary threshold', solve('threshold', boundary), True)
check('normal browse', solve('browse', normal), False)
check('boundary browse', solve('browse', boundary), True)
check('normal recent', solve('recent', normal), [])
check('boundary recent', solve('recent', boundary), [])
check('normal deferred-browse', solve('deferred-browse', normal), {'defer_browse':False,'query':None})
check('boundary deferred-browse', solve('deferred-browse', boundary), {'defer_browse':False,'query':''})
check('normal disabled', solve('disabled', normal), False)
check('boundary disabled', solve('disabled', boundary), True)
check('normal readonly', solve('readonly', normal), False)
check('boundary readonly', solve('readonly', boundary), True)
check('normal erase-pending', solve('erase-pending', normal), None)
check('boundary erase-pending', solve('erase-pending', boundary), None)
check('normal erase-results', solve('erase-results', normal), [])
check('boundary erase-results', solve('erase-results', boundary), [])
check('normal empty-query-mode', solve('empty-query-mode', normal), 'type-more')
check('boundary empty-query-mode', solve('empty-query-mode', boundary), 'recent')
check('normal browse-descriptor', solve('browse-descriptor', normal), {'mode':'query','text':'p'})
check('boundary browse-descriptor', solve('browse-descriptor', boundary), {'mode':'browse','text':''})
variant = dict(normal, **{'draft':'x'*N,'minimum':N})
check('variant query or selection payload', solve('threshold', variant), True)
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 browse-descriptor completion transition produces an incorrect observable state.

This stipulated picker searches only after minimum draft length unless explicit browse is requested. Empty-query browse uses recent suggestions, composition blocks query emission, and disabled/read-only interaction suppresses new requests. Draft erasure cancels pending search and clears query-bound results.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'retain-value': return None
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return None
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 == 'retain-value': return d['label']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return None
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 retain-value completion transition produces an incorrect observable state.

Switching an active picker to read-only cancels mutable suggestion interaction while retaining its selected value and label. Draft is reverted to the selected label, pending requests and create transactions are detached, transient preview and result activation are removed, and unlocking does not replay an old acceptance.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'retain-value': return d['value']
    if event == 'retain-label': return d['draft']
    if event == 'query-cancel': return None
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 == 'retain-value': return d['value']
    if event == 'retain-label': return d['value']
    if event == 'query-cancel': return None
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 retain-label completion transition produces an incorrect observable state.

Switching an active picker to read-only cancels mutable suggestion interaction while retaining its selected value and label. Draft is reverted to the selected label, pending requests and create transactions are detached, transient preview and result activation are removed, and unlocking does not replay an old acceptance.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'retain-value': return d['value']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return d['pending']
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 == 'retain-value': return d['value']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return d['draft']
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 query-cancel completion transition produces an incorrect observable state.

Switching an active picker to read-only cancels mutable suggestion interaction while retaining its selected value and label. Draft is reverted to the selected label, pending requests and create transactions are detached, transient preview and result activation are removed, and unlocking does not replay an old acceptance.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'retain-value': return d['value']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return None
    if event == 'create-detach': return d['create']
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 == 'retain-value': return d['value']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return None
    if event == 'create-detach': return d['value']
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 create-detach completion transition produces an incorrect observable state.

Switching an active picker to read-only cancels mutable suggestion interaction while retaining its selected value and label. Draft is reverted to the selected label, pending requests and create transactions are detached, transient preview and result activation are removed, and unlocking does not replay an old acceptance.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'retain-value': return d['value']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return None
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['active']]
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 == 'retain-value': return d['value']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return None
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['value']]
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return d['label']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'peach','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', variant), 'L'*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 selected-row completion transition produces an incorrect observable state.

Switching an active picker to read-only cancels mutable suggestion interaction while retaining its selected value and label. Draft is reverted to the selected label, pending requests and create transactions are detached, transient preview and result activation are removed, and unlocking does not replay an old acceptance.

split: open-access