FA-22121 / Autocomplete interactions / Open access
Multi-value autocomplete tokens: zero-capacity picker still permits one selection · case 01
The at-limit completion transition produces an incorrect observable state.
ROOT CAUSE
At multiple-values/at-limit, the implementation evaluates `len(d['selected'])>d['limit']` instead of preserving the specified completion transition.
THE FAILURE
At multiple-values/at-limit, the implementation evaluates `len(d['selected'])>d['limit']` instead of preserving the specified completion transition.
Unsuccessful approach: The attempted repair uses `bool(d['selected']) and len(d['selected'])>=d['limit']`, which still violates a normal or boundary completion fixture.
Case contract
Accepting a suggestion appends its identifier once, preserving selection order and independent duplicate labels. Removing a token removes that identity only. Already-selected results are excluded, pending query text is separate from selected values, and capacity is measured in committed identities.
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 == 'repeat': return d['selected'] if d['candidate'] in d['selected'] else d['selected']+[d['candidate']]
if event == 'append': return d['selected']+[d['new']]
if event == 'remove': return [x for x in d['selected'] if x!=d['remove']]
if event == 'filter': return [x for x in d['results'] if x not in d['selected']]
if event == 'labels': return list(zip(d['selected'],d['labels']))
if event == 'capacity': return max(0,d['limit']-len(d['selected']))
if event == 'at-limit': return len(d['selected'])>d['limit']
if event == 'submit': return d['selected']
if event == 'after-accept': return {'draft':'','epoch':d['epoch']+1}
if event == 'undo-remove': return [d['remove']]+[x for x in d['selected'] if x!=d['remove']] if d['remove'] in d['selected'] else d['selected']
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'selected':['a','b'],'labels':['Same','Same'],'candidate':'b','new':'c','remove':'a','results':['a','c','d'],'draft':'ca','limit':3,'epoch':N}
boundary = {'selected':[],'labels':[],'candidate':'','new':'','remove':'missing','results':[''],'draft':'','limit':0,'epoch':N}
check('normal repeat', solve('repeat', normal), ['a','b'])
check('boundary repeat', solve('repeat', boundary), [''])
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [''])
check('normal remove', solve('remove', normal), ['b'])
check('boundary remove', solve('remove', boundary), [])
check('normal filter', solve('filter', normal), ['c','d'])
check('boundary filter', solve('filter', boundary), [''])
check('normal labels', solve('labels', normal), [('a','Same'),('b','Same')])
check('boundary labels', solve('labels', boundary), [])
check('normal capacity', solve('capacity', normal), 1)
check('boundary capacity', solve('capacity', boundary), 0)
check('normal at-limit', solve('at-limit', normal), False)
check('boundary at-limit', solve('at-limit', boundary), True)
check('normal submit', solve('submit', normal), ['a','b'])
check('boundary submit', solve('submit', boundary), [])
check('normal after-accept', solve('after-accept', normal), {'draft':'','epoch':N+1})
check('boundary after-accept', solve('after-accept', boundary), {'draft':'','epoch':N+1})
check('normal undo-remove', solve('undo-remove', normal), ['a','b'])
check('boundary undo-remove', solve('undo-remove', boundary), [])
variant = dict(normal, **{'new':'id'+str(N)})
check('variant query or selection payload', solve('append', variant), ['a','b','id'+str(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 repeat | ['a', 'b'] | ['a', 'b'] | Passed |
| boundary repeat | [''] | [''] | Passed |
| normal append | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| boundary append | [''] | [''] | Passed |
| normal remove | ['b'] | ['b'] | Passed |
| boundary remove | [] | [] | Passed |
| normal filter | ['c', 'd'] | ['c', 'd'] | Passed |
| boundary filter | [''] | [''] | Passed |
| normal labels | [['a', 'Same'], ['b', 'Same']] | [['a', 'Same'], ['b', 'Same']] | Passed |
| boundary labels | [] | [] | Passed |
| normal capacity | 1 | 1 | Passed |
| boundary capacity | 0 | 0 | Passed |
| normal at-limit | False | False | Passed |
| boundary at-limit | False | True | Failed |
| normal submit | ['a', 'b'] | ['a', 'b'] | Passed |
| boundary submit | [] | [] | Passed |
| normal after-accept | {'draft': '', 'epoch': 2} | {'draft': '', 'epoch': 2} | Passed |
| boundary after-accept | {'draft': '', 'epoch': 2} | {'draft': '', 'epoch': 2} | Passed |
| normal undo-remove | ['a', 'b'] | ['a', 'b'] | Passed |
| boundary undo-remove | [] | [] | Passed |
| variant query or selection payload | ['a', 'b', 'id1'] | ['a', 'b', 'id1'] | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 735b26adc902021871dae2503897b1ee49276024cf3074acb319e3ded7cd3156
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 == 'repeat': return d['selected'] if d['candidate'] in d['selected'] else d['selected']+[d['candidate']]
if event == 'append': return d['selected']+[d['new']]
if event == 'remove': return [x for x in d['selected'] if x!=d['remove']]
if event == 'filter': return [x for x in d['results'] if x not in d['selected']]
if event == 'labels': return list(zip(d['selected'],d['labels']))
if event == 'capacity': return max(0,d['limit']-len(d['selected']))
if event == 'at-limit': return bool(d['selected']) and len(d['selected'])>=d['limit']
if event == 'submit': return d['selected']
if event == 'after-accept': return {'draft':'','epoch':d['epoch']+1}
if event == 'undo-remove': return [d['remove']]+[x for x in d['selected'] if x!=d['remove']] if d['remove'] in d['selected'] else d['selected']
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'selected':['a','b'],'labels':['Same','Same'],'candidate':'b','new':'c','remove':'a','results':['a','c','d'],'draft':'ca','limit':3,'epoch':N}
boundary = {'selected':[],'labels':[],'candidate':'','new':'','remove':'missing','results':[''],'draft':'','limit':0,'epoch':N}
check('normal repeat', solve('repeat', normal), ['a','b'])
check('boundary repeat', solve('repeat', boundary), [''])
check('normal append', solve('append', normal), ['a','b','c'])
check('boundary append', solve('append', boundary), [''])
check('normal remove', solve('remove', normal), ['b'])
check('boundary remove', solve('remove', boundary), [])
check('normal filter', solve('filter', normal), ['c','d'])
check('boundary filter', solve('filter', boundary), [''])
check('normal labels', solve('labels', normal), [('a','Same'),('b','Same')])
check('boundary labels', solve('labels', boundary), [])
check('normal capacity', solve('capacity', normal), 1)
check('boundary capacity', solve('capacity', boundary), 0)
check('normal at-limit', solve('at-limit', normal), False)
check('boundary at-limit', solve('at-limit', boundary), True)
check('normal submit', solve('submit', normal), ['a','b'])
check('boundary submit', solve('submit', boundary), [])
check('normal after-accept', solve('after-accept', normal), {'draft':'','epoch':N+1})
check('boundary after-accept', solve('after-accept', boundary), {'draft':'','epoch':N+1})
check('normal undo-remove', solve('undo-remove', normal), ['a','b'])
check('boundary undo-remove', solve('undo-remove', boundary), [])
variant = dict(normal, **{'new':'id'+str(N)})
check('variant query or selection payload', solve('append', variant), ['a','b','id'+str(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 repeat | ['a', 'b'] | ['a', 'b'] | Passed |
| boundary repeat | [''] | [''] | Passed |
| normal append | ['a', 'b', 'c'] | ['a', 'b', 'c'] | Passed |
| boundary append | [''] | [''] | Passed |
| normal remove | ['b'] | ['b'] | Passed |
| boundary remove | [] | [] | Passed |
| normal filter | ['c', 'd'] | ['c', 'd'] | Passed |
| boundary filter | [''] | [''] | Passed |
| normal labels | [['a', 'Same'], ['b', 'Same']] | [['a', 'Same'], ['b', 'Same']] | Passed |
| boundary labels | [] | [] | Passed |
| normal capacity | 1 | 1 | Passed |
| boundary capacity | 0 | 0 | Passed |
| normal at-limit | False | False | Passed |
| boundary at-limit | False | True | Failed |
| normal submit | ['a', 'b'] | ['a', 'b'] | Passed |
| boundary submit | [] | [] | Passed |
| normal after-accept | {'draft': '', 'epoch': 2} | {'draft': '', 'epoch': 2} | Passed |
| boundary after-accept | {'draft': '', 'epoch': 2} | {'draft': '', 'epoch': 2} | Passed |
| normal undo-remove | ['a', 'b'] | ['a', 'b'] | Passed |
| boundary undo-remove | [] | [] | Passed |
| variant query or selection payload | ['a', 'b', 'id1'] | ['a', 'b', 'id1'] | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 353fe9f43514c5879fc6282468f4d86ba0ecc0e1f58f691e142f47a8f66f110d
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 22 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:35.625999+00:00.
Case digest / 43ede9ee4bfc3982f3bdb1a7b55f57d22a17b26750942a0580f62f070326222e