FA-22231 / Autocomplete interactions / Open access
Inline completion preview: typing over a preview retains its superseded suffix · case 01
The edit completion transition produces an incorrect observable state.
ROOT CAUSE
At inline-preview/edit, the implementation evaluates `{'ghost':d['suffix'],'preview_epoch':None}` instead of preserving the specified completion transition.
THE FAILURE
At inline-preview/edit, the implementation evaluates `{'ghost':d['suffix'],'preview_epoch':None}` instead of preserving the specified completion transition.
Unsuccessful approach: The attempted repair uses `{'ghost':'','preview_epoch':d['preview_epoch']}`, which still violates a normal or boundary completion fixture.
Case contract
An inline ghost suffix is presentation only: it must not alter submitted draft or committed identifier. Prefix-compatible candidates yield only their remaining suffix; preview acceptance materializes the candidate and rejection keeps the draft. A noncollapsed caret selection suppresses ghost text.
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 == 'suffix': return d['candidate'][len(d['draft']):] if d['candidate'].startswith(d['draft']) else ''
if event == 'submit': return d['draft']
if event == 'value': return d['value']
if event == 'selected': return d['start']==d['end']
if event == 'fresh': return d['preview_epoch']==d['epoch']
if event == 'accept': return d['candidate'] if d['matching'] else d['draft']
if event == 'reject': return {'draft':d['draft'],'ghost':''}
if event == 'visible-end': return [len(d['draft']),len(d['draft'])+len(d['suffix'])]
if event == 'edit': return {'ghost':d['suffix'],'preview_epoch':None}
if event == 'copy': return d['draft'][d['start']:d['end']]
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'pea','candidate':'pear','value':'p1','start':3,'end':3,'epoch':N,'preview_epoch':N-1,'matching':True,'suffix':'r'}
boundary = {'draft':'x','candidate':'pear','value':None,'start':0,'end':1,'epoch':N,'preview_epoch':N,'matching':False,'suffix':''}
check('normal suffix', solve('suffix', normal), 'r')
check('boundary suffix', solve('suffix', boundary), '')
check('normal submit', solve('submit', normal), 'pea')
check('boundary submit', solve('submit', boundary), 'x')
check('normal value', solve('value', normal), 'p1')
check('boundary value', solve('value', boundary), None)
check('normal selected', solve('selected', normal), True)
check('boundary selected', solve('selected', boundary), False)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal accept', solve('accept', normal), 'pear')
check('boundary accept', solve('accept', boundary), 'x')
check('normal reject', solve('reject', normal), {'draft':'pea','ghost':''})
check('boundary reject', solve('reject', boundary), {'draft':'x','ghost':''})
check('normal visible-end', solve('visible-end', normal), [3,4])
check('boundary visible-end', solve('visible-end', boundary), [1,1])
check('normal edit', solve('edit', normal), {'ghost':'','preview_epoch':None})
check('boundary edit', solve('edit', boundary), {'ghost':'','preview_epoch':None})
check('normal copy', solve('copy', normal), '')
check('boundary copy', solve('copy', boundary), 'x')
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('submit', 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 suffix | r | r | Passed |
| boundary suffix | | | Passed |
| normal submit | pea | pea | Passed |
| boundary submit | x | x | Passed |
| normal value | p1 | p1 | Passed |
| boundary value | None | None | Passed |
| normal selected | True | True | Passed |
| boundary selected | False | False | Passed |
| normal fresh | False | False | Passed |
| boundary fresh | True | True | Passed |
| normal accept | pear | pear | Passed |
| boundary accept | x | x | Passed |
| normal reject | {'draft': 'pea', 'ghost': ''} | {'draft': 'pea', 'ghost': ''} | Passed |
| boundary reject | {'draft': 'x', 'ghost': ''} | {'draft': 'x', 'ghost': ''} | Passed |
| normal visible-end | [3, 4] | [3, 4] | Passed |
| boundary visible-end | [1, 1] | [1, 1] | Passed |
| normal edit | {'ghost': 'r', 'preview_epoch': None} | {'ghost': '', 'preview_epoch': None} | Failed |
| boundary edit | {'ghost': '', 'preview_epoch': None} | {'ghost': '', 'preview_epoch': None} | Passed |
| normal copy | | | Passed |
| boundary copy | x | x | Passed |
| variant query or selection payload | q | q | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / 349cbaeb05524489b205546701ee9353190af5df1659008fb36b256b774a782e
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 == 'suffix': return d['candidate'][len(d['draft']):] if d['candidate'].startswith(d['draft']) else ''
if event == 'submit': return d['draft']
if event == 'value': return d['value']
if event == 'selected': return d['start']==d['end']
if event == 'fresh': return d['preview_epoch']==d['epoch']
if event == 'accept': return d['candidate'] if d['matching'] else d['draft']
if event == 'reject': return {'draft':d['draft'],'ghost':''}
if event == 'visible-end': return [len(d['draft']),len(d['draft'])+len(d['suffix'])]
if event == 'edit': return {'ghost':'','preview_epoch':d['preview_epoch']}
if event == 'copy': return d['draft'][d['start']:d['end']]
return {'unchanged': True}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'pea','candidate':'pear','value':'p1','start':3,'end':3,'epoch':N,'preview_epoch':N-1,'matching':True,'suffix':'r'}
boundary = {'draft':'x','candidate':'pear','value':None,'start':0,'end':1,'epoch':N,'preview_epoch':N,'matching':False,'suffix':''}
check('normal suffix', solve('suffix', normal), 'r')
check('boundary suffix', solve('suffix', boundary), '')
check('normal submit', solve('submit', normal), 'pea')
check('boundary submit', solve('submit', boundary), 'x')
check('normal value', solve('value', normal), 'p1')
check('boundary value', solve('value', boundary), None)
check('normal selected', solve('selected', normal), True)
check('boundary selected', solve('selected', boundary), False)
check('normal fresh', solve('fresh', normal), False)
check('boundary fresh', solve('fresh', boundary), True)
check('normal accept', solve('accept', normal), 'pear')
check('boundary accept', solve('accept', boundary), 'x')
check('normal reject', solve('reject', normal), {'draft':'pea','ghost':''})
check('boundary reject', solve('reject', boundary), {'draft':'x','ghost':''})
check('normal visible-end', solve('visible-end', normal), [3,4])
check('boundary visible-end', solve('visible-end', boundary), [1,1])
check('normal edit', solve('edit', normal), {'ghost':'','preview_epoch':None})
check('boundary edit', solve('edit', boundary), {'ghost':'','preview_epoch':None})
check('normal copy', solve('copy', normal), '')
check('boundary copy', solve('copy', boundary), 'x')
variant = dict(normal, **{'draft':'q'*N})
check('variant query or selection payload', solve('submit', 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 suffix | r | r | Passed |
| boundary suffix | | | Passed |
| normal submit | pea | pea | Passed |
| boundary submit | x | x | Passed |
| normal value | p1 | p1 | Passed |
| boundary value | None | None | Passed |
| normal selected | True | True | Passed |
| boundary selected | False | False | Passed |
| normal fresh | False | False | Passed |
| boundary fresh | True | True | Passed |
| normal accept | pear | pear | Passed |
| boundary accept | x | x | Passed |
| normal reject | {'draft': 'pea', 'ghost': ''} | {'draft': 'pea', 'ghost': ''} | Passed |
| boundary reject | {'draft': 'x', 'ghost': ''} | {'draft': 'x', 'ghost': ''} | Passed |
| normal visible-end | [3, 4] | [3, 4] | Passed |
| boundary visible-end | [1, 1] | [1, 1] | Passed |
| normal edit | {'ghost': '', 'preview_epoch': 0} | {'ghost': '', 'preview_epoch': None} | Failed |
| boundary edit | {'ghost': '', 'preview_epoch': 1} | {'ghost': '', 'preview_epoch': None} | Failed |
| normal copy | | | Passed |
| boundary copy | x | x | Passed |
| variant query or selection payload | q | q | Passed |
| unknown completion event | {'unchanged': True} | {'unchanged': True} | Passed |
SHA-256 / e204603e7a312d571842a2aa227f6ca2299c79b9045b8b6b391a7f22eb359dee
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:36.533328+00:00.
Case digest / d36c965d7bcd3a9ad0ed9abbed2170bab8b02defd6695c438751f580584da6bb