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

N = 1
observations = []
def solve(event, d):
    if event == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [d['incoming']]
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return d['incoming']!=d['value']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return []
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return d['incoming']!=d['value']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The parent-echo completion transition produces an incorrect observable state.

Parent-provided value updates are distinguished from unacknowledged draft edits. An acknowledged commit may reset the draft to its label; unrelated rerenders preserve dirty draft. External value replacement clears preview and invalidates result epoch. Object identity is irrelevant; stable option identifiers determine equality.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return d['dirty'] or d['ack']
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return d['incoming']!=d['value']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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 == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return False
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return d['incoming']!=d['value']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The ack-dirty completion transition produces an incorrect observable state.

Parent-provided value updates are distinguished from unacknowledged draft edits. An acknowledged commit may reset the draft to its label; unrelated rerenders preserve dirty draft. External value replacement clears preview and invalidates result epoch. Object identity is irrelevant; stable option identifiers determine equality.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return d['incoming_epoch']<=d['epoch']
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return d['incoming']!=d['value']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return False
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return d['incoming']!=d['value']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The stale-parent completion transition produces an incorrect observable state.

Parent-provided value updates are distinguished from unacknowledged draft edits. An acknowledged commit may reset the draft to its label; unrelated rerenders preserve dirty draft. External value replacement clears preview and invalidates result epoch. Object identity is irrelevant; stable option identifiers determine equality.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return {'id':d['new_object']['label'],'label':d['new_object']['label']}
    if event == 'change-detection': return d['incoming']!=d['value']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return d['old_object']
    if event == 'change-detection': return d['incoming']!=d['value']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Parent-provided value updates are distinguished from unacknowledged draft edits. An acknowledged commit may reset the draft to its label; unrelated rerenders preserve dirty draft. External value replacement clears preview and invalidates result epoch. Object identity is irrelevant; stable option identifiers determine equality.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return bool(d['incoming'])!=bool(d['value'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return False
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The change-detection completion transition produces an incorrect observable state.

Parent-provided value updates are distinguished from unacknowledged draft edits. An acknowledged commit may reset the draft to its label; unrelated rerenders preserve dirty draft. External value replacement clears preview and invalidates result epoch. Object identity is irrelevant; stable option identifiers determine equality.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['draft']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['label']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return bool(d['value'])
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return bool(d['label'])
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return []
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return None
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['value']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The reset-id completion transition produces an incorrect observable state.

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['draft']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['value'],d['label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [None,'']
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The reset-baseline completion transition produces an incorrect observable state.

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],','.join(d['values'])]]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],d['values']]]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['value']!=d['initial'] and not d['draft']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return False
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['label']
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']+'Label'
    if event == 'reset-draft': return {'draft':d['initial_label'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The display-field completion transition produces an incorrect observable state.

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access


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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':d['draft'],'active':None}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(event, d):
    if event == 'serialize': return d['value']
    if event == 'present': return d['value'] is not None
    if event == 'disabled': return [] if d['disabled'] else [[d['name'],d['value']]]
    if event == 'reset-id': return d['initial']
    if event == 'reset-label': return d['initial_label']
    if event == 'reset-baseline': return [d['initial'],d['initial_label']]
    if event == 'many': return [[d['name'],x] for x in d['values']]
    if event == 'dirty': return d['draft']!=d['label']
    if event == 'display-field': return d['name']
    if event == 'reset-draft': return {'draft':'','active':d['initial']}
    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','initial':'p0','initial_label':'Plum','name':'fruit','disabled':True,'required':True,'values':['a','b'],'epoch':N}
boundary = {'value':'','label':'','draft':'x','initial':None,'initial_label':'','name':'fruit','disabled':False,'required':True,'values':[],'epoch':N}
check('normal serialize', solve('serialize', normal), 'p1')
check('boundary serialize', solve('serialize', boundary), '')
check('normal present', solve('present', normal), True)
check('boundary present', solve('present', boundary), True)
check('normal disabled', solve('disabled', normal), [])
check('boundary disabled', solve('disabled', boundary), [['fruit','']])
check('normal reset-id', solve('reset-id', normal), 'p0')
check('boundary reset-id', solve('reset-id', boundary), None)
check('normal reset-label', solve('reset-label', normal), 'Plum')
check('boundary reset-label', solve('reset-label', boundary), '')
check('normal reset-baseline', solve('reset-baseline', normal), ['p0','Plum'])
check('boundary reset-baseline', solve('reset-baseline', boundary), [None,''])
check('normal many', solve('many', normal), [['fruit','a'],['fruit','b']])
check('boundary many', solve('many', boundary), [])
check('normal dirty', solve('dirty', normal), True)
check('boundary dirty', solve('dirty', boundary), True)
check('normal display-field', solve('display-field', normal), 'fruit')
check('boundary display-field', solve('display-field', boundary), 'fruit')
check('normal reset-draft', solve('reset-draft', normal), {'draft':'Plum','active':None})
check('boundary reset-draft', solve('reset-draft', boundary), {'draft':'','active':None})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('serialize', variant), 'id'+str(N))
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Form submission serializes committed suggestion identifiers separately from visible draft text. Required checks apply to committed values, an empty-string identifier is present, disabled fields are omitted, and reset restores the initial identity and label together. Multi-value fields preserve separate values.

split: open-access