FA-23016 / Autocomplete interactions / Open access
Hierarchical path autocomplete: accepting a directory closes further path completion · case 01
The continue completion transition produces an incorrect observable state.
ROOT CAUSE
At path-completion/continue, the implementation evaluates `False` instead of preserving the specified completion transition.
VERIFIED REPAIR
Implement the continue contract using `d['directory']`.
Unsuccessful approach: The attempted repair uses `True`, which still violates a normal or boundary completion fixture.
Case contract
Path autocomplete treats the prefix before the last slash as lookup scope and replaces only the final segment. Directory acceptance appends a slash and keeps completion active; leaf acceptance commits. Empty final segments request children, and responses bind to the exact parent path.
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 == 'lookup-parent': return d['parent']
if event == 'lookup-query': return d['segment']
if event == 'replace': return d['parent']+d['name']
if event == 'directory-suffix': return d['name']+('/' if d['directory'] else '')
if event == 'commit': return None if d['directory'] else d['parent']+d['name']
if event == 'continue': return False
if event == 'response-parent': return d['response_parent']==d['parent']
if event == 'empty-segment': return d['parent'] if not d['segment'] else None
if event == 'next-scope': return d['parent']+d['name']+'/' if d['directory'] else None
if event == 'leaf-continuation': return {'leaf':not d['directory'],'continue_at':d['parent']+d['name']+'/' if d['directory'] else None}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'path':'docs/api/rea','parent':'docs/api/','segment':'rea','name':'readme','directory':False,'response_parent':'docs/','epoch':N,'selected':'old','separator':'/'}
boundary = {'path':'docs/','parent':'docs/','segment':'','name':'guide','directory':True,'response_parent':'docs/','epoch':N,'selected':None,'separator':'/'}
check('normal lookup-parent', solve('lookup-parent', normal), 'docs/api/')
check('boundary lookup-parent', solve('lookup-parent', boundary), 'docs/')
check('normal lookup-query', solve('lookup-query', normal), 'rea')
check('boundary lookup-query', solve('lookup-query', boundary), '')
check('normal replace', solve('replace', normal), 'docs/api/readme')
check('boundary replace', solve('replace', boundary), 'docs/guide')
check('normal directory-suffix', solve('directory-suffix', normal), 'readme')
check('boundary directory-suffix', solve('directory-suffix', boundary), 'guide/')
check('normal commit', solve('commit', normal), 'docs/api/readme')
check('boundary commit', solve('commit', boundary), None)
check('normal continue', solve('continue', normal), False)
check('boundary continue', solve('continue', boundary), True)
check('normal response-parent', solve('response-parent', normal), False)
check('boundary response-parent', solve('response-parent', boundary), True)
check('normal empty-segment', solve('empty-segment', normal), None)
check('boundary empty-segment', solve('empty-segment', boundary), 'docs/')
check('normal next-scope', solve('next-scope', normal), None)
check('boundary next-scope', solve('next-scope', boundary), 'docs/guide/')
check('normal leaf-continuation', solve('leaf-continuation', normal), {'leaf':True,'continue_at':None})
check('boundary leaf-continuation', solve('leaf-continuation', boundary), {'leaf':False,'continue_at':'docs/guide/'})
variant = dict(normal, **{'segment':'r'*N})
check('variant query or selection payload', solve('lookup-query', variant), 'r'*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 lookup-parent | docs/api/ | docs/api/ | Passed |
| boundary lookup-parent | docs/ | docs/ | Passed |
| normal lookup-query | rea | rea | Passed |
| boundary lookup-query | | | Passed |
| normal replace | docs/api/readme | docs/api/readme | Passed |
| boundary replace | docs/guide | docs/guide | Passed |
| normal directory-suffix | readme | readme | Passed |
| boundary directory-suffix | guide/ | guide/ | Passed |
| normal commit | docs/api/readme | docs/api/readme | Passed |
| boundary commit | None | None | Passed |
| normal continue | False | False | Passed |
| boundary continue | False | True | Failed |
| normal response-parent | False | False | Passed |
| boundary response-parent | True | True | Passed |
| normal empty-segment | None | None | Passed |
| boundary empty-segment | docs/ | docs/ | Passed |
| normal next-scope | None | None | Passed |
| boundary next-scope | docs/guide/ | docs/guide/ | Passed |
| normal leaf-continuation | {'continue_at': None, 'leaf': True} | {'continue_at': None, 'leaf': True} | Passed |
| boundary leaf-continuation | {'continue_at': 'docs/guide/', 'leaf': False} | {'continue_at': 'docs/guide/', 'leaf': False} | Passed |
| variant query or selection payload | r | r | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 58931ec7bd627e977ed55084da56b917152fe9cde70ddb3bdf1a59c9fe98923d
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 == 'lookup-parent': return d['parent']
if event == 'lookup-query': return d['segment']
if event == 'replace': return d['parent']+d['name']
if event == 'directory-suffix': return d['name']+('/' if d['directory'] else '')
if event == 'commit': return None if d['directory'] else d['parent']+d['name']
if event == 'continue': return True
if event == 'response-parent': return d['response_parent']==d['parent']
if event == 'empty-segment': return d['parent'] if not d['segment'] else None
if event == 'next-scope': return d['parent']+d['name']+'/' if d['directory'] else None
if event == 'leaf-continuation': return {'leaf':not d['directory'],'continue_at':d['parent']+d['name']+'/' if d['directory'] else None}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'path':'docs/api/rea','parent':'docs/api/','segment':'rea','name':'readme','directory':False,'response_parent':'docs/','epoch':N,'selected':'old','separator':'/'}
boundary = {'path':'docs/','parent':'docs/','segment':'','name':'guide','directory':True,'response_parent':'docs/','epoch':N,'selected':None,'separator':'/'}
check('normal lookup-parent', solve('lookup-parent', normal), 'docs/api/')
check('boundary lookup-parent', solve('lookup-parent', boundary), 'docs/')
check('normal lookup-query', solve('lookup-query', normal), 'rea')
check('boundary lookup-query', solve('lookup-query', boundary), '')
check('normal replace', solve('replace', normal), 'docs/api/readme')
check('boundary replace', solve('replace', boundary), 'docs/guide')
check('normal directory-suffix', solve('directory-suffix', normal), 'readme')
check('boundary directory-suffix', solve('directory-suffix', boundary), 'guide/')
check('normal commit', solve('commit', normal), 'docs/api/readme')
check('boundary commit', solve('commit', boundary), None)
check('normal continue', solve('continue', normal), False)
check('boundary continue', solve('continue', boundary), True)
check('normal response-parent', solve('response-parent', normal), False)
check('boundary response-parent', solve('response-parent', boundary), True)
check('normal empty-segment', solve('empty-segment', normal), None)
check('boundary empty-segment', solve('empty-segment', boundary), 'docs/')
check('normal next-scope', solve('next-scope', normal), None)
check('boundary next-scope', solve('next-scope', boundary), 'docs/guide/')
check('normal leaf-continuation', solve('leaf-continuation', normal), {'leaf':True,'continue_at':None})
check('boundary leaf-continuation', solve('leaf-continuation', boundary), {'leaf':False,'continue_at':'docs/guide/'})
variant = dict(normal, **{'segment':'r'*N})
check('variant query or selection payload', solve('lookup-query', variant), 'r'*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 lookup-parent | docs/api/ | docs/api/ | Passed |
| boundary lookup-parent | docs/ | docs/ | Passed |
| normal lookup-query | rea | rea | Passed |
| boundary lookup-query | | | Passed |
| normal replace | docs/api/readme | docs/api/readme | Passed |
| boundary replace | docs/guide | docs/guide | Passed |
| normal directory-suffix | readme | readme | Passed |
| boundary directory-suffix | guide/ | guide/ | Passed |
| normal commit | docs/api/readme | docs/api/readme | Passed |
| boundary commit | None | None | Passed |
| normal continue | True | False | Failed |
| boundary continue | True | True | Passed |
| normal response-parent | False | False | Passed |
| boundary response-parent | True | True | Passed |
| normal empty-segment | None | None | Passed |
| boundary empty-segment | docs/ | docs/ | Passed |
| normal next-scope | None | None | Passed |
| boundary next-scope | docs/guide/ | docs/guide/ | Passed |
| normal leaf-continuation | {'continue_at': None, 'leaf': True} | {'continue_at': None, 'leaf': True} | Passed |
| boundary leaf-continuation | {'continue_at': 'docs/guide/', 'leaf': False} | {'continue_at': 'docs/guide/', 'leaf': False} | Passed |
| variant query or selection payload | r | r | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 1365fa42ea7fd0e6a9de21e46289aabddacf3e723a5b2a0b6cd2424e547a5c1f
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 == 'lookup-parent': return d['parent']
if event == 'lookup-query': return d['segment']
if event == 'replace': return d['parent']+d['name']
if event == 'directory-suffix': return d['name']+('/' if d['directory'] else '')
if event == 'commit': return None if d['directory'] else d['parent']+d['name']
if event == 'continue': return d['directory']
if event == 'response-parent': return d['response_parent']==d['parent']
if event == 'empty-segment': return d['parent'] if not d['segment'] else None
if event == 'next-scope': return d['parent']+d['name']+'/' if d['directory'] else None
if event == 'leaf-continuation': return {'leaf':not d['directory'],'continue_at':d['parent']+d['name']+'/' if d['directory'] else None}
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'path':'docs/api/rea','parent':'docs/api/','segment':'rea','name':'readme','directory':False,'response_parent':'docs/','epoch':N,'selected':'old','separator':'/'}
boundary = {'path':'docs/','parent':'docs/','segment':'','name':'guide','directory':True,'response_parent':'docs/','epoch':N,'selected':None,'separator':'/'}
check('normal lookup-parent', solve('lookup-parent', normal), 'docs/api/')
check('boundary lookup-parent', solve('lookup-parent', boundary), 'docs/')
check('normal lookup-query', solve('lookup-query', normal), 'rea')
check('boundary lookup-query', solve('lookup-query', boundary), '')
check('normal replace', solve('replace', normal), 'docs/api/readme')
check('boundary replace', solve('replace', boundary), 'docs/guide')
check('normal directory-suffix', solve('directory-suffix', normal), 'readme')
check('boundary directory-suffix', solve('directory-suffix', boundary), 'guide/')
check('normal commit', solve('commit', normal), 'docs/api/readme')
check('boundary commit', solve('commit', boundary), None)
check('normal continue', solve('continue', normal), False)
check('boundary continue', solve('continue', boundary), True)
check('normal response-parent', solve('response-parent', normal), False)
check('boundary response-parent', solve('response-parent', boundary), True)
check('normal empty-segment', solve('empty-segment', normal), None)
check('boundary empty-segment', solve('empty-segment', boundary), 'docs/')
check('normal next-scope', solve('next-scope', normal), None)
check('boundary next-scope', solve('next-scope', boundary), 'docs/guide/')
check('normal leaf-continuation', solve('leaf-continuation', normal), {'leaf':True,'continue_at':None})
check('boundary leaf-continuation', solve('leaf-continuation', boundary), {'leaf':False,'continue_at':'docs/guide/'})
variant = dict(normal, **{'segment':'r'*N})
check('variant query or selection payload', solve('lookup-query', variant), 'r'*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 lookup-parent | docs/api/ | docs/api/ | Passed |
| boundary lookup-parent | docs/ | docs/ | Passed |
| normal lookup-query | rea | rea | Passed |
| boundary lookup-query | | | Passed |
| normal replace | docs/api/readme | docs/api/readme | Passed |
| boundary replace | docs/guide | docs/guide | Passed |
| normal directory-suffix | readme | readme | Passed |
| boundary directory-suffix | guide/ | guide/ | Passed |
| normal commit | docs/api/readme | docs/api/readme | Passed |
| boundary commit | None | None | Passed |
| normal continue | False | False | Passed |
| boundary continue | True | True | Passed |
| normal response-parent | False | False | Passed |
| boundary response-parent | True | True | Passed |
| normal empty-segment | None | None | Passed |
| boundary empty-segment | docs/ | docs/ | Passed |
| normal next-scope | None | None | Passed |
| boundary next-scope | docs/guide/ | docs/guide/ | Passed |
| normal leaf-continuation | {'continue_at': None, 'leaf': True} | {'continue_at': None, 'leaf': True} | Passed |
| boundary leaf-continuation | {'continue_at': 'docs/guide/', 'leaf': False} | {'continue_at': 'docs/guide/', 'leaf': False} | Passed |
| variant query or selection payload | r | r | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / a643b9eb888439b7f1f35913198db786bcee771d5f28e164ef93229db35d60fe
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:43.777525+00:00.
Case digest / a2aabf41908ce1772dd88470be93748957a1694339974cd8e9bd23978df17c7e