FAILURE MAP
← Case archive

FA-22246 / Autocomplete interactions / Open access

Free-text option creation: create row duplicates an existing case-insensitive label · case 01

The exact completion transition produces an incorrect observable state.

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

ROOT CAUSE

At create-option/exact, the implementation evaluates `d['draft'] in d['labels']` instead of preserving the specified completion transition.

THE FAILURE

At create-option/exact, the implementation evaluates `d['draft'] in d['labels']` instead of preserving the specified completion transition.

Unsuccessful approach: The attempted repair uses `d['draft'].strip() in d['labels']`, which still violates a normal or boundary completion fixture.

Case contract

This picker may create a new option from trimmed draft only when creation is enabled, the draft is nonempty, no case-insensitive exact label exists, and no create transaction is pending. Synthetic create rows carry a distinct namespace and raw text is never mistaken for a persisted identifier.

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 == 'trim': return d['draft'].strip()
    if event == 'exact': return d['draft'] in d['labels']
    if event == 'nonempty': return bool(d['draft'].strip())
    if event == 'permission': return d['allow']
    if event == 'busy': return not d['pending']
    if event == 'row-id': return 'create:'+d['draft'].strip()
    if event == 'resolve': return d['persisted']
    if event == 'failure': return {'draft':d['draft'],'error':d['error'],'pending':False}
    if event == 'pending-value': return None if d['pending'] else d['persisted']
    if event == 'retry': return {'text':d['draft'].strip(),'query_epoch':d['query_epoch']+1}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  Plum  ','labels':['Pear','plum'],'allow':True,'pending':True,'temporary':'tmp:'+str(N),'persisted':'p'+str(N),'error':'rejected','query_epoch':N}
boundary = {'draft':'   ','labels':[],'allow':False,'pending':False,'temporary':'tmp:'+str(N),'persisted':'','error':None,'query_epoch':N}
check('normal trim', solve('trim', normal), 'Plum')
check('boundary trim', solve('trim', boundary), '')
check('normal exact', solve('exact', normal), True)
check('boundary exact', solve('exact', boundary), False)
check('normal nonempty', solve('nonempty', normal), True)
check('boundary nonempty', solve('nonempty', boundary), False)
check('normal permission', solve('permission', normal), True)
check('boundary permission', solve('permission', boundary), False)
check('normal busy', solve('busy', normal), False)
check('boundary busy', solve('busy', boundary), True)
check('normal row-id', solve('row-id', normal), 'create:Plum')
check('boundary row-id', solve('row-id', boundary), 'create:')
check('normal resolve', solve('resolve', normal), 'p'+str(N))
check('boundary resolve', solve('resolve', boundary), '')
check('normal failure', solve('failure', normal), {'draft':'  Plum  ','error':'rejected','pending':False})
check('boundary failure', solve('failure', boundary), {'draft':'   ','error':None,'pending':False})
check('normal pending-value', solve('pending-value', normal), None)
check('boundary pending-value', solve('pending-value', boundary), '')
check('normal retry', solve('retry', normal), {'text':'Plum','query_epoch':N+1})
check('boundary retry', solve('retry', boundary), {'text':'','query_epoch':N+1})
variant = dict(normal, **{'draft':' '*N+'Plum'+' '*N})
check('variant query or selection payload', solve('trim', variant), 'Plum')
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 trimPlumPlumPassed
boundary trimPassed
normal exactFalseTrueFailed
boundary exactFalseFalsePassed
normal nonemptyTrueTruePassed
boundary nonemptyFalseFalsePassed
normal permissionTrueTruePassed
boundary permissionFalseFalsePassed
normal busyFalseFalsePassed
boundary busyTrueTruePassed
normal row-idcreate:Plumcreate:PlumPassed
boundary row-idcreate:create:Passed
normal resolvep1p1Passed
boundary resolvePassed
normal failure{'draft': ' Plum ', 'error': 'rejected', 'pending': False}{'draft': ' Plum ', 'error': 'rejected', 'pending': False}Passed
boundary failure{'draft': ' ', 'error': None, 'pending': False}{'draft': ' ', 'error': None, 'pending': False}Passed
normal pending-valueNoneNonePassed
boundary pending-valuePassed
normal retry{'query_epoch': 2, 'text': 'Plum'}{'query_epoch': 2, 'text': 'Plum'}Passed
boundary retry{'query_epoch': 2, 'text': ''}{'query_epoch': 2, 'text': ''}Passed
variant query or selection payloadPlumPlumPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / a9d47e8c1e27dec84b9b4343c6c25ac41ebe466a9089f3a7c84e5dba9042d7c8

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 == 'trim': return d['draft'].strip()
    if event == 'exact': return d['draft'].strip() in d['labels']
    if event == 'nonempty': return bool(d['draft'].strip())
    if event == 'permission': return d['allow']
    if event == 'busy': return not d['pending']
    if event == 'row-id': return 'create:'+d['draft'].strip()
    if event == 'resolve': return d['persisted']
    if event == 'failure': return {'draft':d['draft'],'error':d['error'],'pending':False}
    if event == 'pending-value': return None if d['pending'] else d['persisted']
    if event == 'retry': return {'text':d['draft'].strip(),'query_epoch':d['query_epoch']+1}
    return {'unchanged': True}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
