FAILURE MAP
← Case archive

FA-22056 / Autocomplete interactions / Open access

Autocomplete commit payload: commit attributes a remote suggestion to local history · case 01

The source completion transition produces an incorrect observable state.

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

ROOT CAUSE

At commit-payload/source, the implementation evaluates `'local'` instead of preserving the specified completion transition.

THE FAILURE

At commit-payload/source, the implementation evaluates `'local'` instead of preserving the specified completion transition.

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

Case contract

Explicit suggestion acceptance emits the selected stable identifier, canonical label and source metadata, then replaces the draft and advances its edit epoch. A commit transaction uses the accepted result snapshot, never an unrelated current highlight. Empty identifiers and labels are valid values.

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 == 'value': return d['accepted']['id']
    if event == 'display': return d['accepted']['label']
    if event == 'snapshot': return d['accepted']['id']
    if event == 'source': return 'local'
    if event == 'metadata': return d['accepted']['extra']
    if event == 'reaccept-change': return [] if d['previous']==d['accepted']['id'] else [[d['previous'],d['accepted']['id']]]
    if event == 'change': return [d['previous'],d['accepted']['id']]
    if event == 'reason': return d['reason']
    if event == 'cleanup': return {'draft':d['accepted']['label'],'active':None}
    if event == 'freshness': return d['accepted_epoch']==d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'accepted':{'id':'p7','label':'Pear','source':'remote','extra':{'kind':'fruit'}},'highlight':{'id':'p8','label':'Peach'},'draft':'pe','epoch':N,'previous':'p1','reason':'pointer','query_epoch':N-1,'accepted_epoch':N}
