FAILURE MAP
← Case archive

FA-22506 / Autocomplete interactions / Open access

Paged autocomplete interaction: end-of-results still displays the more-results affordance · case 01

The has-more completion transition produces an incorrect observable state.

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

ROOT CAUSE

At result-pages/has-more, the implementation evaluates `True` instead of preserving the specified completion transition.

VERIFIED REPAIR

Implement the has-more contract using `d['cursor'] is not None`.

Unsuccessful approach: The attempted repair uses `bool(d['rows']) or not d['page']`, 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 True
    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 fixtureActualExpectedOutcome
normal append['a', 'b', 'c']['a', 'b', 'c']Passed
boundary append[][]Passed
normal first['b', 'c']['b', 'c']Passed
boundary first[][]Passed
normal continuationnext-2next-2Passed
boundary continuationNoneNonePassed
normal has-moreTrueTruePassed
boundary has-moreTrueFalseFailed
normal page-epochFalseFalsePassed
boundary page-epochTrueTruePassed
normal active11Passed
boundary activeNoneNonePassed
normal valuevvPassed
boundary valueNoneNonePassed
normal draftpepePassed
boundary draftPassed
normal more-busyFalseFalsePassed
boundary more-busyFalseFalsePassed
normal footer22Passed
boundary footer00Passed
variant query or selection payloadqqPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / 71d7995556c1c683a2553da38be55b009c539b7c07d6556a6128257f6c04ace0

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 bool(d['rows']) or not d['page']
    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 fixtureActualExpectedOutcome
normal append['a', 'b', 'c']['a', 'b', 'c']Passed
boundary append[][]Passed
normal first['b', 'c']['b', 'c']Passed
boundary first[][]Passed
normal continuationnext-2next-2Passed
boundary continuationNoneNonePassed
normal has-moreTrueTruePassed
boundary has-moreTrueFalseFailed
normal page-epochFalseFalsePassed
boundary page-epochTrueTruePassed
normal active11Passed
boundary activeNoneNonePassed
normal valuevvPassed
boundary valueNoneNonePassed
normal draftpepePassed
boundary draftPassed
normal more-busyFalseFalsePassed
boundary more-busyFalseFalsePassed
normal footer22Passed
boundary footer00Passed
variant query or selection payloadqqPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / f908357d14bfb6b64f5ac0ee06e0f57775b237556ccd6d7d4d520c20fffe3de7

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 fixtureActualExpectedOutcome
normal append['a', 'b', 'c']['a', 'b', 'c']Passed
boundary append[][]Passed
normal first['b', 'c']['b', 'c']Passed
boundary first[][]Passed
normal continuationnext-2next-2Passed
boundary continuationNoneNonePassed
normal has-moreTrueTruePassed
boundary has-moreFalseFalsePassed
normal page-epochFalseFalsePassed
boundary page-epochTrueTruePassed
normal active11Passed
boundary activeNoneNonePassed
normal valuevvPassed
boundary valueNoneNonePassed
normal draftpepePassed
boundary draftPassed
normal more-busyFalseFalsePassed
boundary more-busyFalseFalsePassed
normal footer22Passed
boundary footer00Passed
variant query or selection payloadqqPassed
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:38.989754+00:00.

Case digest / 3846468517b1d37b1e8ad9b36561716b9fa05c979381c924b6b79d13dbc1bb6e