normal = {'draft':'  Plum  ','labels':['Pear','plum'],'allow':True,'pending':True,'temporary':'tmp:'+str(N),'persisted':'p'+str(N),'error':'rejected','query_epoch':N}
boundary = {'draft':'   ','labels':[],'allow':False,'pending':False,'temporary':'tmp:'+str(N),'persisted':'','error':None,'query_epoch':N}
check('normal trim', solve('trim', normal), 'Plum')
check('boundary trim', solve('trim', boundary), '')
check('normal exact', solve('exact', normal), True)
check('boundary exact', solve('exact', boundary), False)
check('normal nonempty', solve('nonempty', normal), True)
check('boundary nonempty', solve('nonempty', boundary), False)
check('normal permission', solve('permission', normal), True)
check('boundary permission', solve('permission', boundary), False)
check('normal busy', solve('busy', normal), False)
check('boundary busy', solve('busy', boundary), True)
check('normal row-id', solve('row-id', normal), 'create:Plum')
check('boundary row-id', solve('row-id', boundary), 'create:')
check('normal resolve', solve('resolve', normal), 'p'+str(N))
check('boundary resolve', solve('resolve', boundary), '')
check('normal failure', solve('failure', normal), {'draft':'  Plum  ','error':'rejected','pending':False})
check('boundary failure', solve('failure', boundary), {'draft':'   ','error':None,'pending':False})
check('normal pending-value', solve('pending-value', normal), None)
check('boundary pending-value', solve('pending-value', boundary), '')
check('normal retry', solve('retry', normal), {'text':'Plum','query_epoch':N+1})
check('boundary retry', solve('retry', boundary), {'text':'','query_epoch':N+1})
variant = dict(normal, **{'draft':' '*N+'Plum'+' '*N})
check('variant query or selection payload', solve('trim', variant), 'Plum')
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 trimPlumPlumPassed
boundary trimPassed
normal exactFalseTrueFailed
boundary exactFalseFalsePassed
normal nonemptyTrueTruePassed
boundary nonemptyFalseFalsePassed
normal permissionTrueTruePassed
boundary permissionFalseFalsePassed
normal busyFalseFalsePassed
boundary busyTrueTruePassed
normal row-idcreate:Plumcreate:PlumPassed
boundary row-idcreate:create:Passed
normal resolvep1p1Passed
boundary resolvePassed
normal failure{'draft': ' Plum ', 'error': 'rejected', 'pending': False}{'draft': ' Plum ', 'error': 'rejected', 'pending': False}Passed
boundary failure{'draft': ' ', 'error': None, 'pending': False}{'draft': ' ', 'error': None, 'pending': False}Passed
normal pending-valueNoneNonePassed
boundary pending-valuePassed
normal retry{'query_epoch': 2, 'text': 'Plum'}{'query_epoch': 2, 'text': 'Plum'}Passed
boundary retry{'query_epoch': 2, 'text': ''}{'query_epoch': 2, 'text': ''}Passed
variant query or selection payloadPlumPlumPassed
unknown completion event{'unchanged': True}{'unchanged': True}Passed

SHA-256 / d09d6764029ad12217c507a5486a345c9fae8a2efa2e4d47c5cbacd096700673

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.972081+00:00.

Case digest / a942d0c6d5fdfe19866a81f1eb82af6fd58fc808848649eb40d3119b73a03e54