FAILURE MAP
← Case archive

FA-22686 / Autocomplete interactions / Open access

Dependent autocomplete scope changes: new child search snapshot omits the scope change revision · case 01

The descriptor completion transition produces an incorrect observable state.

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

ROOT CAUSE

At dependent-picker/descriptor, the implementation evaluates `[d['old_parent'],d['draft'],d['epoch']]` instead of preserving the specified completion transition.

VERIFIED REPAIR

Implement the descriptor contract using `[d['parent'],d['draft'],d['epoch']]`.

Unsuccessful approach: The attempted repair uses `[d['parent'],d['draft'],0]`, which still violates a normal or boundary completion fixture.

Case contract

Changing the parent picker invalidates child suggestions, child query epoch and incompatible child value. Draft may be preserved for a new scoped search. Child labels are never used as parent identifiers, and clearing a parent disables dependent search. Compatible values survive explicit scope membership checks.

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 == 'scope': return d['parent']
    if event == 'child': return d['child'] if d['child'] in d['members'] else None
    if event == 'rows': return [] if d['parent']!=d['old_parent'] else d['rows']
    if event == 'parent-difference': return d['parent']!=d['old_parent']
    if event == 'draft': return d['draft']
    if event == 'enabled': return d['parent'] is not None
    if event == 'response': return d['response_parent']==d['parent']
    if event == 'pending': return None if d['parent']!=d['old_parent'] else d['pending']
    if event == 'membership': return d['child'] is None or d['child'] in d['members']
    if event == 'descriptor': return [d['old_parent'],d['draft'],d['epoch']]
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'parent':'country-b','old_parent':'country-a','child':'city-a','members':['city-b'],'draft':'san','rows':['city-a'],'epoch':N,'response_parent':'country-a','parent_label':'Country B','pending':'san'}
boundary = {'parent':None,'old_parent':None,'child':None,'members':[],'draft':'','rows':[],'epoch':N,'response_parent':None,'parent_label':'','pending':None}
check('normal scope', solve('scope', normal), 'country-b')
check('boundary scope', solve('scope', boundary), None)
check('normal child', solve('child', normal), None)
check('boundary child', solve('child', boundary), None)
check('normal rows', solve('rows', normal), [])
check('boundary rows', solve('rows', boundary), [])
check('normal parent-difference', solve('parent-difference', normal), True)
check('boundary parent-difference', solve('parent-difference', boundary), False)
check('normal draft', solve('draft', normal), 'san')
check('boundary draft', solve('draft', boundary), '')
check('normal enabled', solve('enabled', normal), True)
check('boundary enabled', solve('enabled', boundary), False)
check('normal response', solve('response', normal), False)
check('boundary response', solve('response', boundary), True)
check('normal pending', solve('pending', normal), None)
check('boundary pending', solve('pending', boundary), None)
check('normal membership', solve('membership', normal), False)
check('boundary membership', solve('membership', boundary), True)
check('normal descriptor', solve('descriptor', normal), ['country-b','san',N])
check('boundary descriptor', solve('descriptor', boundary), [None,'',N])
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), '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 scopecountry-bcountry-bPassed
boundary scopeNoneNonePassed
normal childNoneNonePassed
boundary childNoneNonePassed
normal rows[][]Passed
boundary rows[][]Passed
normal parent-differenceTrueTruePassed
boundary parent-differenceFalseFalsePassed
normal draftsansanPassed
boundary draftPassed
normal enabledTrueTruePassed
boundary enabledFalseFalsePassed
normal responseFalseFalsePassed
boundary responseTrueTruePassed
normal pendingNoneNonePassed
boundary pendingNoneNonePassed
normal membershipFalseFalsePassed
boundary membershipTrueTruePassed
normal descriptor['country-a', 'san', 1]['country-b', 'san', 1]Failed
boundary descriptor[None, '', 1][None, '', 1]Passed
variant query or selection payloadqqPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / ecb439aa638bd85a9eadec4f42e306e87bd9aaa73b83e85d05ae0eee6eb83fc2

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 == 'scope': return d['parent']
    if event == 'child': return d['child'] if d['child'] in d['members'] else None
    if event == 'rows': return [] if d['parent']!=d['old_parent'] else d['rows']
    if event == 'parent-difference': return d['parent']!=d['old_parent']
    if event == 'draft': return d['draft']
    if event == 'enabled': return d['parent'] is not None
    if event == 'response': return d['response_parent']==d['parent']
    if event == 'pending': return None if d['parent']!=d['old_parent'] else d['pending']
    if event == 'membership': return d['child'] is None or d['child'] in d['members']
    if event == 'descriptor': return [d['parent'],d['draft'],0]
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'parent':'country-b','old_parent':'country-a','child':'city-a','members':['city-b'],'draft':'san','rows':['city-a'],'epoch':N,'response_parent':'country-a','parent_label':'Country B','pending':'san'}
boundary = {'parent':None,'old_parent':None,'child':None,'members':[],'draft':'','rows':[],'epoch':N,'response_parent':None,'parent_label':'','pending':None}
check('normal scope', solve('scope', normal), 'country-b')
check('boundary scope', solve('scope', boundary), None)
check('normal child', solve('child', normal), None)
check('boundary child', solve('child', boundary), None)
check('normal rows', solve('rows', normal), [])
check('boundary rows', solve('rows', boundary), [])
check('normal parent-difference', solve('parent-difference', normal), True)
check('boundary parent-difference', solve('parent-difference', boundary), False)
check('normal draft', solve('draft', normal), 'san')
check('boundary draft', solve('draft', boundary), '')
check('normal enabled', solve('enabled', normal), True)
check('boundary enabled', solve('enabled', boundary), False)
check('normal response', solve('response', normal), False)
check('boundary response', solve('response', boundary), True)
check('normal pending', solve('pending', normal), None)
check('boundary pending', solve('pending', boundary), None)
check('normal membership', solve('membership', normal), False)
check('boundary membership', solve('membership', boundary), True)
check('normal descriptor', solve('descriptor', normal), ['country-b','san',N])
check('boundary descriptor', solve('descriptor', boundary), [None,'',N])
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), '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 scopecountry-bcountry-bPassed
boundary scopeNoneNonePassed
normal childNoneNonePassed
boundary childNoneNonePassed
normal rows[][]Passed
boundary rows[][]Passed
normal parent-differenceTrueTruePassed
boundary parent-differenceFalseFalsePassed
normal draftsansanPassed
boundary draftPassed
normal enabledTrueTruePassed
boundary enabledFalseFalsePassed
normal responseFalseFalsePassed
boundary responseTrueTruePassed
normal pendingNoneNonePassed
boundary pendingNoneNonePassed
normal membershipFalseFalsePassed
boundary membershipTrueTruePassed
normal descriptor['country-b', 'san', 0]['country-b', 'san', 1]Failed
boundary descriptor[None, '', 0][None, '', 1]Failed
variant query or selection payloadqqPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 98914f9edfc04e5863853ff74cd2befbff0a1a41fcb3b7987a2a8f8c3de534d6

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 == 'scope': return d['parent']
    if event == 'child': return d['child'] if d['child'] in d['members'] else None
    if event == 'rows': return [] if d['parent']!=d['old_parent'] else d['rows']
    if event == 'parent-difference': return d['parent']!=d['old_parent']
    if event == 'draft': return d['draft']
    if event == 'enabled': return d['parent'] is not None
    if event == 'response': return d['response_parent']==d['parent']
    if event == 'pending': return None if d['parent']!=d['old_parent'] else d['pending']
    if event == 'membership': return d['child'] is None or d['child'] in d['members']
    if event == 'descriptor': return [d['parent'],d['draft'],d['epoch']]
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'parent':'country-b','old_parent':'country-a','child':'city-a','members':['city-b'],'draft':'san','rows':['city-a'],'epoch':N,'response_parent':'country-a','parent_label':'Country B','pending':'san'}
boundary = {'parent':None,'old_parent':None,'child':None,'members':[],'draft':'','rows':[],'epoch':N,'response_parent':None,'parent_label':'','pending':None}
check('normal scope', solve('scope', normal), 'country-b')
check('boundary scope', solve('scope', boundary), None)
check('normal child', solve('child', normal), None)
check('boundary child', solve('child', boundary), None)
check('normal rows', solve('rows', normal), [])
check('boundary rows', solve('rows', boundary), [])
check('normal parent-difference', solve('parent-difference', normal), True)
check('boundary parent-difference', solve('parent-difference', boundary), False)
check('normal draft', solve('draft', normal), 'san')
check('boundary draft', solve('draft', boundary), '')
check('normal enabled', solve('enabled', normal), True)
check('boundary enabled', solve('enabled', boundary), False)
check('normal response', solve('response', normal), False)
check('boundary response', solve('response', boundary), True)
check('normal pending', solve('pending', normal), None)
check('boundary pending', solve('pending', boundary), None)
check('normal membership', solve('membership', normal), False)
check('boundary membership', solve('membership', boundary), True)
check('normal descriptor', solve('descriptor', normal), ['country-b','san',N])
check('boundary descriptor', solve('descriptor', boundary), [None,'',N])
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('draft', variant), '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 scopecountry-bcountry-bPassed
boundary scopeNoneNonePassed
normal childNoneNonePassed
boundary childNoneNonePassed
normal rows[][]Passed
boundary rows[][]Passed
normal parent-differenceTrueTruePassed
boundary parent-differenceFalseFalsePassed
normal draftsansanPassed
boundary draftPassed
normal enabledTrueTruePassed
boundary enabledFalseFalsePassed
normal responseFalseFalsePassed
boundary responseTrueTruePassed
normal pendingNoneNonePassed
boundary pendingNoneNonePassed
normal membershipFalseFalsePassed
boundary membershipTrueTruePassed
normal descriptor['country-b', 'san', 1]['country-b', 'san', 1]Passed
boundary descriptor[None, '', 1][None, '', 1]Passed
variant query or selection payloadqqPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 49160f4aaa837a98a771ebd1f5682e6a8bd23f5be7f9d795500256439857d83a

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

Case digest / b3a0006b91c4a9a354de208a791cdc1583180e20560661dc768f9a8ac55fe1b5