FA-8151 / Autocomplete interactions / Open access
Combobox keyboard commit: Typing does not reveal available suggestions · case 01
Typing does not reveal available suggestions.
ROOT CAUSE
The input operation uses `if key == 'Input': return (value, query, opened)` where the contract requires `if key == 'Input': return (value, query, True)`.
VERIFIED REPAIR
Implement the input operation as `if key == 'Input': return (value, query, True)`.
Unsuccessful approach: Discarding the committed value before confirmation violates provisional editing.
Case contract
Escape discards query but preserves committed value; Enter commits only an existing active option in an open popup; Tab closes without commit; Clear resets both; typing opens suggestions.
Why this case matters
A deterministic model of combobox keyboard commit; this isolates one interface invariant without requiring a browser.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(options, active, value, query, opened, key):
if key == 'Escape': return (value, '', False)
if key == 'Enter' and opened and active in options: return (active, query, False)
if key == 'Tab': return (value, query, False)
if key == 'Clear': return (None, '', opened)
if key == 'Input': return (value, query, opened)
return (value, query, opened)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('escape', solve(['a','b'], 'b', 'a', 'b', True, 'Escape'), ('a', '', False))
check('closed enter', solve(['a','b'], 'b', 'a', 'b', False, 'Enter'), ('a', 'b', False))
check('removed active', solve(['a'], 'b', 'a', 'b', True, 'Enter'), ('a', 'b', True))
check('commit', solve(['a','b'], 'b', 'a', 'b', True, 'Enter'), ('b', 'b', False))
check('tab', solve(['a','b'], 'b', 'a', 'b', True, 'Tab'), ('a', 'b', False))
check('clear', solve(['a'], 'a', 'a', 'a', True, 'Clear'), (None, '', True))
check('typing', solve(['a'], 'a', 'a', 'b', False, 'Input'), ('a', 'b', True))
check('parameterized suggestion', solve(list(range(N+1)), N, 0, str(N), True, 'Enter'), (N,str(N),False))
for repetition in range(N):
check('repeat typing', solve(['a'], 'a', 'a', 'b', False, 'Input'), ('a', 'b', 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 |
|---|---|---|---|
| escape | ['a', '', False] | ['a', '', False] | Passed |
| closed enter | ['a', 'b', False] | ['a', 'b', False] | Passed |
| removed active | ['a', 'b', True] | ['a', 'b', True] | Passed |
| commit | ['b', 'b', False] | ['b', 'b', False] | Passed |
| tab | ['a', 'b', False] | ['a', 'b', False] | Passed |
| clear | [None, '', True] | [None, '', True] | Passed |
| typing | ['a', 'b', False] | ['a', 'b', True] | Failed |
| parameterized suggestion | [1, '1', False] | [1, '1', False] | Passed |
| repeat typing | ['a', 'b', False] | ['a', 'b', True] | Failed |
SHA-256 / 696d0782df4eb90592cbf05902c4178cfd622b8ea89ed222e8358de266e8949a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(options, active, value, query, opened, key):
if key == 'Escape': return (value, '', False)
if key == 'Enter' and opened and active in options: return (active, query, False)
if key == 'Tab': return (value, query, False)
if key == 'Clear': return (None, '', opened)
if key == 'Input': return (None, query, True)
return (value, query, opened)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('escape', solve(['a','b'], 'b', 'a', 'b', True, 'Escape'), ('a', '', False))
check('closed enter', solve(['a','b'], 'b', 'a', 'b', False, 'Enter'), ('a', 'b', False))
check('removed active', solve(['a'], 'b', 'a', 'b', True, 'Enter'), ('a', 'b', True))
check('commit', solve(['a','b'], 'b', 'a', 'b', True, 'Enter'), ('b', 'b', False))
check('tab', solve(['a','b'], 'b', 'a', 'b', True, 'Tab'), ('a', 'b', False))
check('clear', solve(['a'], 'a', 'a', 'a', True, 'Clear'), (None, '', True))
check('typing', solve(['a'], 'a', 'a', 'b', False, 'Input'), ('a', 'b', True))
check('parameterized suggestion', solve(list(range(N+1)), N, 0, str(N), True, 'Enter'), (N,str(N),False))
for repetition in range(N):
check('repeat typing', solve(['a'], 'a', 'a', 'b', False, 'Input'), ('a', 'b', 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 |
|---|---|---|---|
| escape | ['a', '', False] | ['a', '', False] | Passed |
| closed enter | ['a', 'b', False] | ['a', 'b', False] | Passed |
| removed active | ['a', 'b', True] | ['a', 'b', True] | Passed |
| commit | ['b', 'b', False] | ['b', 'b', False] | Passed |
| tab | ['a', 'b', False] | ['a', 'b', False] | Passed |
| clear | [None, '', True] | [None, '', True] | Passed |
| typing | [None, 'b', True] | ['a', 'b', True] | Failed |
| parameterized suggestion | [1, '1', False] | [1, '1', False] | Passed |
| repeat typing | [None, 'b', True] | ['a', 'b', True] | Failed |
SHA-256 / 5fc912e14170599b984148faa4b188f9c75cf2a2f7bf4495ffe16515062c1c82
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(options, active, value, query, opened, key):
if key == 'Escape': return (value, '', False)
if key == 'Enter' and opened and active in options: return (active, query, False)
if key == 'Tab': return (value, query, False)
if key == 'Clear': return (None, '', opened)
if key == 'Input': return (value, query, True)
return (value, query, opened)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('escape', solve(['a','b'], 'b', 'a', 'b', True, 'Escape'), ('a', '', False))
check('closed enter', solve(['a','b'], 'b', 'a', 'b', False, 'Enter'), ('a', 'b', False))
check('removed active', solve(['a'], 'b', 'a', 'b', True, 'Enter'), ('a', 'b', True))
check('commit', solve(['a','b'], 'b', 'a', 'b', True, 'Enter'), ('b', 'b', False))
check('tab', solve(['a','b'], 'b', 'a', 'b', True, 'Tab'), ('a', 'b', False))
check('clear', solve(['a'], 'a', 'a', 'a', True, 'Clear'), (None, '', True))
check('typing', solve(['a'], 'a', 'a', 'b', False, 'Input'), ('a', 'b', True))
check('parameterized suggestion', solve(list(range(N+1)), N, 0, str(N), True, 'Enter'), (N,str(N),False))
for repetition in range(N):
check('repeat typing', solve(['a'], 'a', 'a', 'b', False, 'Input'), ('a', 'b', 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 |
|---|---|---|---|
| escape | ['a', '', False] | ['a', '', False] | Passed |
| closed enter | ['a', 'b', False] | ['a', 'b', False] | Passed |
| removed active | ['a', 'b', True] | ['a', 'b', True] | Passed |
| commit | ['b', 'b', False] | ['b', 'b', False] | Passed |
| tab | ['a', 'b', False] | ['a', 'b', False] | Passed |
| clear | [None, '', True] | [None, '', True] | Passed |
| typing | ['a', 'b', True] | ['a', 'b', True] | Passed |
| parameterized suggestion | [1, '1', False] | [1, '1', False] | Passed |
| repeat typing | ['a', 'b', True] | ['a', 'b', True] | Passed |
SHA-256 / 27fd573a100cd9f334d842986b2fda43037577f50f135b310d544acb9f6e7cab
Verification & scope
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:38:18.925579+00:00.
Case digest / d6debd5c8a2ef38cbc50a049c12743960a0ce9f3c1e41ea66c8aa162c24c910d