FAILURE MAP
← Case archive

FA-21906 / Autocomplete interactions / Open access

Suggestion request context: remounted autocomplete reuses an earlier instance marker · case 01

The instance completion transition produces an incorrect observable state.

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

ROOT CAUSE

At request-context/instance, the implementation evaluates `d['epoch']` instead of preserving the specified completion transition.

VERIFIED REPAIR

Implement the instance contract using `d['instance']`.

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

Case contract

A suggestion request is bound to draft, field identity, selection range, locale and dependency scope. Each outgoing descriptor carries those values from the initiating snapshot; accepting a response requires the same query epoch and field instance. No transport behavior is modeled.

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 == 'query': return {'text':d['query']}
    if event == 'epoch': return d['epoch']
    if event == 'field': return d['field']
    if event == 'instance': return d['epoch']
    if event == 'locale': return d['locale']
    if event == 'scope': return d['scope']
    if event == 'range': return [d['start'],d['end']]
    if event == 'exclusions': return d['selected']
    if event == 'limit': return d['limit']
    if event == 'accept': return d['response_epoch']==d['epoch'] and d['response_field']==d['field']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'query':'pear','epoch':N,'field':'billing','instance':N+2,'locale':'fr','scope':'fruit','start':1,'end':3,'selected':['p1'],'limit':7,'response_epoch':N-1,'response_field':'shipping'}
