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['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']+d['preview']
    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['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['draft']
    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 copy-selected-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 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['create'],'label':d['draft']}
    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)

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 == '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['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['draft']}
    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-display 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['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 d['deferred']
    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['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 d['active']
    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 deferred-drop 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['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 True
    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['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 False
    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 allow-accept 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['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['draft']
    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['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['preview']
    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 unlock-draft 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 == 'lookup': return d['draft']
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 lookup completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['normalized']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft'].strip()
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 display completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['normalized']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label'].lower()
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 commit-label completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['normalized']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['label']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 commit-id completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['draft']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return False
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 match-key completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [0,len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],len(d['draft'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 offset completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+(d['old']!=d['normalized'])
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 display-epoch completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['draft']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return False
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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-equivalent completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']-d['prefix_space']
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return len(d['normalized'])
    if event == 'empty-query': return 'empty' if not d['normalized'] else 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 caret-display completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'typed'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 == 'lookup': return d['draft'].strip().lower()
    if event == 'display': return d['draft']
    if event == 'commit-label': return d['label']
    if event == 'commit-id': return d['id']
    if event == 'match-key': return d['result_query']==d['normalized']
    if event == 'offset': return [d['prefix_space'],d['prefix_space']+len(d['normalized'])]
    if event == 'display-epoch': return d['epoch']+1
    if event == 'query-equivalent': return d['old']==d['normalized']
    if event == 'caret-display': return d['caret']
    if event == 'empty-query': return 'empty'
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  PeA  ','label':'Pear','id':'p1','normalized':'pea','prefix_space':2,'epoch':N,'old':'pea','result_query':'pea','caret':5}
boundary = {'draft':'','label':'','id':'','normalized':'','prefix_space':0,'epoch':N,'old':'','result_query':'','caret':0}
check('normal lookup', solve('lookup', normal), 'pea')
check('boundary lookup', solve('lookup', boundary), '')
check('normal display', solve('display', normal), '  PeA  ')
check('boundary display', solve('display', boundary), '')
check('normal commit-label', solve('commit-label', normal), 'Pear')
check('boundary commit-label', solve('commit-label', boundary), '')
check('normal commit-id', solve('commit-id', normal), 'p1')
check('boundary commit-id', solve('commit-id', boundary), '')
check('normal match-key', solve('match-key', normal), True)
check('boundary match-key', solve('match-key', boundary), True)
check('normal offset', solve('offset', normal), [2,5])
check('boundary offset', solve('offset', boundary), [0,0])
check('normal display-epoch', solve('display-epoch', normal), N+1)
check('boundary display-epoch', solve('display-epoch', boundary), N+1)
check('normal query-equivalent', solve('query-equivalent', normal), True)
check('boundary query-equivalent', solve('query-equivalent', boundary), True)
check('normal caret-display', solve('caret-display', normal), 5)
check('boundary caret-display', solve('caret-display', boundary), 0)
check('normal empty-query', solve('empty-query', normal), 'typed')
check('boundary empty-query', solve('empty-query', boundary), 'empty')
variant = dict(normal, **{'draft':' '*N+'PEAR'+' '*N})
check('variant query or selection payload', solve('lookup', variant), 'pear')
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 completion transition produces an incorrect observable state.

This controlled ASCII picker normalizes lookup by stripping outer whitespace and lowercasing, while preserving exact user draft and canonical option labels for display and commit. Matching offsets apply to the normalized query only; a normalization-equivalent edit still advances the display epoch.

split: open-access