FAILURE MAP
← Case archive

FA-21931 / Autocomplete interactions / Open access

Suggestion request context: zero-capacity completion still asks for results · case 01

The limit completion transition produces an incorrect observable state.

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

ROOT CAUSE

At request-context/limit, the implementation evaluates `max(1,d['limit'])` instead of preserving the specified completion transition.

VERIFIED REPAIR

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

Unsuccessful approach: The attempted repair uses `d['limit'] or 10`, 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['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 max(1,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 limit10Failed
normal acceptFalseFalsePassed
boundary acceptTrueTruePassed
variant query or selection payload{'text': 'q'}{'text': 'q'}Passed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 03b9dd735e4db2648f0c907b2490f93edb93d40dec1404f6378c3af6bde06084

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 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'] or 10
    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 limit100Failed
normal acceptFalseFalsePassed
boundary acceptTrueTruePassed
variant query or selection payload{'text': 'q'}{'text': 'q'}Passed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / f508c0b4c0aecd75032f4685bba8aa8a0731b18ce30e51acb065a7bd45e2161b

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

Case digest / 2ce334471b8f1c5bf71c340c39adaaeae7624ba3b6a3fd82860d41dc591f9e0e