FA-22396 / Autocomplete interactions / Open access
Unavailable suggestion presentation: automatic completion selects an unavailable first result · case 01
The eligible completion transition produces an incorrect observable state.
ROOT CAUSE
At unavailable-options/eligible, the implementation evaluates `d['ids']` instead of preserving the specified completion transition.
VERIFIED REPAIR
Implement the eligible contract using `[x for x in d['ids'] if x not in d['disabled']]`.
Unsuccessful approach: The attempted repair uses `[x for x in d['ids'] if x in d['disabled']]`, which still violates a normal or boundary completion fixture.
Case contract
Unavailable options remain visible with reasons but cannot be committed or auto-selected. Availability is attached to identity, not display text. A committed unavailable value remains represented for correction. Disabled-only responses are distinct from empty results.
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 == 'visible': return d['ids']
if event == 'eligible': return d['ids']
if event == 'commit': return d['active'] if d['active'] in d['ids'] and d['active'] not in d['disabled'] else None
if event == 'reason': return d['reason'].get(d['active'])
if event == 'selected': return d['value']
if event == 'row-flags': return [x in d['disabled'] for x in d['ids']]
if event == 'first-enabled': return next((x for x in d['ids'] if x not in d['disabled']),None)
if event == 'status': return 'empty' if not d['ids'] else 'available' if any(x not in d['disabled'] for x in d['ids']) else 'unavailable'
if event == 'validation': return d['value'] is None or d['value'] not in d['disabled']
if event == 'revalidate': return {'active':None if d['active'] in d['disabled'] else d['active'],'epoch':d['epoch']}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'ids':['a','b','c'],'disabled':['a','c'],'labels':['Same','Same','See'],'active':'a','value':'c','reason':{'a':'retired','c':'restricted'},'epoch':N}
boundary = {'ids':[],'disabled':[],'labels':[],'active':None,'value':None,'reason':{},'epoch':N}
check('normal visible', solve('visible', normal), ['a','b','c'])
check('boundary visible', solve('visible', boundary), [])
check('normal eligible', solve('eligible', normal), ['b'])
check('boundary eligible', solve('eligible', boundary), [])
check('normal commit', solve('commit', normal), None)
check('boundary commit', solve('commit', boundary), None)
check('normal reason', solve('reason', normal), 'retired')
check('boundary reason', solve('reason', boundary), None)
check('normal selected', solve('selected', normal), 'c')
check('boundary selected', solve('selected', boundary), None)
check('normal row-flags', solve('row-flags', normal), [True,False,True])
check('boundary row-flags', solve('row-flags', boundary), [])
check('normal first-enabled', solve('first-enabled', normal), 'b')
check('boundary first-enabled', solve('first-enabled', boundary), None)
check('normal status', solve('status', normal), 'available')
check('boundary status', solve('status', boundary), 'empty')
check('normal validation', solve('validation', normal), False)
check('boundary validation', solve('validation', boundary), True)
check('normal revalidate', solve('revalidate', normal), {'active':None,'epoch':N})
check('boundary revalidate', solve('revalidate', boundary), {'active':None,'epoch':N})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('selected', 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 visible | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| boundary visible | [] | [] | Passed |
| normal eligible | ['a', 'b', 'c'] | ['b'] | Failed |
| boundary eligible | [] | [] | Passed |
| normal commit | None | None | Passed |
| boundary commit | None | None | Passed |
| normal reason | retired | retired | Passed |
| boundary reason | None | None | Passed |
| normal selected | c | c | Passed |
| boundary selected | None | None | Passed |
| normal row-flags | [True, False, True] | [True, False, True] | Passed |
| boundary row-flags | [] | [] | Passed |
| normal first-enabled | b | b | Passed |
| boundary first-enabled | None | None | Passed |
| normal status | available | available | Passed |
| boundary status | empty | empty | Passed |
| normal validation | False | False | Passed |
| boundary validation | True | True | Passed |
| normal revalidate | {'active': None, 'epoch': 1} | {'active': None, 'epoch': 1} | Passed |
| boundary revalidate | {'active': None, 'epoch': 1} | {'active': None, 'epoch': 1} | Passed |
| variant query or selection payload | id1 | id1 | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 1ef8c71b1be4bd1d7685131fca46315f7a07c93fdda4ef57152755ffaacce869
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 == 'visible': return d['ids']
if event == 'eligible': return [x for x in d['ids'] if x in d['disabled']]
if event == 'commit': return d['active'] if d['active'] in d['ids'] and d['active'] not in d['disabled'] else None
if event == 'reason': return d['reason'].get(d['active'])
if event == 'selected': return d['value']
if event == 'row-flags': return [x in d['disabled'] for x in d['ids']]
if event == 'first-enabled': return next((x for x in d['ids'] if x not in d['disabled']),None)
if event == 'status': return 'empty' if not d['ids'] else 'available' if any(x not in d['disabled'] for x in d['ids']) else 'unavailable'
if event == 'validation': return d['value'] is None or d['value'] not in d['disabled']
if event == 'revalidate': return {'active':None if d['active'] in d['disabled'] else d['active'],'epoch':d['epoch']}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'ids':['a','b','c'],'disabled':['a','c'],'labels':['Same','Same','See'],'active':'a','value':'c','reason':{'a':'retired','c':'restricted'},'epoch':N}
boundary = {'ids':[],'disabled':[],'labels':[],'active':None,'value':None,'reason':{},'epoch':N}
check('normal visible', solve('visible', normal), ['a','b','c'])
check('boundary visible', solve('visible', boundary), [])
check('normal eligible', solve('eligible', normal), ['b'])
check('boundary eligible', solve('eligible', boundary), [])
check('normal commit', solve('commit', normal), None)
check('boundary commit', solve('commit', boundary), None)
check('normal reason', solve('reason', normal), 'retired')
check('boundary reason', solve('reason', boundary), None)
check('normal selected', solve('selected', normal), 'c')
check('boundary selected', solve('selected', boundary), None)
check('normal row-flags', solve('row-flags', normal), [True,False,True])
check('boundary row-flags', solve('row-flags', boundary), [])
check('normal first-enabled', solve('first-enabled', normal), 'b')
check('boundary first-enabled', solve('first-enabled', boundary), None)
check('normal status', solve('status', normal), 'available')
check('boundary status', solve('status', boundary), 'empty')
check('normal validation', solve('validation', normal), False)
check('boundary validation', solve('validation', boundary), True)
check('normal revalidate', solve('revalidate', normal), {'active':None,'epoch':N})
check('boundary revalidate', solve('revalidate', boundary), {'active':None,'epoch':N})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('selected', 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 visible | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| boundary visible | [] | [] | Passed |
| normal eligible | ['a', 'c'] | ['b'] | Failed |
| boundary eligible | [] | [] | Passed |
| normal commit | None | None | Passed |
| boundary commit | None | None | Passed |
| normal reason | retired | retired | Passed |
| boundary reason | None | None | Passed |
| normal selected | c | c | Passed |
| boundary selected | None | None | Passed |
| normal row-flags | [True, False, True] | [True, False, True] | Passed |
| boundary row-flags | [] | [] | Passed |
| normal first-enabled | b | b | Passed |
| boundary first-enabled | None | None | Passed |
| normal status | available | available | Passed |
| boundary status | empty | empty | Passed |
| normal validation | False | False | Passed |
| boundary validation | True | True | Passed |
| normal revalidate | {'active': None, 'epoch': 1} | {'active': None, 'epoch': 1} | Passed |
| boundary revalidate | {'active': None, 'epoch': 1} | {'active': None, 'epoch': 1} | Passed |
| variant query or selection payload | id1 | id1 | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 28d44572843b413a3fcb267d38894bc85e392a4d62a02a30c8049aab520e56c6
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 == 'visible': return d['ids']
if event == 'eligible': return [x for x in d['ids'] if x not in d['disabled']]
if event == 'commit': return d['active'] if d['active'] in d['ids'] and d['active'] not in d['disabled'] else None
if event == 'reason': return d['reason'].get(d['active'])
if event == 'selected': return d['value']
if event == 'row-flags': return [x in d['disabled'] for x in d['ids']]
if event == 'first-enabled': return next((x for x in d['ids'] if x not in d['disabled']),None)
if event == 'status': return 'empty' if not d['ids'] else 'available' if any(x not in d['disabled'] for x in d['ids']) else 'unavailable'
if event == 'validation': return d['value'] is None or d['value'] not in d['disabled']
if event == 'revalidate': return {'active':None if d['active'] in d['disabled'] else d['active'],'epoch':d['epoch']}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'ids':['a','b','c'],'disabled':['a','c'],'labels':['Same','Same','See'],'active':'a','value':'c','reason':{'a':'retired','c':'restricted'},'epoch':N}
boundary = {'ids':[],'disabled':[],'labels':[],'active':None,'value':None,'reason':{},'epoch':N}
check('normal visible', solve('visible', normal), ['a','b','c'])
check('boundary visible', solve('visible', boundary), [])
check('normal eligible', solve('eligible', normal), ['b'])
check('boundary eligible', solve('eligible', boundary), [])
check('normal commit', solve('commit', normal), None)
check('boundary commit', solve('commit', boundary), None)
check('normal reason', solve('reason', normal), 'retired')
check('boundary reason', solve('reason', boundary), None)
check('normal selected', solve('selected', normal), 'c')
check('boundary selected', solve('selected', boundary), None)
check('normal row-flags', solve('row-flags', normal), [True,False,True])
check('boundary row-flags', solve('row-flags', boundary), [])
check('normal first-enabled', solve('first-enabled', normal), 'b')
check('boundary first-enabled', solve('first-enabled', boundary), None)
check('normal status', solve('status', normal), 'available')
check('boundary status', solve('status', boundary), 'empty')
check('normal validation', solve('validation', normal), False)
check('boundary validation', solve('validation', boundary), True)
check('normal revalidate', solve('revalidate', normal), {'active':None,'epoch':N})
check('boundary revalidate', solve('revalidate', boundary), {'active':None,'epoch':N})
variant = dict(normal, **{'value':'id'+str(N)})
check('variant query or selection payload', solve('selected', 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 visible | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| boundary visible | [] | [] | Passed |
| normal eligible | ['b'] | ['b'] | Passed |
| boundary eligible | [] | [] | Passed |
| normal commit | None | None | Passed |
| boundary commit | None | None | Passed |
| normal reason | retired | retired | Passed |
| boundary reason | None | None | Passed |
| normal selected | c | c | Passed |
| boundary selected | None | None | Passed |
| normal row-flags | [True, False, True] | [True, False, True] | Passed |
| boundary row-flags | [] | [] | Passed |
| normal first-enabled | b | b | Passed |
| boundary first-enabled | None | None | Passed |
| normal status | available | available | Passed |
| boundary status | empty | empty | Passed |
| normal validation | False | False | Passed |
| boundary validation | True | True | Passed |
| normal revalidate | {'active': None, 'epoch': 1} | {'active': None, 'epoch': 1} | Passed |
| boundary revalidate | {'active': None, 'epoch': 1} | {'active': None, 'epoch': 1} | Passed |
| variant query or selection payload | id1 | id1 | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 7c956c1857fe18f5329a93a74b81e3ed68ab9412ffad21e6735067585712f6e9
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:38.005119+00:00.
Case digest / 88983bcc443a1991b20967a3e4e6a6e925c23e3b53fe7c8d918325530c97c6c7