FA-22036 / Autocomplete interactions / Open access
Suggestion identity reconciliation: missing committed suggestion is mistaken for empty selection · case 01
The selection-visible completion transition produces an incorrect observable state.
ROOT CAUSE
At result-reconcile/selection-visible, the implementation evaluates `{'has_value':d['selected'] in d['ids'],'in_results':d['selected'] in d['ids']}` instead of preserving the specified completion transition.
THE FAILURE
At result-reconcile/selection-visible, the implementation evaluates `{'has_value':d['selected'] in d['ids'],'in_results':d['selected'] in d['ids']}` instead of preserving the specified completion transition.
Unsuccessful approach: The attempted repair uses `{'has_value':bool(d['ids']),'in_results':bool(d['ids'])}`, which still violates a normal or boundary completion fixture.
Case contract
On a new result snapshot, option identifiers determine continuity; labels are presentation only. Duplicate identifiers collapse at their first occurrence. Active and selected identities survive only where specified, and a query replacement clears transient result state.
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 == 'dedupe': return list(dict.fromkeys(d['ids']))
if event == 'active-index': return d['ids'].index(d['active']) if d['active'] in d['ids'] else None
if event == 'added': return [x for x in dict.fromkeys(d['ids']) if x not in d['old']]
if event == 'removed': return [x for x in d['old'] if x not in d['ids']]
if event == 'committed': return d['selected']
if event == 'active-label': return d['labels'][d['ids'].index(d['active'])] if d['active'] in d['ids'] else ''
if event == 'render-query': return d['ids'] if d['query']==d['result_query'] else []
if event == 'replacement': return {'active':None,'epoch':d['epoch']+1}
if event == 'row-key': return [[x,i] for i,x in enumerate(d['ids'])]
if event == 'selection-visible': return {'has_value':d['selected'] in d['ids'],'in_results':d['selected'] in d['ids']}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'old':['a','b'],'ids':['b','c','b'],'labels':['Bee','See','Bee'],'active':'b','selected':'z','old_label':'Old Bee','query':'be','result_query':'b','epoch':N}
boundary = {'old':[],'ids':[],'labels':[],'active':None,'selected':None,'old_label':'','query':'','result_query':'','epoch':N}
check('normal dedupe', solve('dedupe', normal), ['b','c'])
check('boundary dedupe', solve('dedupe', boundary), [])
check('normal active-index', solve('active-index', normal), 0)
check('boundary active-index', solve('active-index', boundary), None)
check('normal added', solve('added', normal), ['c'])
check('boundary added', solve('added', boundary), [])
check('normal removed', solve('removed', normal), ['a'])
check('boundary removed', solve('removed', boundary), [])
check('normal committed', solve('committed', normal), 'z')
check('boundary committed', solve('committed', boundary), None)
check('normal active-label', solve('active-label', normal), 'Bee')
check('boundary active-label', solve('active-label', boundary), '')
check('normal render-query', solve('render-query', normal), [])
check('boundary render-query', solve('render-query', boundary), [])
check('normal replacement', solve('replacement', normal), {'active':None,'epoch':N+1})
check('boundary replacement', solve('replacement', boundary), {'active':None,'epoch':N+1})
check('normal row-key', solve('row-key', normal), [['b',0],['c',1],['b',2]])
check('boundary row-key', solve('row-key', boundary), [])
check('normal selection-visible', solve('selection-visible', normal), {'has_value':True,'in_results':False})
check('boundary selection-visible', solve('selection-visible', boundary), {'has_value':False,'in_results':False})
variant = dict(normal, **{'selected':'id'+str(N)})
check('variant query or selection payload', solve('committed', 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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal dedupe | ['b', 'c'] | ['b', 'c'] | Passed |
| boundary dedupe | [] | [] | Passed |
| normal active-index | 0 | 0 | Passed |
| boundary active-index | None | None | Passed |
| normal added | ['c'] | ['c'] | Passed |
| boundary added | [] | [] | Passed |
| normal removed | ['a'] | ['a'] | Passed |
| boundary removed | [] | [] | Passed |
| normal committed | z | z | Passed |
| boundary committed | None | None | Passed |
| normal active-label | Bee | Bee | Passed |
| boundary active-label | | | Passed |
| normal render-query | [] | [] | Passed |
| boundary render-query | [] | [] | Passed |
| normal replacement | {'active': None, 'epoch': 2} | {'active': None, 'epoch': 2} | Passed |
| boundary replacement | {'active': None, 'epoch': 2} | {'active': None, 'epoch': 2} | Passed |
| normal row-key | [['b', 0], ['c', 1], ['b', 2]] | [['b', 0], ['c', 1], ['b', 2]] | Passed |
| boundary row-key | [] | [] | Passed |
| normal selection-visible | {'has_value': False, 'in_results': False} | {'has_value': True, 'in_results': False} | Failed |
| boundary selection-visible | {'has_value': False, 'in_results': False} | {'has_value': False, 'in_results': False} | Passed |
| variant query or selection payload | id1 | id1 | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / fad8b720d87017a8273a490f4deeb26661dd21d677ccb9ec47a8c62ea4627821
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 == 'dedupe': return list(dict.fromkeys(d['ids']))
if event == 'active-index': return d['ids'].index(d['active']) if d['active'] in d['ids'] else None
if event == 'added': return [x for x in dict.fromkeys(d['ids']) if x not in d['old']]
if event == 'removed': return [x for x in d['old'] if x not in d['ids']]
if event == 'committed': return d['selected']
if event == 'active-label': return d['labels'][d['ids'].index(d['active'])] if d['active'] in d['ids'] else ''
if event == 'render-query': return d['ids'] if d['query']==d['result_query'] else []
if event == 'replacement': return {'active':None,'epoch':d['epoch']+1}
if event == 'row-key': return [[x,i] for i,x in enumerate(d['ids'])]
if event == 'selection-visible': return {'has_value':bool(d['ids']),'in_results':bool(d['ids'])}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'old':['a','b'],'ids':['b','c','b'],'labels':['Bee','See','Bee'],'active':'b','selected':'z','old_label':'Old Bee','query':'be','result_query':'b','epoch':N}
boundary = {'old':[],'ids':[],'labels':[],'active':None,'selected':None,'old_label':'','query':'','result_query':'','epoch':N}
check('normal dedupe', solve('dedupe', normal), ['b','c'])
check('boundary dedupe', solve('dedupe', boundary), [])
check('normal active-index', solve('active-index', normal), 0)
check('boundary active-index', solve('active-index', boundary), None)
check('normal added', solve('added', normal), ['c'])
check('boundary added', solve('added', boundary), [])
check('normal removed', solve('removed', normal), ['a'])
check('boundary removed', solve('removed', boundary), [])
check('normal committed', solve('committed', normal), 'z')
check('boundary committed', solve('committed', boundary), None)
check('normal active-label', solve('active-label', normal), 'Bee')
check('boundary active-label', solve('active-label', boundary), '')
check('normal render-query', solve('render-query', normal), [])
check('boundary render-query', solve('render-query', boundary), [])
check('normal replacement', solve('replacement', normal), {'active':None,'epoch':N+1})
check('boundary replacement', solve('replacement', boundary), {'active':None,'epoch':N+1})
check('normal row-key', solve('row-key', normal), [['b',0],['c',1],['b',2]])
check('boundary row-key', solve('row-key', boundary), [])
check('normal selection-visible', solve('selection-visible', normal), {'has_value':True,'in_results':False})
check('boundary selection-visible', solve('selection-visible', boundary), {'has_value':False,'in_results':False})
variant = dict(normal, **{'selected':'id'+str(N)})
check('variant query or selection payload', solve('committed', 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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal dedupe | ['b', 'c'] | ['b', 'c'] | Passed |
| boundary dedupe | [] | [] | Passed |
| normal active-index | 0 | 0 | Passed |
| boundary active-index | None | None | Passed |
| normal added | ['c'] | ['c'] | Passed |
| boundary added | [] | [] | Passed |
| normal removed | ['a'] | ['a'] | Passed |
| boundary removed | [] | [] | Passed |
| normal committed | z | z | Passed |
| boundary committed | None | None | Passed |
| normal active-label | Bee | Bee | Passed |
| boundary active-label | | | Passed |
| normal render-query | [] | [] | Passed |
| boundary render-query | [] | [] | Passed |
| normal replacement | {'active': None, 'epoch': 2} | {'active': None, 'epoch': 2} | Passed |
| boundary replacement | {'active': None, 'epoch': 2} | {'active': None, 'epoch': 2} | Passed |
| normal row-key | [['b', 0], ['c', 1], ['b', 2]] | [['b', 0], ['c', 1], ['b', 2]] | Passed |
| boundary row-key | [] | [] | Passed |
| normal selection-visible | {'has_value': True, 'in_results': True} | {'has_value': True, 'in_results': False} | Failed |
| boundary selection-visible | {'has_value': False, 'in_results': False} | {'has_value': False, 'in_results': False} | Passed |
| variant query or selection payload | id1 | id1 | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / bb1b2c78a2c51d45f4b6a2371ca432d56a436a46f51528d127ee6e49d72eb884
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 22 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.592372+00:00.
Case digest / db9eae725be184c454535f2d369a0b0898e9c8d8bf32c04523b408286a373ee0