boundary = {'accepted':{'id':'','label':'','source':'local','extra':{}},'highlight':{'id':'fallback','label':'Fallback'},'draft':'x','epoch':N,'previous':'','reason':'explicit','query_epoch':N,'accepted_epoch':N}
check('normal value', solve('value', normal), 'p7')
check('boundary value', solve('value', boundary), '')
check('normal display', solve('display', normal), 'Pear')
check('boundary display', solve('display', boundary), '')
check('normal snapshot', solve('snapshot', normal), 'p7')
check('boundary snapshot', solve('snapshot', boundary), '')
check('normal source', solve('source', normal), 'remote')
check('boundary source', solve('source', boundary), 'local')
check('normal metadata', solve('metadata', normal), {'kind':'fruit'})
check('boundary metadata', solve('metadata', boundary), {})
check('normal reaccept-change', solve('reaccept-change', normal), [['p1','p7']])
check('boundary reaccept-change', solve('reaccept-change', boundary), [])
check('normal change', solve('change', normal), ['p1','p7'])
check('boundary change', solve('change', boundary), ['',''])
check('normal reason', solve('reason', normal), 'pointer')
check('boundary reason', solve('reason', boundary), 'explicit')
check('normal cleanup', solve('cleanup', normal), {'draft':'Pear','active':None})
check('boundary cleanup', solve('cleanup', boundary), {'draft':'','active':None})
check('normal freshness', solve('freshness', normal), True)
check('boundary freshness', solve('freshness', boundary), True)
variant = dict(normal, **{'accepted':{'id':'id'+str(N),'label':'L'*N,'source':'local','extra':{}}})
check('variant query or selection payload', solve('display', 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 valuep7p7Passed
boundary valuePassed
normal displayPearPearPassed
boundary displayPassed
normal snapshotp7p7Passed
boundary snapshotPassed
normal sourcelocalremoteFailed
boundary sourcelocallocalPassed
normal metadata{'kind': 'fruit'}{'kind': 'fruit'}Passed
boundary metadata{}{}Passed
normal reaccept-change[['p1', 'p7']][['p1', 'p7']]Passed
boundary reaccept-change[][]Passed
normal change['p1', 'p7']['p1', 'p7']Passed
boundary change['', '']['', '']Passed
normal reasonpointerpointerPassed
boundary reasonexplicitexplicitPassed
normal cleanup{'active': None, 'draft': 'Pear'}{'active': None, 'draft': 'Pear'}Passed
boundary cleanup{'active': None, 'draft': ''}{'active': None, 'draft': ''}Passed
normal freshnessTrueTruePassed
boundary freshnessTrueTruePassed
variant query or selection payloadLLPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 8f2a76f977d90296309fff9d194d795447a47c01ec4a26b2705ed95517a17f3a

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 == 'value': return d['accepted']['id']
    if event == 'display': return d['accepted']['label']
    if event == 'snapshot': return d['accepted']['id']
    if event == 'source': return 'remote'
    if event == 'metadata': return d['accepted']['extra']
    if event == 'reaccept-change': return [] if d['previous']==d['accepted']['id'] else [[d['previous'],d['accepted']['id']]]
    if event == 'change': return [d['previous'],d['accepted']['id']]
    if event == 'reason': return d['reason']
    if event == 'cleanup': return {'draft':d['accepted']['label'],'active':None}
    if event == 'freshness': return d['accepted_epoch']==d['epoch']
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'accepted':{'id':'p7','label':'Pear','source':'remote','extra':{'kind':'fruit'}},'highlight':{'id':'p8','label':'Peach'},'draft':'pe','epoch':N,'previous':'p1','reason':'pointer','query_epoch':N-1,'accepted_epoch':N}
boundary = {'accepted':{'id':'','label':'','source':'local','extra':{}},'highlight':{'id':'fallback','label':'Fallback'},'draft':'x','epoch':N,'previous':'','reason':'explicit','query_epoch':N,'accepted_epoch':N}
check('normal value', solve('value', normal), 'p7')
check('boundary value', solve('value', boundary), '')
check('normal display', solve('display', normal), 'Pear')
check('boundary display', solve('display', boundary), '')
check('normal snapshot', solve('snapshot', normal), 'p7')
check('boundary snapshot', solve('snapshot', boundary), '')
check('normal source', solve('source', normal), 'remote')
check('boundary source', solve('source', boundary), 'local')
check('normal metadata', solve('metadata', normal), {'kind':'fruit'})
check('boundary metadata', solve('metadata', boundary), {})
check('normal reaccept-change', solve('reaccept-change', normal), [['p1','p7']])
check('boundary reaccept-change', solve('reaccept-change', boundary), [])
check('normal change', solve('change', normal), ['p1','p7'])
check('boundary change', solve('change', boundary), ['',''])
check('normal reason', solve('reason', normal), 'pointer')
check('boundary reason', solve('reason', boundary), 'explicit')
check('normal cleanup', solve('cleanup', normal), {'draft':'Pear','active':None})
check('boundary cleanup', solve('cleanup', boundary), {'draft':'','active':None})
check('normal freshness', solve('freshness', normal), True)
check('boundary freshness', solve('freshness', boundary), True)
variant = dict(normal, **{'accepted':{'id':'id'+str(N),'label':'L'*N,'source':'local','extra':{}}})
check('variant query or selection payload', solve('display', 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 valuep7p7Passed
boundary valuePassed
normal displayPearPearPassed
boundary displayPassed
normal snapshotp7p7Passed
boundary snapshotPassed
normal sourceremoteremotePassed
boundary sourceremotelocalFailed
normal metadata{'kind': 'fruit'}{'kind': 'fruit'}Passed
boundary metadata{}{}Passed
normal reaccept-change[['p1', 'p7']][['p1', 'p7']]Passed
boundary reaccept-change[][]Passed
normal change['p1', 'p7']['p1', 'p7']Passed
boundary change['', '']['', '']Passed
normal reasonpointerpointerPassed
boundary reasonexplicitexplicitPassed
normal cleanup{'active': None, 'draft': 'Pear'}{'active': None, 'draft': 'Pear'}Passed
boundary cleanup{'active': None, 'draft': ''}{'active': None, 'draft': ''}Passed
normal freshnessTrueTruePassed
boundary freshnessTrueTruePassed
variant query or selection payloadLLPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / b6f195809eb153877c3047eeee6cbf8ab7fd7874850e7ba4a9b7ca8a705eb009

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 22 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / 94d1aa681e943d7f36d23988d02a7275faf1d7b446b0f19ddfd3c75231ecb9c8