{"abstract":"The failure completion transition produces an incorrect observable state.","category":"Autocomplete interactions","checks":22,"contract":"A selected identifier may need asynchronous label resolution independently of query suggestions. Responses bind to selected identity and selection epoch. Until resolved the identity stays committed; failed resolution shows an explicit fallback and never inserts the identifier into the query. Empty labels are valid resolutions.","evaluation_group":"s3-autocomplete-label-resolution","failed_approach":"The attempted repair uses `d['label']`, which still violates a normal or boundary completion fixture.","family":"s3-autocomplete-interactions-label-resolution-failure","id":"FA-22866","implementations":{"attempt":{"sha256":"d8f9f08b4a95cd3851f632a0ae5330e863b59d1771d7cb62c3ce0eb0e55a7610","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, d):\n    if event == 'identity': return d['response_id']==d['value']\n    if event == 'epoch': return d['response_epoch']==d['epoch']\n    if event == 'value': return d['value']\n    if event == 'query': return d['query']\n    if event == 'empty-label': return d['label']\n    if event == 'failure': return d['label']\n    if event == 'pending': return d['pending'] and not d['resolved']\n    if event == 'request': return [d['value'],d['epoch']]\n    if event == 'clear-error': return None\n    if event == 'separate-rows': return []\n    return {'unchanged': True}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nnormal = {'value':'p1','response_id':'p0','label':'Pear','fallback':'Unknown choice','epoch':N,'response_epoch':N-1,'query':'pe','pending':True,'error':'missing','resolved':False}\nboundary = {'value':'','response_id':'','label':'','fallback':'Unknown choice','epoch':N,'response_epoch':N,'query':'','pending':False,'error':None,'resolved':True}\ncheck('normal identity', solve('identity', normal), False)\ncheck('boundary identity', solve('identity', boundary), True)\ncheck('normal epoch', solve('epoch', normal), False)\ncheck('boundary epoch', solve('epoch', boundary), True)\ncheck('normal value', solve('value', normal), 'p1')\ncheck('boundary value', solve('value', boundary), '')\ncheck('normal query', solve('query', normal), 'pe')\ncheck('boundary query', solve('query', boundary), '')\ncheck('normal empty-label', solve('empty-label', normal), 'Pear')\ncheck('boundary empty-label', solve('empty-label', boundary), '')\ncheck('normal failure', solve('failure', normal), 'Unknown choice')\ncheck('boundary failure', solve('failure', boundary), '')\ncheck('normal pending', solve('pending', normal), True)\ncheck('boundary pending', solve('pending', boundary), False)\ncheck('normal request', solve('request', normal), ['p1',N])\ncheck('boundary request', solve('request', boundary), ['',N])\ncheck('normal clear-error', solve('clear-error', normal), None)\ncheck('boundary clear-error', solve('clear-error', boundary), None)\ncheck('normal separate-rows', solve('separate-rows', normal), [])\ncheck('boundary separate-rows', solve('separate-rows', boundary), [])\nvariant = dict(normal, **{'value':'id'+str(N)})\ncheck('variant query or selection payload', solve('value', variant), 'id'+str(N))\ncheck('unknown completion event', solve('unrecognized', normal), {'unchanged': True})\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"63d87cf0c2ae9430cd84e3b85e9af29f9bdbe4e981ef91ac05e0edfb49d9f01a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, d):\n    if event == 'identity': return d['response_id']==d['value']\n    if event == 'epoch': return d['response_epoch']==d['epoch']\n    if event == 'value': return d['value']\n    if event == 'query': return d['query']\n    if event == 'empty-label': return d['label']\n    if event == 'failure': return d['value'] if d['error'] else d['label']\n    if event == 'pending': return d['pending'] and not d['resolved']\n    if event == 'request': return [d['value'],d['epoch']]\n    if event == 'clear-error': return None\n    if event == 'separate-rows': return []\n    return {'unchanged': True}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nnormal = {'value':'p1','response_id':'p0','label':'Pear','fallback':'Unknown choice','epoch':N,'response_epoch':N-1,'query':'pe','pending':True,'error':'missing','resolved':False}\nboundary = {'value':'','response_id':'','label':'','fallback':'Unknown choice','epoch':N,'response_epoch':N,'query':'','pending':False,'error':None,'resolved':True}\ncheck('normal identity', solve('identity', normal), False)\ncheck('boundary identity', solve('identity', boundary), True)\ncheck('normal epoch', solve('epoch', normal), False)\ncheck('boundary epoch', solve('epoch', boundary), True)\ncheck('normal value', solve('value', normal), 'p1')\ncheck('boundary value', solve('value', boundary), '')\ncheck('normal query', solve('query', normal), 'pe')\ncheck('boundary query', solve('query', boundary), '')\ncheck('normal empty-label', solve('empty-label', normal), 'Pear')\ncheck('boundary empty-label', solve('empty-label', boundary), '')\ncheck('normal failure', solve('failure', normal), 'Unknown choice')\ncheck('boundary failure', solve('failure', boundary), '')\ncheck('normal pending', solve('pending', normal), True)\ncheck('boundary pending', solve('pending', boundary), False)\ncheck('normal request', solve('request', normal), ['p1',N])\ncheck('boundary request', solve('request', boundary), ['',N])\ncheck('normal clear-error', solve('clear-error', normal), None)\ncheck('boundary clear-error', solve('clear-error', boundary), None)\ncheck('normal separate-rows', solve('separate-rows', normal), [])\ncheck('boundary separate-rows', solve('separate-rows', boundary), [])\nvariant = dict(normal, **{'value':'id'+str(N)})\ncheck('variant query or selection payload', solve('value', variant), 'id'+str(N))\ncheck('unknown completion event', solve('unrecognized', normal), {'unchanged': True})\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"498d50b66fe5dc7d26c810bc1544794a19a87c3cab1e83677215629b8735a36a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, d):\n    if event == 'identity': return d['response_id']==d['value']\n    if event == 'epoch': return d['response_epoch']==d['epoch']\n    if event == 'value': return d['value']\n    if event == 'query': return d['query']\n    if event == 'empty-label': return d['label']\n    if event == 'failure': return d['fallback'] if d['error'] else d['label']\n    if event == 'pending': return d['pending'] and not d['resolved']\n    if event == 'request': return [d['value'],d['epoch']]\n    if event == 'clear-error': return None\n    if event == 'separate-rows': return []\n    return {'unchanged': True}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nnormal = {'value':'p1','response_id':'p0','label':'Pear','fallback':'Unknown choice','epoch':N,'response_epoch':N-1,'query':'pe','pending':True,'error':'missing','resolved':False}\nboundary = {'value':'','response_id':'','label':'','fallback':'Unknown choice','epoch':N,'response_epoch':N,'query':'','pending':False,'error':None,'resolved':True}\ncheck('normal identity', solve('identity', normal), False)\ncheck('boundary identity', solve('identity', boundary), True)\ncheck('normal epoch', solve('epoch', normal), False)\ncheck('boundary epoch', solve('epoch', boundary), True)\ncheck('normal value', solve('value', normal), 'p1')\ncheck('boundary value', solve('value', boundary), '')\ncheck('normal query', solve('query', normal), 'pe')\ncheck('boundary query', solve('query', boundary), '')\ncheck('normal empty-label', solve('empty-label', normal), 'Pear')\ncheck('boundary empty-label', solve('empty-label', boundary), '')\ncheck('normal failure', solve('failure', normal), 'Unknown choice')\ncheck('boundary failure', solve('failure', boundary), '')\ncheck('normal pending', solve('pending', normal), True)\ncheck('boundary pending', solve('pending', boundary), False)\ncheck('normal request', solve('request', normal), ['p1',N])\ncheck('boundary request', solve('request', boundary), ['',N])\ncheck('normal clear-error', solve('clear-error', normal), None)\ncheck('boundary clear-error', solve('clear-error', boundary), None)\ncheck('normal separate-rows', solve('separate-rows', normal), [])\ncheck('boundary separate-rows', solve('separate-rows', boundary), [])\nvariant = dict(normal, **{'value':'id'+str(N)})\ncheck('variant query or selection payload', solve('value', variant), 'id'+str(N))\ncheck('unknown completion event', solve('unrecognized', normal), {'unchanged': True})\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-autocomplete-interactions-label-resolution-failure","generated_at":"2026-09-29T14:40:42.334316+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Autocomplete couples draft text, suggestion identity and asynchronous presentation; this bounded lifecycle model isolates one observable interaction defect.","repair":"Implement the failure contract using `d['fallback'] if d['error'] else d['label']`.","root_cause":"At label-resolution/failure, the implementation evaluates `d['value'] if d['error'] else d['label']` instead of preserving the specified completion transition.","sha256":"f29cdc4c3feb211aae6bffbfa37f796fe0abce8d9566f1072815512b2513641e","title":"Selected suggestion label resolution: failed label resolution presents the raw selected identifier · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.268,"exit_code":1,"observations":[{"actual":false,"check":"normal identity","expected":false,"passed":true},{"actual":true,"check":"boundary identity","expected":true,"passed":true},{"actual":false,"check":"normal epoch","expected":false,"passed":true},{"actual":true,"check":"boundary epoch","expected":true,"passed":true},{"actual":"p1","check":"normal value","expected":"p1","passed":true},{"actual":"","check":"boundary value","expected":"","passed":true},{"actual":"pe","check":"normal query","expected":"pe","passed":true},{"actual":"","check":"boundary query","expected":"","passed":true},{"actual":"Pear","check":"normal empty-label","expected":"Pear","passed":true},{"actual":"","check":"boundary empty-label","expected":"","passed":true},{"actual":"Pear","check":"normal failure","expected":"Unknown choice","passed":false},{"actual":"","check":"boundary failure","expected":"","passed":true},{"actual":true,"check":"normal pending","expected":true,"passed":true},{"actual":false,"check":"boundary pending","expected":false,"passed":true},{"actual":["p1",1],"check":"normal request","expected":["p1",1],"passed":true},{"actual":["",1],"check":"boundary request","expected":["",1],"passed":true},{"actual":null,"check":"normal clear-error","expected":null,"passed":true},{"actual":null,"check":"boundary clear-error","expected":null,"passed":true},{"actual":[],"check":"normal separate-rows","expected":[],"passed":true},{"actual":[],"check":"boundary separate-rows","expected":[],"passed":true},{"actual":"id1","check":"variant query or selection payload","expected":"id1","passed":true},{"actual":{"unchanged":true},"check":"unknown completion event","expected":{"unchanged":true},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal identity\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary identity\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal epoch\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary epoch\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal value\", \"actual\": \"p1\", \"expected\": \"p1\", \"passed\": true}, {\"check\": \"boundary value\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal query\", \"actual\": \"pe\", \"expected\": \"pe\", \"passed\": true}, {\"check\": \"boundary query\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal empty-label\", \"actual\": \"Pear\", \"expected\": \"Pear\", \"passed\": true}, {\"check\": \"boundary empty-label\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal failure\", \"actual\": \"Pear\", \"expected\": \"Unknown choice\", \"passed\": false}, {\"check\": \"boundary failure\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal pending\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary pending\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"normal request\", \"actual\": [\"p1\", 1], \"expected\": [\"p1\", 1], \"passed\": true}, {\"check\": \"boundary request\", \"actual\": [\"\", 1], \"expected\": [\"\", 1], \"passed\": true}, {\"check\": \"normal clear-error\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary clear-error\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal separate-rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary separate-rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"variant query or selection payload\", \"actual\": \"id1\", \"expected\": \"id1\", \"passed\": true}, {\"check\": \"unknown completion event\", \"actual\": {\"unchanged\": true}, \"expected\": {\"unchanged\": true}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.357,"exit_code":1,"observations":[{"actual":false,"check":"normal identity","expected":false,"passed":true},{"actual":true,"check":"boundary identity","expected":true,"passed":true},{"actual":false,"check":"normal epoch","expected":false,"passed":true},{"actual":true,"check":"boundary epoch","expected":true,"passed":true},{"actual":"p1","check":"normal value","expected":"p1","passed":true},{"actual":"","check":"boundary value","expected":"","passed":true},{"actual":"pe","check":"normal query","expected":"pe","passed":true},{"actual":"","check":"boundary query","expected":"","passed":true},{"actual":"Pear","check":"normal empty-label","expected":"Pear","passed":true},{"actual":"","check":"boundary empty-label","expected":"","passed":true},{"actual":"p1","check":"normal failure","expected":"Unknown choice","passed":false},{"actual":"","check":"boundary failure","expected":"","passed":true},{"actual":true,"check":"normal pending","expected":true,"passed":true},{"actual":false,"check":"boundary pending","expected":false,"passed":true},{"actual":["p1",1],"check":"normal request","expected":["p1",1],"passed":true},{"actual":["",1],"check":"boundary request","expected":["",1],"passed":true},{"actual":null,"check":"normal clear-error","expected":null,"passed":true},{"actual":null,"check":"boundary clear-error","expected":null,"passed":true},{"actual":[],"check":"normal separate-rows","expected":[],"passed":true},{"actual":[],"check":"boundary separate-rows","expected":[],"passed":true},{"actual":"id1","check":"variant query or selection payload","expected":"id1","passed":true},{"actual":{"unchanged":true},"check":"unknown completion event","expected":{"unchanged":true},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal identity\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary identity\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal epoch\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary epoch\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal value\", \"actual\": \"p1\", \"expected\": \"p1\", \"passed\": true}, {\"check\": \"boundary value\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal query\", \"actual\": \"pe\", \"expected\": \"pe\", \"passed\": true}, {\"check\": \"boundary query\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal empty-label\", \"actual\": \"Pear\", \"expected\": \"Pear\", \"passed\": true}, {\"check\": \"boundary empty-label\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal failure\", \"actual\": \"p1\", \"expected\": \"Unknown choice\", \"passed\": false}, {\"check\": \"boundary failure\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal pending\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary pending\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"normal request\", \"actual\": [\"p1\", 1], \"expected\": [\"p1\", 1], \"passed\": true}, {\"check\": \"boundary request\", \"actual\": [\"\", 1], \"expected\": [\"\", 1], \"passed\": true}, {\"check\": \"normal clear-error\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary clear-error\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal separate-rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary separate-rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"variant query or selection payload\", \"actual\": \"id1\", \"expected\": \"id1\", \"passed\": true}, {\"check\": \"unknown completion event\", \"actual\": {\"unchanged\": true}, \"expected\": {\"unchanged\": true}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.321,"exit_code":0,"observations":[{"actual":false,"check":"normal identity","expected":false,"passed":true},{"actual":true,"check":"boundary identity","expected":true,"passed":true},{"actual":false,"check":"normal epoch","expected":false,"passed":true},{"actual":true,"check":"boundary epoch","expected":true,"passed":true},{"actual":"p1","check":"normal value","expected":"p1","passed":true},{"actual":"","check":"boundary value","expected":"","passed":true},{"actual":"pe","check":"normal query","expected":"pe","passed":true},{"actual":"","check":"boundary query","expected":"","passed":true},{"actual":"Pear","check":"normal empty-label","expected":"Pear","passed":true},{"actual":"","check":"boundary empty-label","expected":"","passed":true},{"actual":"Unknown choice","check":"normal failure","expected":"Unknown choice","passed":true},{"actual":"","check":"boundary failure","expected":"","passed":true},{"actual":true,"check":"normal pending","expected":true,"passed":true},{"actual":false,"check":"boundary pending","expected":false,"passed":true},{"actual":["p1",1],"check":"normal request","expected":["p1",1],"passed":true},{"actual":["",1],"check":"boundary request","expected":["",1],"passed":true},{"actual":null,"check":"normal clear-error","expected":null,"passed":true},{"actual":null,"check":"boundary clear-error","expected":null,"passed":true},{"actual":[],"check":"normal separate-rows","expected":[],"passed":true},{"actual":[],"check":"boundary separate-rows","expected":[],"passed":true},{"actual":"id1","check":"variant query or selection payload","expected":"id1","passed":true},{"actual":{"unchanged":true},"check":"unknown completion event","expected":{"unchanged":true},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal identity\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary identity\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal epoch\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary epoch\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal value\", \"actual\": \"p1\", \"expected\": \"p1\", \"passed\": true}, {\"check\": \"boundary value\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal query\", \"actual\": \"pe\", \"expected\": \"pe\", \"passed\": true}, {\"check\": \"boundary query\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal empty-label\", \"actual\": \"Pear\", \"expected\": \"Pear\", \"passed\": true}, {\"check\": \"boundary empty-label\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal failure\", \"actual\": \"Unknown choice\", \"expected\": \"Unknown choice\", \"passed\": true}, {\"check\": \"boundary failure\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal pending\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary pending\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"normal request\", \"actual\": [\"p1\", 1], \"expected\": [\"p1\", 1], \"passed\": true}, {\"check\": \"boundary request\", \"actual\": [\"\", 1], \"expected\": [\"\", 1], \"passed\": true}, {\"check\": \"normal clear-error\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary clear-error\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal separate-rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary separate-rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"variant query or selection payload\", \"actual\": \"id1\", \"expected\": \"id1\", \"passed\": true}, {\"check\": \"unknown completion event\", \"actual\": {\"unchanged\": true}, \"expected\": {\"unchanged\": true}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}