FA-22511 / Autocomplete interactions / Open access
Paged autocomplete interaction: late page from the prior draft is appended · case 01
The page-epoch completion transition produces an incorrect observable state.
ROOT CAUSE
At result-pages/page-epoch, the implementation evaluates `d['page_epoch']<=d['epoch']` instead of preserving the specified completion transition.
VERIFIED REPAIR
Implement the page-epoch contract using `d['page_epoch']==d['epoch']`.
Unsuccessful approach: The attempted repair uses `False`, which still violates a normal or boundary completion fixture.
Case contract
Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.
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 == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
if event == 'first': return d['page']
if event == 'continuation': return d['cursor']
if event == 'has-more': return d['cursor'] is not None
if event == 'page-epoch': return d['page_epoch']<=d['epoch']
if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
if event == 'value': return d['value']
if event == 'draft': return d['draft']
if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
if event == 'footer': return len(d['rows'])
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
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 append | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| boundary append | [] | [] | Passed |
| normal first | ['b', 'c'] | ['b', 'c'] | Passed |
| boundary first | [] | [] | Passed |
| normal continuation | next-2 | next-2 | Passed |
| boundary continuation | None | None | Passed |
| normal has-more | True | True | Passed |
| boundary has-more | False | False | Passed |
| normal page-epoch | True | False | Failed |
| boundary page-epoch | True | True | Passed |
| normal active | 1 | 1 | Passed |
| boundary active | None | None | Passed |
| normal value | v | v | Passed |
| boundary value | None | None | Passed |
| normal draft | pe | pe | Passed |
| boundary draft | | | Passed |
| normal more-busy | False | False | Passed |
| boundary more-busy | False | False | Passed |
| normal footer | 2 | 2 | Passed |
| boundary footer | 0 | 0 | Passed |
| variant query or selection payload | q | q | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / cad5cd96a17aff1f7344561020c220765f54ff031d8cee7a79206e14a2da7af7
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 == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
if event == 'first': return d['page']
if event == 'continuation': return d['cursor']
if event == 'has-more': return d['cursor'] is not None
if event == 'page-epoch': return False
if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
if event == 'value': return d['value']
if event == 'draft': return d['draft']
if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
if event == 'footer': return len(d['rows'])
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
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 append | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| boundary append | [] | [] | Passed |
| normal first | ['b', 'c'] | ['b', 'c'] | Passed |
| boundary first | [] | [] | Passed |
| normal continuation | next-2 | next-2 | Passed |
| boundary continuation | None | None | Passed |
| normal has-more | True | True | Passed |
| boundary has-more | False | False | Passed |
| normal page-epoch | False | False | Passed |
| boundary page-epoch | False | True | Failed |
| normal active | 1 | 1 | Passed |
| boundary active | None | None | Passed |
| normal value | v | v | Passed |
| boundary value | None | None | Passed |
| normal draft | pe | pe | Passed |
| boundary draft | | | Passed |
| normal more-busy | False | False | Passed |
| boundary more-busy | False | False | Passed |
| normal footer | 2 | 2 | Passed |
| boundary footer | 0 | 0 | Passed |
| variant query or selection payload | q | q | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / c590480152bece5394f9936f2ae3b66380b73beabae7a8c078183f3daab5c28f
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 == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]
if event == 'first': return d['page']
if event == 'continuation': return d['cursor']
if event == 'has-more': return d['cursor'] is not None
if event == 'page-epoch': return d['page_epoch']==d['epoch']
if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None
if event == 'value': return d['value']
if event == 'draft': return d['draft']
if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None
if event == 'footer': return len(d['rows'])
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}
boundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [])
check('normal first', solve('first', normal), ['b','c'])
check('boundary first', solve('first', boundary), [])
check('normal continuation', solve('continuation', normal), 'next-2')
check('boundary continuation', solve('continuation', boundary), None)
check('normal has-more', solve('has-more', normal), True)
check('boundary has-more', solve('has-more', boundary), False)
check('normal page-epoch', solve('page-epoch', normal), False)
check('boundary page-epoch', solve('page-epoch', boundary), True)
check('normal active', solve('active', normal), 1)
check('boundary active', solve('active', boundary), None)
check('normal value', solve('value', normal), 'v')
check('boundary value', solve('value', boundary), None)
check('normal draft', solve('draft', normal), 'pe')
check('boundary draft', solve('draft', boundary), '')
check('normal more-busy', solve('more-busy', normal), False)
check('boundary more-busy', solve('more-busy', boundary), False)
check('normal footer', solve('footer', normal), 2)
check('boundary footer', solve('footer', boundary), 0)
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 append | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| boundary append | [] | [] | Passed |
| normal first | ['b', 'c'] | ['b', 'c'] | Passed |
| boundary first | [] | [] | Passed |
| normal continuation | next-2 | next-2 | Passed |
| boundary continuation | None | None | Passed |
| normal has-more | True | True | Passed |
| boundary has-more | False | False | Passed |
| normal page-epoch | False | False | Passed |
| boundary page-epoch | True | True | Passed |
| normal active | 1 | 1 | Passed |
| boundary active | None | None | Passed |
| normal value | v | v | Passed |
| boundary value | None | None | Passed |
| normal draft | pe | pe | Passed |
| boundary draft | | | Passed |
| normal more-busy | False | False | Passed |
| boundary more-busy | False | False | Passed |
| normal footer | 2 | 2 | Passed |
| boundary footer | 0 | 0 | Passed |
| variant query or selection payload | q | q | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 8fe905c771a5e817d648e731eaece2efb4173842582ed6813dc5acc0c940b03b
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:39.066050+00:00.
Case digest / 071d01840967eab97cc1c140a89323afa492ce059b64c4e23016cfb892d5afb9