FA-22846 / Autocomplete interactions / Open access
Selected suggestion label resolution: older selection label response is admitted after reselection · case 01
The epoch completion transition produces an incorrect observable state.
ROOT CAUSE
At label-resolution/epoch, the implementation evaluates `d['response_epoch']<=d['epoch']` instead of preserving the specified completion transition.
VERIFIED REPAIR
Implement the epoch contract using `d['response_epoch']==d['epoch']`.
Unsuccessful approach: The attempted repair uses `False`, which still violates a normal or boundary completion fixture.
Case contract
A selected identifier may need asynchronous label resolution independently of query suggestions. Responses bind to selected identity and selection epoch. Until resolved the identity stays committed; failed resolution shows an explicit fallback and never inserts the identifier into the query. Empty labels are valid resolutions.
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 == 'identity': return d['response_id']==d['value']
if event == 'epoch': return d['response_epoch']<=d['epoch']
if event == 'value': return d['value']
if event == 'query': return d['query']
if event == 'empty-label': return d['label']
if event == 'failure': return d['fallback'] if d['error'] else d['label']
if event == 'pending': return d['pending'] and not d['resolved']
if event == 'request': return [d['value'],d['epoch']]
if event == 'clear-error': return None
if event == 'separate-rows': return []
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','response_id':'p0','label':'Pear','fallback':'Unknown choice','epoch':N,'response_epoch':N-1,'query':'pe','pending':True,'error':'missing','resolved':False}
boundary = {'value':'','response_id':'','label':'','fallback':'Unknown choice','epoch':N,'response_epoch':N,'query':'','pending':False,'error':None,'resolved':True}
check('normal identity', solve('identity', normal), False)
check('boundary identity', solve('identity', boundary), True)
check('normal epoch', solve('epoch', normal), False)
check('boundary epoch', solve('epoch', boundary), True)
check('normal value', solve('value', normal), 'p1')
check('boundary value', solve('value', boundary), '')
check('normal query', solve('query', normal), 'pe')
check('boundary query', solve('query', boundary), '')
check('normal empty-label', solve('empty-label', normal), 'Pear')
check('boundary empty-label', solve('empty-label', boundary), '')
check('normal failure', solve('failure', normal), 'Unknown choice')
check('boundary failure', solve('failure', boundary), '')
check('normal pending', solve('pending', normal), True)
check('boundary pending', solve('pending', boundary), False)
check('normal request', solve('request', normal), ['p1',N])
check('boundary request', solve('request', boundary), ['',N])
check('normal clear-error', solve('clear-error', normal), None)
check('boundary clear-error', solve('clear-error', boundary), None)
check('normal separate-rows', solve('separate-rows', normal), [])
check('boundary separate-rows', solve('separate-rows', boundary), [])
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal identity | False | False | Passed |
| boundary identity | True | True | Passed |
| normal epoch | True | False | Failed |
| boundary epoch | True | True | Passed |
| normal value | p1 | p1 | Passed |
| boundary value | | | Passed |
| normal query | pe | pe | Passed |
| boundary query | | | Passed |
| normal empty-label | Pear | Pear | Passed |
| boundary empty-label | | | Passed |
| normal failure | Unknown choice | Unknown choice | Passed |
| boundary failure | | | Passed |
| normal pending | True | True | Passed |
| boundary pending | False | False | Passed |
| normal request | ['p1', 1] | ['p1', 1] | Passed |
| boundary request | ['', 1] | ['', 1] | Passed |
| normal clear-error | None | None | Passed |
| boundary clear-error | None | None | Passed |
| normal separate-rows | [] | [] | Passed |
| boundary separate-rows | [] | [] | Passed |
| variant query or selection payload | id1 | id1 | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 80426b64ee104bfc81989511e3309f3e8694d2c58c729a3f16f7336936403ccf
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 == 'identity': return d['response_id']==d['value']
if event == 'epoch': return False
if event == 'value': return d['value']
if event == 'query': return d['query']
if event == 'empty-label': return d['label']
if event == 'failure': return d['fallback'] if d['error'] else d['label']
if event == 'pending': return d['pending'] and not d['resolved']
if event == 'request': return [d['value'],d['epoch']]
if event == 'clear-error': return None
if event == 'separate-rows': return []
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','response_id':'p0','label':'Pear','fallback':'Unknown choice','epoch':N,'response_epoch':N-1,'query':'pe','pending':True,'error':'missing','resolved':False}
boundary = {'value':'','response_id':'','label':'','fallback':'Unknown choice','epoch':N,'response_epoch':N,'query':'','pending':False,'error':None,'resolved':True}
check('normal identity', solve('identity', normal), False)
check('boundary identity', solve('identity', boundary), True)
check('normal epoch', solve('epoch', normal), False)
check('boundary epoch', solve('epoch', boundary), True)
check('normal value', solve('value', normal), 'p1')
check('boundary value', solve('value', boundary), '')
check('normal query', solve('query', normal), 'pe')
check('boundary query', solve('query', boundary), '')
check('normal empty-label', solve('empty-label', normal), 'Pear')
check('boundary empty-label', solve('empty-label', boundary), '')
check('normal failure', solve('failure', normal), 'Unknown choice')
check('boundary failure', solve('failure', boundary), '')
check('normal pending', solve('pending', normal), True)
check('boundary pending', solve('pending', boundary), False)
check('normal request', solve('request', normal), ['p1',N])
check('boundary request', solve('request', boundary), ['',N])
check('normal clear-error', solve('clear-error', normal), None)
check('boundary clear-error', solve('clear-error', boundary), None)
check('normal separate-rows', solve('separate-rows', normal), [])
check('boundary separate-rows', solve('separate-rows', boundary), [])
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal identity | False | False | Passed |
| boundary identity | True | True | Passed |
| normal epoch | False | False | Passed |
| boundary epoch | False | True | Failed |
| normal value | p1 | p1 | Passed |
| boundary value | | | Passed |
| normal query | pe | pe | Passed |
| boundary query | | | Passed |
| normal empty-label | Pear | Pear | Passed |
| boundary empty-label | | | Passed |
| normal failure | Unknown choice | Unknown choice | Passed |
| boundary failure | | | Passed |
| normal pending | True | True | Passed |
| boundary pending | False | False | Passed |
| normal request | ['p1', 1] | ['p1', 1] | Passed |
| boundary request | ['', 1] | ['', 1] | Passed |
| normal clear-error | None | None | Passed |
| boundary clear-error | None | None | Passed |
| normal separate-rows | [] | [] | Passed |
| boundary separate-rows | [] | [] | Passed |
| variant query or selection payload | id1 | id1 | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / e4d2c20dea0de2037b724274fcf1ddde181da0c7b3e04002ba6558141f033b23
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 == 'identity': return d['response_id']==d['value']
if event == 'epoch': return d['response_epoch']==d['epoch']
if event == 'value': return d['value']
if event == 'query': return d['query']
if event == 'empty-label': return d['label']
if event == 'failure': return d['fallback'] if d['error'] else d['label']
if event == 'pending': return d['pending'] and not d['resolved']
if event == 'request': return [d['value'],d['epoch']]
if event == 'clear-error': return None
if event == 'separate-rows': return []
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'p1','response_id':'p0','label':'Pear','fallback':'Unknown choice','epoch':N,'response_epoch':N-1,'query':'pe','pending':True,'error':'missing','resolved':False}
boundary = {'value':'','response_id':'','label':'','fallback':'Unknown choice','epoch':N,'response_epoch':N,'query':'','pending':False,'error':None,'resolved':True}
check('normal identity', solve('identity', normal), False)
check('boundary identity', solve('identity', boundary), True)
check('normal epoch', solve('epoch', normal), False)
check('boundary epoch', solve('epoch', boundary), True)
check('normal value', solve('value', normal), 'p1')
check('boundary value', solve('value', boundary), '')
check('normal query', solve('query', normal), 'pe')
check('boundary query', solve('query', boundary), '')
check('normal empty-label', solve('empty-label', normal), 'Pear')
check('boundary empty-label', solve('empty-label', boundary), '')
check('normal failure', solve('failure', normal), 'Unknown choice')
check('boundary failure', solve('failure', boundary), '')
check('normal pending', solve('pending', normal), True)
check('boundary pending', solve('pending', boundary), False)
check('normal request', solve('request', normal), ['p1',N])
check('boundary request', solve('request', boundary), ['',N])
check('normal clear-error', solve('clear-error', normal), None)
check('boundary clear-error', solve('clear-error', boundary), None)
check('normal separate-rows', solve('separate-rows', normal), [])
check('boundary separate-rows', solve('separate-rows', boundary), [])
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal identity | False | False | Passed |
| boundary identity | True | True | Passed |
| normal epoch | False | False | Passed |
| boundary epoch | True | True | Passed |
| normal value | p1 | p1 | Passed |
| boundary value | | | Passed |
| normal query | pe | pe | Passed |
| boundary query | | | Passed |
| normal empty-label | Pear | Pear | Passed |
| boundary empty-label | | | Passed |
| normal failure | Unknown choice | Unknown choice | Passed |
| boundary failure | | | Passed |
| normal pending | True | True | Passed |
| boundary pending | False | False | Passed |
| normal request | ['p1', 1] | ['p1', 1] | Passed |
| boundary request | ['', 1] | ['', 1] | Passed |
| normal clear-error | None | None | Passed |
| boundary clear-error | None | None | Passed |
| normal separate-rows | [] | [] | Passed |
| boundary separate-rows | [] | [] | Passed |
| variant query or selection payload | id1 | id1 | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 498d50b66fe5dc7d26c810bc1544794a19a87c3cab1e83677215629b8735a36a
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:42.211070+00:00.
Case digest / 91ecba94bcc93adbe9481be7523a64e4f4f271c9c95429b4dc61a8f05270ea7f