FAILURE MAP
← Case archive

FA-22736 / Autocomplete interactions / Open access

Controlled autocomplete synchronization: controlled value comparison uses truthiness rather than equality · case 01

The change-detection completion transition produces an incorrect observable state.

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

ROOT CAUSE

At controlled-picker/change-detection, the implementation evaluates `bool(d['incoming'])!=bool(d['value'])` instead of preserving the specified completion transition.

THE FAILURE

At controlled-picker/change-detection, the implementation evaluates `bool(d['incoming'])!=bool(d['value'])` instead of preserving the specified completion transition.

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

Case contract

Parent-provided value updates are distinguished from unacknowledged draft edits. An acknowledged commit may reset the draft to its label; unrelated rerenders preserve dirty draft. External value replacement clears preview and invalidates result epoch. Object identity is irrelevant; stable option identifiers determine equality.

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 == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return bool(d['incoming'])!=bool(d['value'])
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(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 same-idTrueTruePassed
boundary same-idTrueTruePassed
normal rerenderbeabeaPassed
boundary rerenderPassed
normal external-valuebbPassed
boundary external-valueNoneNonePassed
normal external-draftBeeBeePassed
boundary external-draftPassed
normal external-previewPassed
boundary external-previewPassed
normal parent-echo['b']['b']Passed
boundary parent-echo[][]Passed
normal ack-dirtyTrueTruePassed
boundary ack-dirtyFalseFalsePassed
normal stale-parentFalseFalsePassed
boundary stale-parentTrueTruePassed
normal label-refresh{'id': 'a', 'label': 'A2'}{'id': 'a', 'label': 'A2'}Passed
boundary label-refresh{'id': '', 'label': ''}{'id': '', 'label': ''}Passed
normal change-detectionFalseTrueFailed
boundary change-detectionFalseFalsePassed
variant query or selection payloadid1id1Passed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / a039f7ec79a1bc777cb98138e4c2a826933fa3121b76ccaf348d4378a48eb789

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 == 'same-id': return d['old_object']['id']==d['new_object']['id']
    if event == 'rerender': return d['draft'] if d['dirty'] and not d['ack'] else d['label']
    if event == 'external-value': return d['incoming']
    if event == 'external-draft': return d['label']
    if event == 'external-preview': return ''
    if event == 'parent-echo': return [] if d['ack'] else [d['incoming']]
    if event == 'ack-dirty': return False if d['ack'] else d['dirty']
    if event == 'stale-parent': return d['incoming_epoch']==d['epoch']
    if event == 'label-refresh': return {'id':d['old_object']['id'],'label':d['new_object']['label']}
    if event == 'change-detection': return False
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'value':'a','incoming':'b','label':'Bee','draft':'bea','dirty':True,'ack':False,'preview':'beam','epoch':N,'incoming_epoch':N-1,'old_object':{'id':'a','label':'A'},'new_object':{'id':'a','label':'A2'}}
boundary = {'value':None,'incoming':None,'label':'','draft':'','dirty':False,'ack':True,'preview':'','epoch':N,'incoming_epoch':N,'old_object':{'id':'','label':''},'new_object':{'id':'','label':''}}
check('normal same-id', solve('same-id', normal), True)
check('boundary same-id', solve('same-id', boundary), True)
check('normal rerender', solve('rerender', normal), 'bea')
check('boundary rerender', solve('rerender', boundary), '')
check('normal external-value', solve('external-value', normal), 'b')
check('boundary external-value', solve('external-value', boundary), None)
check('normal external-draft', solve('external-draft', normal), 'Bee')
check('boundary external-draft', solve('external-draft', boundary), '')
check('normal external-preview', solve('external-preview', normal), '')
check('boundary external-preview', solve('external-preview', boundary), '')
check('normal parent-echo', solve('parent-echo', normal), ['b'])
check('boundary parent-echo', solve('parent-echo', boundary), [])
check('normal ack-dirty', solve('ack-dirty', normal), True)
check('boundary ack-dirty', solve('ack-dirty', boundary), False)
check('normal stale-parent', solve('stale-parent', normal), False)
check('boundary stale-parent', solve('stale-parent', boundary), True)
check('normal label-refresh', solve('label-refresh', normal), {'id':'a','label':'A2'})
check('boundary label-refresh', solve('label-refresh', boundary), {'id':'','label':''})
check('normal change-detection', solve('change-detection', normal), True)
check('boundary change-detection', solve('change-detection', boundary), False)
variant = dict(normal, **{'incoming':'id'+str(N)})
check('variant query or selection payload', solve('external-value', variant), 'id'+str(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 same-idTrueTruePassed
boundary same-idTrueTruePassed
normal rerenderbeabeaPassed
boundary rerenderPassed
normal external-valuebbPassed
boundary external-valueNoneNonePassed
normal external-draftBeeBeePassed
boundary external-draftPassed
normal external-previewPassed
boundary external-previewPassed
normal parent-echo['b']['b']Passed
boundary parent-echo[][]Passed
normal ack-dirtyTrueTruePassed
boundary ack-dirtyFalseFalsePassed
normal stale-parentFalseFalsePassed
boundary stale-parentTrueTruePassed
normal label-refresh{'id': 'a', 'label': 'A2'}{'id': 'a', 'label': 'A2'}Passed
boundary label-refresh{'id': '', 'label': ''}{'id': '', 'label': ''}Passed
normal change-detectionFalseTrueFailed
boundary change-detectionFalseFalsePassed
variant query or selection payloadid1id1Passed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 7ee4b332505120dabe73d892e9c5473f659d0db5dac5a2d93a95b1874bd38034

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

Case digest / be2a14d5df4f7883fcf504f914e6b21e8d66dda76d52b04656c43803d3ddebe1