FA-22661 / Autocomplete interactions / Open access
Dependent autocomplete scope changes: parent change deletes the child prefix needed for the next scoped search · case 01
The draft completion transition produces an incorrect observable state.
ROOT CAUSE
At dependent-picker/draft, the implementation evaluates `''` instead of preserving the specified completion transition.
VERIFIED REPAIR
Implement the draft contract using `d['draft']`.
Unsuccessful approach: The attempted repair uses `d['child']`, 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 ''
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal scope | country-b | country-b | Passed |
| boundary scope | None | None | Passed |
| normal child | None | None | Passed |
| boundary child | None | None | Passed |
| normal rows | [] | [] | Passed |
| boundary rows | [] | [] | Passed |
| normal parent-difference | True | True | Passed |
| boundary parent-difference | False | False | Passed |
| normal draft | | san | Failed |
| boundary draft | | | Passed |
| normal enabled | True | True | Passed |
| boundary enabled | False | False | Passed |
| normal response | False | False | Passed |
| boundary response | True | True | Passed |
| normal pending | None | None | Passed |
| boundary pending | None | None | Passed |
| normal membership | False | False | Passed |
| boundary membership | True | True | Passed |
| normal descriptor | ['country-b', 'san', 1] | ['country-b', 'san', 1] | Passed |
| boundary descriptor | [None, '', 1] | [None, '', 1] | Passed |
| variant query or selection payload | | q | Failed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 6d891137e05bfb80ae1898aa89c5533361437849041165f280f067d016aee395
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['child']
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal scope | country-b | country-b | Passed |
| boundary scope | None | None | Passed |
| normal child | None | None | Passed |
| boundary child | None | None | Passed |
| normal rows | [] | [] | Passed |
| boundary rows | [] | [] | Passed |
| normal parent-difference | True | True | Passed |
| boundary parent-difference | False | False | Passed |
| normal draft | city-a | san | Failed |
| boundary draft | None | | Failed |
| normal enabled | True | True | Passed |
| boundary enabled | False | False | Passed |
| normal response | False | False | Passed |
| boundary response | True | True | Passed |
| normal pending | None | None | Passed |
| boundary pending | None | None | Passed |
| normal membership | False | False | Passed |
| boundary membership | True | True | Passed |
| normal descriptor | ['country-b', 'san', 1] | ['country-b', 'san', 1] | Passed |
| boundary descriptor | [None, '', 1] | [None, '', 1] | Passed |
| variant query or selection payload | city-a | q | Failed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / e07d7062921e8f817fbe0da862c6c7d214b0583f6a105bd70491cb3f2417128d
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal scope | country-b | country-b | Passed |
| boundary scope | None | None | Passed |
| normal child | None | None | Passed |
| boundary child | None | None | Passed |
| normal rows | [] | [] | Passed |
| boundary rows | [] | [] | Passed |
| normal parent-difference | True | True | Passed |
| boundary parent-difference | False | False | Passed |
| normal draft | san | san | Passed |
| boundary draft | | | Passed |
| normal enabled | True | True | Passed |
| boundary enabled | False | False | Passed |
| normal response | False | False | Passed |
| boundary response | True | True | Passed |
| normal pending | None | None | Passed |
| boundary pending | None | None | Passed |
| normal membership | False | False | Passed |
| boundary membership | True | True | Passed |
| normal descriptor | ['country-b', 'san', 1] | ['country-b', 'san', 1] | Passed |
| boundary descriptor | [None, '', 1] | [None, '', 1] | Passed |
| variant query or selection payload | q | q | Passed |
| 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.546637+00:00.
Case digest / b495d70b6d5093340669d35ab8cada01fc19526442526cfa7b890c55e70f4d8d