FAILURE MAP
← Case archive

FA-23181 / Autocomplete interactions / Open access

Locking an active autocomplete: a locked suggestion can still change the selected identifier · case 01

The allow-accept completion transition produces an incorrect observable state.

Verified by executionVariant 1 · 22 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

At locked-picker/allow-accept, the implementation evaluates `True` instead of preserving the specified completion transition.

VERIFIED REPAIR

Implement the allow-accept contract using `not d['locked']`.

Unsuccessful approach: The attempted repair uses `False`, which still violates a normal or boundary completion fixture.

Case contract

Switching an active picker to read-only cancels mutable suggestion interaction while retaining its selected value and label. Draft is reverted to the selected label, pending requests and create transactions are detached, transient preview and result activation are removed, and unlocking does not replay an old acceptance.

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 == 'retain-value': return d['value']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return None
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return True
    if event == 'unlock-draft': return 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','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', 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 fixtureActualExpectedOutcome
normal retain-valuep1p1Passed
boundary retain-valuePassed
normal retain-labelPearPearPassed
boundary retain-labelPassed
normal query-cancelNoneNonePassed
boundary query-cancelNoneNonePassed
normal create-detachNoneNonePassed
boundary create-detachNoneNonePassed
normal selected-row['Pear']['Pear']Passed
boundary selected-row['']['']Passed
normal copy-selected-labelPearPearPassed
boundary copy-selected-labelPassed
normal create-display{'id': 'p1', 'label': 'Pear'}{'id': 'p1', 'label': 'Pear'}Passed
boundary create-display{'id': '', 'label': ''}{'id': '', 'label': ''}Passed
normal deferred-dropNoneNonePassed
boundary deferred-dropNoneNonePassed
normal allow-acceptTrueFalseFailed
boundary allow-acceptTrueTruePassed
normal unlock-draftPearPearPassed
boundary unlock-draftPassed
variant query or selection payloadLLPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / d4aa60d1f314ede6e7b3622b2507579500d1023d8116b414f7304ff048790ce0

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 == 'retain-value': return d['value']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return None
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return False
    if event == 'unlock-draft': return 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','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', 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 fixtureActualExpectedOutcome
normal retain-valuep1p1Passed
boundary retain-valuePassed
normal retain-labelPearPearPassed
boundary retain-labelPassed
normal query-cancelNoneNonePassed
boundary query-cancelNoneNonePassed
normal create-detachNoneNonePassed
boundary create-detachNoneNonePassed
normal selected-row['Pear']['Pear']Passed
boundary selected-row['']['']Passed
normal copy-selected-labelPearPearPassed
boundary copy-selected-labelPassed
normal create-display{'id': 'p1', 'label': 'Pear'}{'id': 'p1', 'label': 'Pear'}Passed
boundary create-display{'id': '', 'label': ''}{'id': '', 'label': ''}Passed
normal deferred-dropNoneNonePassed
boundary deferred-dropNoneNonePassed
normal allow-acceptFalseFalsePassed
boundary allow-acceptFalseTrueFailed
normal unlock-draftPearPearPassed
boundary unlock-draftPassed
variant query or selection payloadLLPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / c13185578742dd70e4610f7caca6a9bf636c3d2528e9f40f02c0e095ac8d4714

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 == 'retain-value': return d['value']
    if event == 'retain-label': return d['label']
    if event == 'query-cancel': return None
    if event == 'create-detach': return None
    if event == 'selected-row': return [d['label']] if d['value'] is not None else []
    if event == 'copy-selected-label': return d['label']
    if event == 'create-display': return {'id':d['value'],'label':d['label']}
    if event == 'deferred-drop': return None
    if event == 'allow-accept': return not d['locked']
    if event == 'unlock-draft': return 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','pending':'pe','create':'new-plum','active':'p2','preview':'ach','epoch':N,'deferred':'p2','locked':True}
boundary = {'value':'','label':'','draft':'x','pending':None,'create':None,'active':None,'preview':'','epoch':N,'deferred':None,'locked':False}
check('normal retain-value', solve('retain-value', normal), 'p1')
check('boundary retain-value', solve('retain-value', boundary), '')
check('normal retain-label', solve('retain-label', normal), 'Pear')
check('boundary retain-label', solve('retain-label', boundary), '')
check('normal query-cancel', solve('query-cancel', normal), None)
check('boundary query-cancel', solve('query-cancel', boundary), None)
check('normal create-detach', solve('create-detach', normal), None)
check('boundary create-detach', solve('create-detach', boundary), None)
check('normal selected-row', solve('selected-row', normal), ['Pear'])
check('boundary selected-row', solve('selected-row', boundary), [''])
check('normal copy-selected-label', solve('copy-selected-label', normal), 'Pear')
check('boundary copy-selected-label', solve('copy-selected-label', boundary), '')
check('normal create-display', solve('create-display', normal), {'id':'p1','label':'Pear'})
check('boundary create-display', solve('create-display', boundary), {'id':'','label':''})
check('normal deferred-drop', solve('deferred-drop', normal), None)
check('boundary deferred-drop', solve('deferred-drop', boundary), None)
check('normal allow-accept', solve('allow-accept', normal), False)
check('boundary allow-accept', solve('allow-accept', boundary), True)
check('normal unlock-draft', solve('unlock-draft', normal), 'Pear')
check('boundary unlock-draft', solve('unlock-draft', boundary), '')
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('retain-label', 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 fixtureActualExpectedOutcome
normal retain-valuep1p1Passed
boundary retain-valuePassed
normal retain-labelPearPearPassed
boundary retain-labelPassed
normal query-cancelNoneNonePassed
boundary query-cancelNoneNonePassed
normal create-detachNoneNonePassed
boundary create-detachNoneNonePassed
normal selected-row['Pear']['Pear']Passed
boundary selected-row['']['']Passed
normal copy-selected-labelPearPearPassed
boundary copy-selected-labelPassed
normal create-display{'id': 'p1', 'label': 'Pear'}{'id': 'p1', 'label': 'Pear'}Passed
boundary create-display{'id': '', 'label': ''}{'id': '', 'label': ''}Passed
normal deferred-dropNoneNonePassed
boundary deferred-dropNoneNonePassed
normal allow-acceptFalseFalsePassed
boundary allow-acceptTrueTruePassed
normal unlock-draftPearPearPassed
boundary unlock-draftPassed
variant query or selection payloadLLPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 3974b898ffc15f675b2ca0acb7e15b59c9c4204c2e5f1805b92397a56f90da79

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:45.357460+00:00.

Case digest / e177a7b68626ec4c2998a9897565f372c755daf6a9214e358c8c7c84332bca5e