FAILURE MAP
← Case archive

FA-23261 / Autocomplete interactions / Open access

Unresolved autocomplete draft on blur: ambiguous exact-label candidates are arbitrarily auto-confirmed · case 01

The exact completion transition produces an incorrect observable state.

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

ROOT CAUSE

At blur-resolution/exact, the implementation evaluates `d['exact_ids'][0] if d['exact_ids'] else None` instead of preserving the specified completion transition.

VERIFIED REPAIR

Implement the exact contract using `d['exact_ids'][0] if len(d['exact_ids'])==1 else None`.

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

Case contract

This strict-selection picker reverts an unresolved draft to the committed label after blur unless a suggestion pointer acceptance or IME composition is in progress. Exact unique candidate confirmation is an explicit separate transition. Blur never chooses a highlighted candidate merely because it exists.

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 == 'revert': return d['label']
    if event == 'value': return d['value']
    if event == 'pointer': return not d['pointer_pending']
    if event == 'composition': return not d['composing']
    if event == 'exact': return d['exact_ids'][0] if d['exact_ids'] else None
    if event == 'touched': return True
    if event == 'pending': return None
    if event == 'free-text-rejection': return {'resolved':d['value'] is not None,'free_text':None}
    if event == 'unresolved-validation': return {'invalid_draft':d['draft']!=d['label'],'candidate':None}
    if event == 'changed': return False
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'peach','value':'p1','label':'Pear','active':'p2','pointer_pending':True,'composing':True,'exact_ids':['p3','p4'],'query_epoch':N,'pending':'peach','touched':False}
boundary = {'draft':'','value':None,'label':'','active':None,'pointer_pending':False,'composing':False,'exact_ids':[''],'query_epoch':N,'pending':None,'touched':True}
check('normal revert', solve('revert', normal), 'Pear')
check('boundary revert', solve('revert', boundary), '')
check('normal value', solve('value', normal), 'p1')
check('boundary value', solve('value', boundary), None)
check('normal pointer', solve('pointer', normal), False)
check('boundary pointer', solve('pointer', boundary), True)
check('normal composition', solve('composition', normal), False)
check('boundary composition', solve('composition', boundary), True)
check('normal exact', solve('exact', normal), None)
check('boundary exact', solve('exact', boundary), '')
check('normal touched', solve('touched', normal), True)
check('boundary touched', solve('touched', boundary), True)
check('normal pending', solve('pending', normal), None)
check('boundary pending', solve('pending', boundary), None)
check('normal free-text-rejection', solve('free-text-rejection', normal), {'resolved':True,'free_text':None})
check('boundary free-text-rejection', solve('free-text-rejection', boundary), {'resolved':False,'free_text':None})
check('normal unresolved-validation', solve('unresolved-validation', normal), {'invalid_draft':True,'candidate':None})
check('boundary unresolved-validation', solve('unresolved-validation', boundary), {'invalid_draft':False,'candidate':None})
check('normal changed', solve('changed', normal), False)
check('boundary changed', solve('changed', boundary), False)
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('revert', 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 revertPearPearPassed
boundary revertPassed
normal valuep1p1Passed
boundary valueNoneNonePassed
normal pointerFalseFalsePassed
boundary pointerTrueTruePassed
normal compositionFalseFalsePassed
boundary compositionTrueTruePassed
normal exactp3NoneFailed
boundary exactPassed
normal touchedTrueTruePassed
boundary touchedTrueTruePassed
normal pendingNoneNonePassed
boundary pendingNoneNonePassed
normal free-text-rejection{'free_text': None, 'resolved': True}{'free_text': None, 'resolved': True}Passed
boundary free-text-rejection{'free_text': None, 'resolved': False}{'free_text': None, 'resolved': False}Passed
normal unresolved-validation{'candidate': None, 'invalid_draft': True}{'candidate': None, 'invalid_draft': True}Passed
boundary unresolved-validation{'candidate': None, 'invalid_draft': False}{'candidate': None, 'invalid_draft': False}Passed
normal changedFalseFalsePassed
boundary changedFalseFalsePassed
variant query or selection payloadLLPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 4318729c2bdee75d536d6ea11b1ff587a683d91028e94feb0a5b121d7a274ac3

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 == 'revert': return d['label']
    if event == 'value': return d['value']
    if event == 'pointer': return not d['pointer_pending']
    if event == 'composition': return not d['composing']
    if event == 'exact': return None
    if event == 'touched': return True
    if event == 'pending': return None
    if event == 'free-text-rejection': return {'resolved':d['value'] is not None,'free_text':None}
    if event == 'unresolved-validation': return {'invalid_draft':d['draft']!=d['label'],'candidate':None}
    if event == 'changed': return False
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'peach','value':'p1','label':'Pear','active':'p2','pointer_pending':True,'composing':True,'exact_ids':['p3','p4'],'query_epoch':N,'pending':'peach','touched':False}
boundary = {'draft':'','value':None,'label':'','active':None,'pointer_pending':False,'composing':False,'exact_ids':[''],'query_epoch':N,'pending':None,'touched':True}
check('normal revert', solve('revert', normal), 'Pear')
check('boundary revert', solve('revert', boundary), '')
check('normal value', solve('value', normal), 'p1')
check('boundary value', solve('value', boundary), None)
check('normal pointer', solve('pointer', normal), False)
check('boundary pointer', solve('pointer', boundary), True)
check('normal composition', solve('composition', normal), False)
check('boundary composition', solve('composition', boundary), True)
check('normal exact', solve('exact', normal), None)
check('boundary exact', solve('exact', boundary), '')
check('normal touched', solve('touched', normal), True)
check('boundary touched', solve('touched', boundary), True)
check('normal pending', solve('pending', normal), None)
check('boundary pending', solve('pending', boundary), None)
check('normal free-text-rejection', solve('free-text-rejection', normal), {'resolved':True,'free_text':None})
check('boundary free-text-rejection', solve('free-text-rejection', boundary), {'resolved':False,'free_text':None})
check('normal unresolved-validation', solve('unresolved-validation', normal), {'invalid_draft':True,'candidate':None})
check('boundary unresolved-validation', solve('unresolved-validation', boundary), {'invalid_draft':False,'candidate':None})
check('normal changed', solve('changed', normal), False)
check('boundary changed', solve('changed', boundary), False)
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('revert', 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 revertPearPearPassed
boundary revertPassed
normal valuep1p1Passed
boundary valueNoneNonePassed
normal pointerFalseFalsePassed
boundary pointerTrueTruePassed
normal compositionFalseFalsePassed
boundary compositionTrueTruePassed
normal exactNoneNonePassed
boundary exactNoneFailed
normal touchedTrueTruePassed
boundary touchedTrueTruePassed
normal pendingNoneNonePassed
boundary pendingNoneNonePassed
normal free-text-rejection{'free_text': None, 'resolved': True}{'free_text': None, 'resolved': True}Passed
boundary free-text-rejection{'free_text': None, 'resolved': False}{'free_text': None, 'resolved': False}Passed
normal unresolved-validation{'candidate': None, 'invalid_draft': True}{'candidate': None, 'invalid_draft': True}Passed
boundary unresolved-validation{'candidate': None, 'invalid_draft': False}{'candidate': None, 'invalid_draft': False}Passed
normal changedFalseFalsePassed
boundary changedFalseFalsePassed
variant query or selection payloadLLPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 125dc0206ad1d46c70a2cd3f4e8f32c95d6b1afe2f5846be8051c215ffc3f0e2

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 == 'revert': return d['label']
    if event == 'value': return d['value']
    if event == 'pointer': return not d['pointer_pending']
    if event == 'composition': return not d['composing']
    if event == 'exact': return d['exact_ids'][0] if len(d['exact_ids'])==1 else None
    if event == 'touched': return True
    if event == 'pending': return None
    if event == 'free-text-rejection': return {'resolved':d['value'] is not None,'free_text':None}
    if event == 'unresolved-validation': return {'invalid_draft':d['draft']!=d['label'],'candidate':None}
    if event == 'changed': return False
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'peach','value':'p1','label':'Pear','active':'p2','pointer_pending':True,'composing':True,'exact_ids':['p3','p4'],'query_epoch':N,'pending':'peach','touched':False}
boundary = {'draft':'','value':None,'label':'','active':None,'pointer_pending':False,'composing':False,'exact_ids':[''],'query_epoch':N,'pending':None,'touched':True}
check('normal revert', solve('revert', normal), 'Pear')
check('boundary revert', solve('revert', boundary), '')
check('normal value', solve('value', normal), 'p1')
check('boundary value', solve('value', boundary), None)
check('normal pointer', solve('pointer', normal), False)
check('boundary pointer', solve('pointer', boundary), True)
check('normal composition', solve('composition', normal), False)
check('boundary composition', solve('composition', boundary), True)
check('normal exact', solve('exact', normal), None)
check('boundary exact', solve('exact', boundary), '')
check('normal touched', solve('touched', normal), True)
check('boundary touched', solve('touched', boundary), True)
check('normal pending', solve('pending', normal), None)
check('boundary pending', solve('pending', boundary), None)
check('normal free-text-rejection', solve('free-text-rejection', normal), {'resolved':True,'free_text':None})
check('boundary free-text-rejection', solve('free-text-rejection', boundary), {'resolved':False,'free_text':None})
check('normal unresolved-validation', solve('unresolved-validation', normal), {'invalid_draft':True,'candidate':None})
check('boundary unresolved-validation', solve('unresolved-validation', boundary), {'invalid_draft':False,'candidate':None})
check('normal changed', solve('changed', normal), False)
check('boundary changed', solve('changed', boundary), False)
variant = dict(normal, **{'label':'L'*N})
check('variant query or selection payload', solve('revert', 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 revertPearPearPassed
boundary revertPassed
normal valuep1p1Passed
boundary valueNoneNonePassed
normal pointerFalseFalsePassed
boundary pointerTrueTruePassed
normal compositionFalseFalsePassed
boundary compositionTrueTruePassed
normal exactNoneNonePassed
boundary exactPassed
normal touchedTrueTruePassed
boundary touchedTrueTruePassed
normal pendingNoneNonePassed
boundary pendingNoneNonePassed
normal free-text-rejection{'free_text': None, 'resolved': True}{'free_text': None, 'resolved': True}Passed
boundary free-text-rejection{'free_text': None, 'resolved': False}{'free_text': None, 'resolved': False}Passed
normal unresolved-validation{'candidate': None, 'invalid_draft': True}{'candidate': None, 'invalid_draft': True}Passed
boundary unresolved-validation{'candidate': None, 'invalid_draft': False}{'candidate': None, 'invalid_draft': False}Passed
normal changedFalseFalsePassed
boundary changedFalseFalsePassed
variant query or selection payloadLLPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 818133182f73b0899f627a02617f5229006c28cf27444e1a7ae9aba1a8f916d2

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

Case digest / ca0368814e999ab1874876789ec214a8de20049d506dcba4691f78984dc65c78