boundary = {'query':'','epoch':N,'field':'billing','instance':N,'locale':'en','scope':'all','start':0,'end':0,'selected':[],'limit':0,'response_epoch':N,'response_field':'billing'}
check('normal query', solve('query', normal), {'text':'pear'})
check('boundary query', solve('query', boundary), {'text':''})
check('normal epoch', solve('epoch', normal), N)
check('boundary epoch', solve('epoch', boundary), N)
check('normal field', solve('field', normal), 'billing')
check('boundary field', solve('field', boundary), 'billing')
check('normal instance', solve('instance', normal), N+2)
check('boundary instance', solve('instance', boundary), N)
check('normal locale', solve('locale', normal), 'fr')
check('boundary locale', solve('locale', boundary), 'en')
check('normal scope', solve('scope', normal), 'fruit')
check('boundary scope', solve('scope', boundary), 'all')
check('normal range', solve('range', normal), [1,3])
check('boundary range', solve('range', boundary), [0,0])
check('normal exclusions', solve('exclusions', normal), ['p1'])
check('boundary exclusions', solve('exclusions', boundary), [])
check('normal limit', solve('limit', normal), 7)
check('boundary limit', solve('limit', boundary), 0)
check('normal accept', solve('accept', normal), False)
check('boundary accept', solve('accept', boundary), True)
variant = dict(normal, **{'query':'q'*N})
check('variant query or selection payload', solve('query', variant), {'text':'q'*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 query{'text': 'pear'}{'text': 'pear'}Passed
boundary query{'text': ''}{'text': ''}Passed
normal epoch11Passed
boundary epoch11Passed
normal fieldbillingbillingPassed
boundary fieldbillingbillingPassed
normal instance13Failed
boundary instance11Passed
normal localefrfrPassed
boundary localeenenPassed
normal scopefruitfruitPassed
boundary scopeallallPassed
normal range[1, 3][1, 3]Passed
boundary range[0, 0][0, 0]Passed
normal exclusions['p1']['p1']Passed
boundary exclusions[][]Passed
normal limit77Passed
boundary limit00Passed
normal acceptFalseFalsePassed
boundary acceptTrueTruePassed
variant query or selection payload{'text': 'q'}{'text': 'q'}Passed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 5273bb1c5b3b9aadb1e39ccaf0de96f56e3aac2f98cb38788c51b593849641c0

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 == 'query': return {'text':d['query']}
    if event == 'epoch': return d['epoch']
    if event == 'field': return d['field']
    if event == 'instance': return 0
    if event == 'locale': return d['locale']
    if event == 'scope': return d['scope']
    if event == 'range': return [d['start'],d['end']]
    if event == 'exclusions': return d['selected']
    if event == 'limit': return d['limit']
    if event == 'accept': return d['response_epoch']==d['epoch'] and d['response_field']==d['field']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'query':'pear','epoch':N,'field':'billing','instance':N+2,'locale':'fr','scope':'fruit','start':1,'end':3,'selected':['p1'],'limit':7,'response_epoch':N-1,'response_field':'shipping'}
boundary = {'query':'','epoch':N,'field':'billing','instance':N,'locale':'en','scope':'all','start':0,'end':0,'selected':[],'limit':0,'response_epoch':N,'response_field':'billing'}
check('normal query', solve('query', normal), {'text':'pear'})
check('boundary query', solve('query', boundary), {'text':''})
check('normal epoch', solve('epoch', normal), N)
check('boundary epoch', solve('epoch', boundary), N)
check('normal field', solve('field', normal), 'billing')
check('boundary field', solve('field', boundary), 'billing')
check('normal instance', solve('instance', normal), N+2)
check('boundary instance', solve('instance', boundary), N)
check('normal locale', solve('locale', normal), 'fr')
check('boundary locale', solve('locale', boundary), 'en')
check('normal scope', solve('scope', normal), 'fruit')
check('boundary scope', solve('scope', boundary), 'all')
check('normal range', solve('range', normal), [1,3])
check('boundary range', solve('range', boundary), [0,0])
check('normal exclusions', solve('exclusions', normal), ['p1'])
check('boundary exclusions', solve('exclusions', boundary), [])
check('normal limit', solve('limit', normal), 7)
check('boundary limit', solve('limit', boundary), 0)
check('normal accept', solve('accept', normal), False)
check('boundary accept', solve('accept', boundary), True)
variant = dict(normal, **{'query':'q'*N})
check('variant query or selection payload', solve('query', variant), {'text':'q'*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 query{'text': 'pear'}{'text': 'pear'}Passed
boundary query{'text': ''}{'text': ''}Passed
normal epoch11Passed
boundary epoch11Passed
normal fieldbillingbillingPassed
boundary fieldbillingbillingPassed
normal instance03Failed
boundary instance01Failed
normal localefrfrPassed
boundary localeenenPassed
normal scopefruitfruitPassed
boundary scopeallallPassed
normal range[1, 3][1, 3]Passed
boundary range[0, 0][0, 0]Passed
normal exclusions['p1']['p1']Passed
boundary exclusions[][]Passed
normal limit77Passed
boundary limit00Passed
normal acceptFalseFalsePassed
boundary acceptTrueTruePassed
variant query or selection payload{'text': 'q'}{'text': 'q'}Passed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 2a3b535041c67a9cdd221dbe186fcea138378098e088aa364be12a3943ffd2c3

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 == 'query': return {'text':d['query']}
    if event == 'epoch': return d['epoch']
    if event == 'field': return d['field']
    if event == 'instance': return d['instance']
    if event == 'locale': return d['locale']
    if event == 'scope': return d['scope']
    if event == 'range': return [d['start'],d['end']]
    if event == 'exclusions': return d['selected']
    if event == 'limit': return d['limit']
    if event == 'accept': return d['response_epoch']==d['epoch'] and d['response_field']==d['field']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'query':'pear','epoch':N,'field':'billing','instance':N+2,'locale':'fr','scope':'fruit','start':1,'end':3,'selected':['p1'],'limit':7,'response_epoch':N-1,'response_field':'shipping'}
boundary = {'query':'','epoch':N,'field':'billing','instance':N,'locale':'en','scope':'all','start':0,'end':0,'selected':[],'limit':0,'response_epoch':N,'response_field':'billing'}
check('normal query', solve('query', normal), {'text':'pear'})
check('boundary query', solve('query', boundary), {'text':''})
check('normal epoch', solve('epoch', normal), N)
check('boundary epoch', solve('epoch', boundary), N)
check('normal field', solve('field', normal), 'billing')
check('boundary field', solve('field', boundary), 'billing')
check('normal instance', solve('instance', normal), N+2)
check('boundary instance', solve('instance', boundary), N)
check('normal locale', solve('locale', normal), 'fr')
check('boundary locale', solve('locale', boundary), 'en')
check('normal scope', solve('scope', normal), 'fruit')
check('boundary scope', solve('scope', boundary), 'all')
check('normal range', solve('range', normal), [1,3])
check('boundary range', solve('range', boundary), [0,0])
check('normal exclusions', solve('exclusions', normal), ['p1'])
check('boundary exclusions', solve('exclusions', boundary), [])
check('normal limit', solve('limit', normal), 7)
check('boundary limit', solve('limit', boundary), 0)
check('normal accept', solve('accept', normal), False)
check('boundary accept', solve('accept', boundary), True)
variant = dict(normal, **{'query':'q'*N})
check('variant query or selection payload', solve('query', variant), {'text':'q'*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 query{'text': 'pear'}{'text': 'pear'}Passed
boundary query{'text': ''}{'text': ''}Passed
normal epoch11Passed
boundary epoch11Passed
normal fieldbillingbillingPassed
boundary fieldbillingbillingPassed
normal instance33Passed
boundary instance11Passed
normal localefrfrPassed
boundary localeenenPassed
normal scopefruitfruitPassed
boundary scopeallallPassed
normal range[1, 3][1, 3]Passed
boundary range[0, 0][0, 0]Passed
normal exclusions['p1']['p1']Passed
boundary exclusions[][]Passed
normal limit77Passed
boundary limit00Passed
normal acceptFalseFalsePassed
boundary acceptTrueTruePassed
variant query or selection payload{'text': 'q'}{'text': 'q'}Passed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / c3c68e5e6973fbdc7b476dc3add9a355786b193fc26e977adbbe2acaa21a233a

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

Case digest / 10fbedfb201537df5b0fb0abbbcb17ca9a932b2fe351ff5c9d65353adb86500b