FA-22041 / Autocomplete interactions / Open access
Autocomplete commit payload: commit submits a suggestion label instead of its identifier · case 01
The value completion transition produces an incorrect observable state.
ROOT CAUSE
At commit-payload/value, the implementation evaluates `d['accepted']['label']` instead of preserving the specified completion transition.
VERIFIED REPAIR
Implement the value contract using `d['accepted']['id']`.
Unsuccessful approach: The attempted repair uses `d['accepted']['id'] or None`, which still violates a normal or boundary completion fixture.
Case contract
Explicit suggestion acceptance emits the selected stable identifier, canonical label and source metadata, then replaces the draft and advances its edit epoch. A commit transaction uses the accepted result snapshot, never an unrelated current highlight. Empty identifiers and labels are valid values.
Why this case matters
Autocomplete couples draft text, suggestion identity and asynchronous presentation; this bounded lifecycle model isolates one observable interaction defect.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(event, d):
if event == 'value': return d['accepted']['label']
if event == 'display': return d['accepted']['label']
if event == 'snapshot': return d['accepted']['id']
if event == 'source': return d['accepted']['source']
if event == 'metadata': return d['accepted']['extra']
if event == 'reaccept-change': return [] if d['previous']==d['accepted']['id'] else [[d['previous'],d['accepted']['id']]]
if event == 'change': return [d['previous'],d['accepted']['id']]
if event == 'reason': return d['reason']
if event == 'cleanup': return {'draft':d['accepted']['label'],'active':None}
if event == 'freshness': return d['accepted_epoch']==d['epoch']
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'accepted':{'id':'p7','label':'Pear','source':'remote','extra':{'kind':'fruit'}},'highlight':{'id':'p8','label':'Peach'},'draft':'pe','epoch':N,'previous':'p1','reason':'pointer','query_epoch':N-1,'accepted_epoch':N}
boundary = {'accepted':{'id':'','label':'','source':'local','extra':{}},'highlight':{'id':'fallback','label':'Fallback'},'draft':'x','epoch':N,'previous':'','reason':'explicit','query_epoch':N,'accepted_epoch':N}
check('normal value', solve('value', normal), 'p7')
check('boundary value', solve('value', boundary), '')
check('normal display', solve('display', normal), 'Pear')
check('boundary display', solve('display', boundary), '')
check('normal snapshot', solve('snapshot', normal), 'p7')
check('boundary snapshot', solve('snapshot', boundary), '')
check('normal source', solve('source', normal), 'remote')
check('boundary source', solve('source', boundary), 'local')
check('normal metadata', solve('metadata', normal), {'kind':'fruit'})
check('boundary metadata', solve('metadata', boundary), {})
check('normal reaccept-change', solve('reaccept-change', normal), [['p1','p7']])
check('boundary reaccept-change', solve('reaccept-change', boundary), [])
check('normal change', solve('change', normal), ['p1','p7'])
check('boundary change', solve('change', boundary), ['',''])
check('normal reason', solve('reason', normal), 'pointer')
check('boundary reason', solve('reason', boundary), 'explicit')
check('normal cleanup', solve('cleanup', normal), {'draft':'Pear','active':None})
check('boundary cleanup', solve('cleanup', boundary), {'draft':'','active':None})
check('normal freshness', solve('freshness', normal), True)
check('boundary freshness', solve('freshness', boundary), True)
variant = dict(normal, **{'accepted':{'id':'id'+str(N),'label':'L'*N,'source':'local','extra':{}}})
check('variant query or selection payload', solve('display', variant), 'L'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal value | Pear | p7 | Failed |
| boundary value | | | Passed |
| normal display | Pear | Pear | Passed |
| boundary display | | | Passed |
| normal snapshot | p7 | p7 | Passed |
| boundary snapshot | | | Passed |
| normal source | remote | remote | Passed |
| boundary source | local | local | Passed |
| normal metadata | {'kind': 'fruit'} | {'kind': 'fruit'} | Passed |
| boundary metadata | {} | {} | Passed |
| normal reaccept-change | [['p1', 'p7']] | [['p1', 'p7']] | Passed |
| boundary reaccept-change | [] | [] | Passed |
| normal change | ['p1', 'p7'] | ['p1', 'p7'] | Passed |
| boundary change | ['', ''] | ['', ''] | Passed |
| normal reason | pointer | pointer | Passed |
| boundary reason | explicit | explicit | Passed |
| normal cleanup | {'active': None, 'draft': 'Pear'} | {'active': None, 'draft': 'Pear'} | Passed |
| boundary cleanup | {'active': None, 'draft': ''} | {'active': None, 'draft': ''} | Passed |
| normal freshness | True | True | Passed |
| boundary freshness | True | True | Passed |
| variant query or selection payload | L | L | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 425ce0688857fdd78e3bbdbbe4ac2dbb0c64af2cc7a600196cc16761fbb8f2f0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(event, d):
if event == 'value': return d['accepted']['id'] or None
if event == 'display': return d['accepted']['label']
if event == 'snapshot': return d['accepted']['id']
if event == 'source': return d['accepted']['source']
if event == 'metadata': return d['accepted']['extra']
if event == 'reaccept-change': return [] if d['previous']==d['accepted']['id'] else [[d['previous'],d['accepted']['id']]]
if event == 'change': return [d['previous'],d['accepted']['id']]
if event == 'reason': return d['reason']
if event == 'cleanup': return {'draft':d['accepted']['label'],'active':None}
if event == 'freshness': return d['accepted_epoch']==d['epoch']
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'accepted':{'id':'p7','label':'Pear','source':'remote','extra':{'kind':'fruit'}},'highlight':{'id':'p8','label':'Peach'},'draft':'pe','epoch':N,'previous':'p1','reason':'pointer','query_epoch':N-1,'accepted_epoch':N}
boundary = {'accepted':{'id':'','label':'','source':'local','extra':{}},'highlight':{'id':'fallback','label':'Fallback'},'draft':'x','epoch':N,'previous':'','reason':'explicit','query_epoch':N,'accepted_epoch':N}
check('normal value', solve('value', normal), 'p7')
check('boundary value', solve('value', boundary), '')
check('normal display', solve('display', normal), 'Pear')
check('boundary display', solve('display', boundary), '')
check('normal snapshot', solve('snapshot', normal), 'p7')
check('boundary snapshot', solve('snapshot', boundary), '')
check('normal source', solve('source', normal), 'remote')
check('boundary source', solve('source', boundary), 'local')
check('normal metadata', solve('metadata', normal), {'kind':'fruit'})
check('boundary metadata', solve('metadata', boundary), {})
check('normal reaccept-change', solve('reaccept-change', normal), [['p1','p7']])
check('boundary reaccept-change', solve('reaccept-change', boundary), [])
check('normal change', solve('change', normal), ['p1','p7'])
check('boundary change', solve('change', boundary), ['',''])
check('normal reason', solve('reason', normal), 'pointer')
check('boundary reason', solve('reason', boundary), 'explicit')
check('normal cleanup', solve('cleanup', normal), {'draft':'Pear','active':None})
check('boundary cleanup', solve('cleanup', boundary), {'draft':'','active':None})
check('normal freshness', solve('freshness', normal), True)
check('boundary freshness', solve('freshness', boundary), True)
variant = dict(normal, **{'accepted':{'id':'id'+str(N),'label':'L'*N,'source':'local','extra':{}}})
check('variant query or selection payload', solve('display', variant), 'L'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal value | p7 | p7 | Passed |
| boundary value | None | | Failed |
| normal display | Pear | Pear | Passed |
| boundary display | | | Passed |
| normal snapshot | p7 | p7 | Passed |
| boundary snapshot | | | Passed |
| normal source | remote | remote | Passed |
| boundary source | local | local | Passed |
| normal metadata | {'kind': 'fruit'} | {'kind': 'fruit'} | Passed |
| boundary metadata | {} | {} | Passed |
| normal reaccept-change | [['p1', 'p7']] | [['p1', 'p7']] | Passed |
| boundary reaccept-change | [] | [] | Passed |
| normal change | ['p1', 'p7'] | ['p1', 'p7'] | Passed |
| boundary change | ['', ''] | ['', ''] | Passed |
| normal reason | pointer | pointer | Passed |
| boundary reason | explicit | explicit | Passed |
| normal cleanup | {'active': None, 'draft': 'Pear'} | {'active': None, 'draft': 'Pear'} | Passed |
| boundary cleanup | {'active': None, 'draft': ''} | {'active': None, 'draft': ''} | Passed |
| normal freshness | True | True | Passed |
| boundary freshness | True | True | Passed |
| variant query or selection payload | L | L | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / f59da8635d87730bb9b52c8ab464beb2b742f0d9c5557ae22919577eebd2975a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(event, d):
if event == 'value': return d['accepted']['id']
if event == 'display': return d['accepted']['label']
if event == 'snapshot': return d['accepted']['id']
if event == 'source': return d['accepted']['source']
if event == 'metadata': return d['accepted']['extra']
if event == 'reaccept-change': return [] if d['previous']==d['accepted']['id'] else [[d['previous'],d['accepted']['id']]]
if event == 'change': return [d['previous'],d['accepted']['id']]
if event == 'reason': return d['reason']
if event == 'cleanup': return {'draft':d['accepted']['label'],'active':None}
if event == 'freshness': return d['accepted_epoch']==d['epoch']
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'accepted':{'id':'p7','label':'Pear','source':'remote','extra':{'kind':'fruit'}},'highlight':{'id':'p8','label':'Peach'},'draft':'pe','epoch':N,'previous':'p1','reason':'pointer','query_epoch':N-1,'accepted_epoch':N}
boundary = {'accepted':{'id':'','label':'','source':'local','extra':{}},'highlight':{'id':'fallback','label':'Fallback'},'draft':'x','epoch':N,'previous':'','reason':'explicit','query_epoch':N,'accepted_epoch':N}
check('normal value', solve('value', normal), 'p7')
check('boundary value', solve('value', boundary), '')
check('normal display', solve('display', normal), 'Pear')
check('boundary display', solve('display', boundary), '')
check('normal snapshot', solve('snapshot', normal), 'p7')
check('boundary snapshot', solve('snapshot', boundary), '')
check('normal source', solve('source', normal), 'remote')
check('boundary source', solve('source', boundary), 'local')
check('normal metadata', solve('metadata', normal), {'kind':'fruit'})
check('boundary metadata', solve('metadata', boundary), {})
check('normal reaccept-change', solve('reaccept-change', normal), [['p1','p7']])
check('boundary reaccept-change', solve('reaccept-change', boundary), [])
check('normal change', solve('change', normal), ['p1','p7'])
check('boundary change', solve('change', boundary), ['',''])
check('normal reason', solve('reason', normal), 'pointer')
check('boundary reason', solve('reason', boundary), 'explicit')
check('normal cleanup', solve('cleanup', normal), {'draft':'Pear','active':None})
check('boundary cleanup', solve('cleanup', boundary), {'draft':'','active':None})
check('normal freshness', solve('freshness', normal), True)
check('boundary freshness', solve('freshness', boundary), True)
variant = dict(normal, **{'accepted':{'id':'id'+str(N),'label':'L'*N,'source':'local','extra':{}}})
check('variant query or selection payload', solve('display', variant), 'L'*N)
check('unknown completion event', solve('unrecognized', normal), {'unchanged': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal value | p7 | p7 | Passed |
| boundary value | | | Passed |
| normal display | Pear | Pear | Passed |
| boundary display | | | Passed |
| normal snapshot | p7 | p7 | Passed |
| boundary snapshot | | | Passed |
| normal source | remote | remote | Passed |
| boundary source | local | local | Passed |
| normal metadata | {'kind': 'fruit'} | {'kind': 'fruit'} | Passed |
| boundary metadata | {} | {} | Passed |
| normal reaccept-change | [['p1', 'p7']] | [['p1', 'p7']] | Passed |
| boundary reaccept-change | [] | [] | Passed |
| normal change | ['p1', 'p7'] | ['p1', 'p7'] | Passed |
| boundary change | ['', ''] | ['', ''] | Passed |
| normal reason | pointer | pointer | Passed |
| boundary reason | explicit | explicit | Passed |
| normal cleanup | {'active': None, 'draft': 'Pear'} | {'active': None, 'draft': 'Pear'} | Passed |
| boundary cleanup | {'active': None, 'draft': ''} | {'active': None, 'draft': ''} | Passed |
| normal freshness | True | True | Passed |
| boundary freshness | True | True | Passed |
| variant query or selection payload | L | L | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / eda936d41115c20c039ef408c896e654d9f3c20ce5e127b6be3a06bf7c79f5e0
Verification & scope
Stipulated deterministic widget transition model; inputs are validated snapshots. It does not model browser event dispatch, network transport, or linguistic standards. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:40:34.608229+00:00.
Case digest / 5b581ad5454c18f3bdd9d43cea485f28d9630be5d6bbd8a7b7808e5b921492f6