FA-23316 / Autocomplete interactions / Open access
Reopening a committed autocomplete: editing compares to a previously selected label instead of current one · case 01
The baseline completion transition produces an incorrect observable state.
ROOT CAUSE
At completion-draft-history/baseline, the implementation evaluates `d['prior_label']` instead of preserving the specified completion transition.
THE FAILURE
At completion-draft-history/baseline, the implementation evaluates `d['prior_label']` instead of preserving the specified completion transition.
Unsuccessful approach: The attempted repair uses `d['last_query']`, which still violates a normal or boundary completion fixture.
Case contract
Reopening this editable picker starts from its committed label, keeps identity until text actually diverges, selects the whole label for replacement, and preserves explicit unresolved drafts on reopen. An accepted label is a baseline, not an automatic new search. Choosing edit mode invalidates old result context.
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 == 'initial-draft': return d['label']
if event == 'unresolved-draft': return d['draft'] if d['unresolved'] else d['label']
if event == 'selection': return [0,len(d['label'])]
if event == 'identity': return d['value']
if event == 'diverged': return d['value'] if d['new_text']==d['label'] else None
if event == 'baseline': return d['prior_label']
if event == 'accepted-search': return not d['accepted']
if event == 'selection-baseline': return {'baseline_id':d['value'],'baseline_text':d['label']}
if event == 'accepted-baseline': return not d['unresolved'] and d['draft']==d['label']
if event == 'cancel-edit': return {'value':d['value'],'draft':d['label']}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'Peach','unresolved':True,'last_query':'pe','active':'p2','epoch':N,'prior_label':'Plum','new_text':'Pear!','accepted':True}
boundary = {'value':'','label':'','draft':'','unresolved':False,'last_query':'','active':None,'epoch':N,'prior_label':'','new_text':'','accepted':False}
check('normal initial-draft', solve('initial-draft', normal), 'Pear')
check('boundary initial-draft', solve('initial-draft', boundary), '')
check('normal unresolved-draft', solve('unresolved-draft', normal), 'Peach')
check('boundary unresolved-draft', solve('unresolved-draft', boundary), '')
check('normal selection', solve('selection', normal), [0,4])
check('boundary selection', solve('selection', boundary), [0,0])
check('normal identity', solve('identity', normal), 'p1')
check('boundary identity', solve('identity', boundary), '')
check('normal diverged', solve('diverged', normal), None)
check('boundary diverged', solve('diverged', boundary), '')
check('normal baseline', solve('baseline', normal), 'Pear')
check('boundary baseline', solve('baseline', boundary), '')
check('normal accepted-search', solve('accepted-search', normal), False)
check('boundary accepted-search', solve('accepted-search', boundary), True)
check('normal selection-baseline', solve('selection-baseline', normal), {'baseline_id':'p1','baseline_text':'Pear'})
check('boundary selection-baseline', solve('selection-baseline', boundary), {'baseline_id':'','baseline_text':''})
check('normal accepted-baseline', solve('accepted-baseline', normal), False)
check('boundary accepted-baseline', solve('accepted-baseline', boundary), True)
check('normal cancel-edit', solve('cancel-edit', normal), {'value':'p1','draft':'Pear'})
check('boundary cancel-edit', solve('cancel-edit', boundary), {'value':'','draft':''})
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('initial-draft', 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 initial-draft | Pear | Pear | Passed |
| boundary initial-draft | | | Passed |
| normal unresolved-draft | Peach | Peach | Passed |
| boundary unresolved-draft | | | Passed |
| normal selection | [0, 4] | [0, 4] | Passed |
| boundary selection | [0, 0] | [0, 0] | Passed |
| normal identity | p1 | p1 | Passed |
| boundary identity | | | Passed |
| normal diverged | None | None | Passed |
| boundary diverged | | | Passed |
| normal baseline | Plum | Pear | Failed |
| boundary baseline | | | Passed |
| normal accepted-search | False | False | Passed |
| boundary accepted-search | True | True | Passed |
| normal selection-baseline | {'baseline_id': 'p1', 'baseline_text': 'Pear'} | {'baseline_id': 'p1', 'baseline_text': 'Pear'} | Passed |
| boundary selection-baseline | {'baseline_id': '', 'baseline_text': ''} | {'baseline_id': '', 'baseline_text': ''} | Passed |
| normal accepted-baseline | False | False | Passed |
| boundary accepted-baseline | True | True | Passed |
| normal cancel-edit | {'draft': 'Pear', 'value': 'p1'} | {'draft': 'Pear', 'value': 'p1'} | Passed |
| boundary cancel-edit | {'draft': '', 'value': ''} | {'draft': '', 'value': ''} | Passed |
| variant query or selection payload | L | L | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / ddde657a66d5a752da853db501b05356f5b9cd6ca9f82542d57074561dea850c
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 == 'initial-draft': return d['label']
if event == 'unresolved-draft': return d['draft'] if d['unresolved'] else d['label']
if event == 'selection': return [0,len(d['label'])]
if event == 'identity': return d['value']
if event == 'diverged': return d['value'] if d['new_text']==d['label'] else None
if event == 'baseline': return d['last_query']
if event == 'accepted-search': return not d['accepted']
if event == 'selection-baseline': return {'baseline_id':d['value'],'baseline_text':d['label']}
if event == 'accepted-baseline': return not d['unresolved'] and d['draft']==d['label']
if event == 'cancel-edit': return {'value':d['value'],'draft':d['label']}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','label':'Pear','draft':'Peach','unresolved':True,'last_query':'pe','active':'p2','epoch':N,'prior_label':'Plum','new_text':'Pear!','accepted':True}
boundary = {'value':'','label':'','draft':'','unresolved':False,'last_query':'','active':None,'epoch':N,'prior_label':'','new_text':'','accepted':False}
check('normal initial-draft', solve('initial-draft', normal), 'Pear')
check('boundary initial-draft', solve('initial-draft', boundary), '')
check('normal unresolved-draft', solve('unresolved-draft', normal), 'Peach')
check('boundary unresolved-draft', solve('unresolved-draft', boundary), '')
check('normal selection', solve('selection', normal), [0,4])
check('boundary selection', solve('selection', boundary), [0,0])
check('normal identity', solve('identity', normal), 'p1')
check('boundary identity', solve('identity', boundary), '')
check('normal diverged', solve('diverged', normal), None)
check('boundary diverged', solve('diverged', boundary), '')
check('normal baseline', solve('baseline', normal), 'Pear')
check('boundary baseline', solve('baseline', boundary), '')
check('normal accepted-search', solve('accepted-search', normal), False)
check('boundary accepted-search', solve('accepted-search', boundary), True)
check('normal selection-baseline', solve('selection-baseline', normal), {'baseline_id':'p1','baseline_text':'Pear'})
check('boundary selection-baseline', solve('selection-baseline', boundary), {'baseline_id':'','baseline_text':''})
check('normal accepted-baseline', solve('accepted-baseline', normal), False)
check('boundary accepted-baseline', solve('accepted-baseline', boundary), True)
check('normal cancel-edit', solve('cancel-edit', normal), {'value':'p1','draft':'Pear'})
check('boundary cancel-edit', solve('cancel-edit', boundary), {'value':'','draft':''})
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('initial-draft', 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 initial-draft | Pear | Pear | Passed |
| boundary initial-draft | | | Passed |
| normal unresolved-draft | Peach | Peach | Passed |
| boundary unresolved-draft | | | Passed |
| normal selection | [0, 4] | [0, 4] | Passed |
| boundary selection | [0, 0] | [0, 0] | Passed |
| normal identity | p1 | p1 | Passed |
| boundary identity | | | Passed |
| normal diverged | None | None | Passed |
| boundary diverged | | | Passed |
| normal baseline | pe | Pear | Failed |
| boundary baseline | | | Passed |
| normal accepted-search | False | False | Passed |
| boundary accepted-search | True | True | Passed |
| normal selection-baseline | {'baseline_id': 'p1', 'baseline_text': 'Pear'} | {'baseline_id': 'p1', 'baseline_text': 'Pear'} | Passed |
| boundary selection-baseline | {'baseline_id': '', 'baseline_text': ''} | {'baseline_id': '', 'baseline_text': ''} | Passed |
| normal accepted-baseline | False | False | Passed |
| boundary accepted-baseline | True | True | Passed |
| normal cancel-edit | {'draft': 'Pear', 'value': 'p1'} | {'draft': 'Pear', 'value': 'p1'} | Passed |
| boundary cancel-edit | {'draft': '', 'value': ''} | {'draft': '', 'value': ''} | Passed |
| variant query or selection payload | L | L | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / c887cf000b559ed31c35f74abd439f7cae5f573fad4428c67e29550a8c4df66a
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:46.707763+00:00.
Case digest / 44c41207ddb72a658916efed1473ea1157411662d9b3473051b6a3cb0676dad5