{"abstract":"The draft completion transition produces an incorrect observable state.","category":"Autocomplete interactions","checks":22,"contract":"Additional suggestion pages belong to a query epoch and continuation token. First pages replace, later pages append unseen identities, and the active option is preserved by identity. A page request does not clear committed value or reset the typed draft. This models presentation, not transport pagination.","evaluation_group":"s3-autocomplete-result-pages","failed_approach":"The attempted repair uses `''`, which still violates a normal or boundary completion fixture.","family":"s3-autocomplete-interactions-result-pages-draft","id":"FA-22526","implementations":{"attempt":{"sha256":"afb1850170a894c90e4522971e74bfcc143bf24bc1d406cd98ab08a95a753159","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, d):\n    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]\n    if event == 'first': return d['page']\n    if event == 'continuation': return d['cursor']\n    if event == 'has-more': return d['cursor'] is not None\n    if event == 'page-epoch': return d['page_epoch']==d['epoch']\n    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None\n    if event == 'value': return d['value']\n    if event == 'draft': return ''\n    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None\n    if event == 'footer': return len(d['rows'])\n    return {'unchanged': True}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nnormal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}\nboundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}\ncheck('normal append', solve('append', normal), ['a','b','c'])\ncheck('boundary append', solve('append', boundary), [])\ncheck('normal first', solve('first', normal), ['b','c'])\ncheck('boundary first', solve('first', boundary), [])\ncheck('normal continuation', solve('continuation', normal), 'next-2')\ncheck('boundary continuation', solve('continuation', boundary), None)\ncheck('normal has-more', solve('has-more', normal), True)\ncheck('boundary has-more', solve('has-more', boundary), False)\ncheck('normal page-epoch', solve('page-epoch', normal), False)\ncheck('boundary page-epoch', solve('page-epoch', boundary), True)\ncheck('normal active', solve('active', normal), 1)\ncheck('boundary active', solve('active', boundary), None)\ncheck('normal value', solve('value', normal), 'v')\ncheck('boundary value', solve('value', boundary), None)\ncheck('normal draft', solve('draft', normal), 'pe')\ncheck('boundary draft', solve('draft', boundary), '')\ncheck('normal more-busy', solve('more-busy', normal), False)\ncheck('boundary more-busy', solve('more-busy', boundary), False)\ncheck('normal footer', solve('footer', normal), 2)\ncheck('boundary footer', solve('footer', boundary), 0)\nvariant = dict(normal, **{'draft':'q'*N})\ncheck('variant query or selection payload', solve('draft', variant), 'q'*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":"5bf0e82ecc35198014c4b19ffbdf71e66a49d7514e409d1dff9ad13bc181a9c4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, d):\n    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]\n    if event == 'first': return d['page']\n    if event == 'continuation': return d['cursor']\n    if event == 'has-more': return d['cursor'] is not None\n    if event == 'page-epoch': return d['page_epoch']==d['epoch']\n    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None\n    if event == 'value': return d['value']\n    if event == 'draft': return d['cursor']\n    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None\n    if event == 'footer': return len(d['rows'])\n    return {'unchanged': True}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nnormal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}\nboundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}\ncheck('normal append', solve('append', normal), ['a','b','c'])\ncheck('boundary append', solve('append', boundary), [])\ncheck('normal first', solve('first', normal), ['b','c'])\ncheck('boundary first', solve('first', boundary), [])\ncheck('normal continuation', solve('continuation', normal), 'next-2')\ncheck('boundary continuation', solve('continuation', boundary), None)\ncheck('normal has-more', solve('has-more', normal), True)\ncheck('boundary has-more', solve('has-more', boundary), False)\ncheck('normal page-epoch', solve('page-epoch', normal), False)\ncheck('boundary page-epoch', solve('page-epoch', boundary), True)\ncheck('normal active', solve('active', normal), 1)\ncheck('boundary active', solve('active', boundary), None)\ncheck('normal value', solve('value', normal), 'v')\ncheck('boundary value', solve('value', boundary), None)\ncheck('normal draft', solve('draft', normal), 'pe')\ncheck('boundary draft', solve('draft', boundary), '')\ncheck('normal more-busy', solve('more-busy', normal), False)\ncheck('boundary more-busy', solve('more-busy', boundary), False)\ncheck('normal footer', solve('footer', normal), 2)\ncheck('boundary footer', solve('footer', boundary), 0)\nvariant = dict(normal, **{'draft':'q'*N})\ncheck('variant query or selection payload', solve('draft', variant), 'q'*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":"8fe905c771a5e817d648e731eaece2efb4173842582ed6813dc5acc0c940b03b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, d):\n    if event == 'append': return d['rows']+[x for x in d['page'] if x not in d['rows']]\n    if event == 'first': return d['page']\n    if event == 'continuation': return d['cursor']\n    if event == 'has-more': return d['cursor'] is not None\n    if event == 'page-epoch': return d['page_epoch']==d['epoch']\n    if event == 'active': return d['rows'].index(d['active']) if d['active'] in d['rows'] else None\n    if event == 'value': return d['value']\n    if event == 'draft': return d['draft']\n    if event == 'more-busy': return not d['loading_more'] and d['cursor'] is not None\n    if event == 'footer': return len(d['rows'])\n    return {'unchanged': True}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nnormal = {'rows':['a','b'],'page':['b','c'],'cursor':'next-2','used':'next-1','epoch':N,'page_epoch':N-1,'active':'b','value':'v','draft':'pe','loading_more':True}\nboundary = {'rows':[],'page':[],'cursor':None,'used':None,'epoch':N,'page_epoch':N,'active':None,'value':None,'draft':'','loading_more':False}\ncheck('normal append', solve('append', normal), ['a','b','c'])\ncheck('boundary append', solve('append', boundary), [])\ncheck('normal first', solve('first', normal), ['b','c'])\ncheck('boundary first', solve('first', boundary), [])\ncheck('normal continuation', solve('continuation', normal), 'next-2')\ncheck('boundary continuation', solve('continuation', boundary), None)\ncheck('normal has-more', solve('has-more', normal), True)\ncheck('boundary has-more', solve('has-more', boundary), False)\ncheck('normal page-epoch', solve('page-epoch', normal), False)\ncheck('boundary page-epoch', solve('page-epoch', boundary), True)\ncheck('normal active', solve('active', normal), 1)\ncheck('boundary active', solve('active', boundary), None)\ncheck('normal value', solve('value', normal), 'v')\ncheck('boundary value', solve('value', boundary), None)\ncheck('normal draft', solve('draft', normal), 'pe')\ncheck('boundary draft', solve('draft', boundary), '')\ncheck('normal more-busy', solve('more-busy', normal), False)\ncheck('boundary more-busy', solve('more-busy', boundary), False)\ncheck('normal footer', solve('footer', normal), 2)\ncheck('boundary footer', solve('footer', boundary), 0)\nvariant = dict(normal, **{'draft':'q'*N})\ncheck('variant query or selection payload', solve('draft', variant), 'q'*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-result-pages-draft","generated_at":"2026-09-29T14:40:39.226406+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 draft contract using `d['draft']`.","root_cause":"At result-pages/draft, the implementation evaluates `d['cursor']` instead of preserving the specified completion transition.","sha256":"3f7104b84b6a7c411378a4292f3c4195350804a30eff7eb410e61d8b390f7e5f","title":"Paged autocomplete interaction: paging substitutes the cursor for the search draft · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.71,"exit_code":1,"observations":[{"actual":["a","b","c"],"check":"normal append","expected":["a","b","c"],"passed":true},{"actual":[],"check":"boundary append","expected":[],"passed":true},{"actual":["b","c"],"check":"normal first","expected":["b","c"],"passed":true},{"actual":[],"check":"boundary first","expected":[],"passed":true},{"actual":"next-2","check":"normal continuation","expected":"next-2","passed":true},{"actual":null,"check":"boundary continuation","expected":null,"passed":true},{"actual":true,"check":"normal has-more","expected":true,"passed":true},{"actual":false,"check":"boundary has-more","expected":false,"passed":true},{"actual":false,"check":"normal page-epoch","expected":false,"passed":true},{"actual":true,"check":"boundary page-epoch","expected":true,"passed":true},{"actual":1,"check":"normal active","expected":1,"passed":true},{"actual":null,"check":"boundary active","expected":null,"passed":true},{"actual":"v","check":"normal value","expected":"v","passed":true},{"actual":null,"check":"boundary value","expected":null,"passed":true},{"actual":"","check":"normal draft","expected":"pe","passed":false},{"actual":"","check":"boundary draft","expected":"","passed":true},{"actual":false,"check":"normal more-busy","expected":false,"passed":true},{"actual":false,"check":"boundary more-busy","expected":false,"passed":true},{"actual":2,"check":"normal footer","expected":2,"passed":true},{"actual":0,"check":"boundary footer","expected":0,"passed":true},{"actual":"","check":"variant query or selection payload","expected":"q","passed":false},{"actual":{"unchanged":true},"check":"unknown completion event","expected":{"unchanged":true},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal append\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"boundary append\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal first\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}, {\"check\": \"boundary first\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal continuation\", \"actual\": \"next-2\", \"expected\": \"next-2\", \"passed\": true}, {\"check\": \"boundary continuation\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal has-more\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary has-more\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"normal page-epoch\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary page-epoch\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal active\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"boundary active\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal value\", \"actual\": \"v\", \"expected\": \"v\", \"passed\": true}, {\"check\": \"boundary value\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal draft\", \"actual\": \"\", \"expected\": \"pe\", \"passed\": false}, {\"check\": \"boundary draft\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal more-busy\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary more-busy\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"normal footer\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"boundary footer\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"variant query or selection payload\", \"actual\": \"\", \"expected\": \"q\", \"passed\": false}, {\"check\": \"unknown completion event\", \"actual\": {\"unchanged\": true}, \"expected\": {\"unchanged\": true}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.999,"exit_code":1,"observations":[{"actual":["a","b","c"],"check":"normal append","expected":["a","b","c"],"passed":true},{"actual":[],"check":"boundary append","expected":[],"passed":true},{"actual":["b","c"],"check":"normal first","expected":["b","c"],"passed":true},{"actual":[],"check":"boundary first","expected":[],"passed":true},{"actual":"next-2","check":"normal continuation","expected":"next-2","passed":true},{"actual":null,"check":"boundary continuation","expected":null,"passed":true},{"actual":true,"check":"normal has-more","expected":true,"passed":true},{"actual":false,"check":"boundary has-more","expected":false,"passed":true},{"actual":false,"check":"normal page-epoch","expected":false,"passed":true},{"actual":true,"check":"boundary page-epoch","expected":true,"passed":true},{"actual":1,"check":"normal active","expected":1,"passed":true},{"actual":null,"check":"boundary active","expected":null,"passed":true},{"actual":"v","check":"normal value","expected":"v","passed":true},{"actual":null,"check":"boundary value","expected":null,"passed":true},{"actual":"next-2","check":"normal draft","expected":"pe","passed":false},{"actual":null,"check":"boundary draft","expected":"","passed":false},{"actual":false,"check":"normal more-busy","expected":false,"passed":true},{"actual":false,"check":"boundary more-busy","expected":false,"passed":true},{"actual":2,"check":"normal footer","expected":2,"passed":true},{"actual":0,"check":"boundary footer","expected":0,"passed":true},{"actual":"next-2","check":"variant query or selection payload","expected":"q","passed":false},{"actual":{"unchanged":true},"check":"unknown completion event","expected":{"unchanged":true},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal append\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"boundary append\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal first\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}, {\"check\": \"boundary first\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal continuation\", \"actual\": \"next-2\", \"expected\": \"next-2\", \"passed\": true}, {\"check\": \"boundary continuation\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal has-more\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary has-more\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"normal page-epoch\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary page-epoch\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal active\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"boundary active\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal value\", \"actual\": \"v\", \"expected\": \"v\", \"passed\": true}, {\"check\": \"boundary value\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal draft\", \"actual\": \"next-2\", \"expected\": \"pe\", \"passed\": false}, {\"check\": \"boundary draft\", \"actual\": null, \"expected\": \"\", \"passed\": false}, {\"check\": \"normal more-busy\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary more-busy\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"normal footer\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"boundary footer\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"variant query or selection payload\", \"actual\": \"next-2\", \"expected\": \"q\", \"passed\": false}, {\"check\": \"unknown completion event\", \"actual\": {\"unchanged\": true}, \"expected\": {\"unchanged\": true}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.943,"exit_code":0,"observations":[{"actual":["a","b","c"],"check":"normal append","expected":["a","b","c"],"passed":true},{"actual":[],"check":"boundary append","expected":[],"passed":true},{"actual":["b","c"],"check":"normal first","expected":["b","c"],"passed":true},{"actual":[],"check":"boundary first","expected":[],"passed":true},{"actual":"next-2","check":"normal continuation","expected":"next-2","passed":true},{"actual":null,"check":"boundary continuation","expected":null,"passed":true},{"actual":true,"check":"normal has-more","expected":true,"passed":true},{"actual":false,"check":"boundary has-more","expected":false,"passed":true},{"actual":false,"check":"normal page-epoch","expected":false,"passed":true},{"actual":true,"check":"boundary page-epoch","expected":true,"passed":true},{"actual":1,"check":"normal active","expected":1,"passed":true},{"actual":null,"check":"boundary active","expected":null,"passed":true},{"actual":"v","check":"normal value","expected":"v","passed":true},{"actual":null,"check":"boundary value","expected":null,"passed":true},{"actual":"pe","check":"normal draft","expected":"pe","passed":true},{"actual":"","check":"boundary draft","expected":"","passed":true},{"actual":false,"check":"normal more-busy","expected":false,"passed":true},{"actual":false,"check":"boundary more-busy","expected":false,"passed":true},{"actual":2,"check":"normal footer","expected":2,"passed":true},{"actual":0,"check":"boundary footer","expected":0,"passed":true},{"actual":"q","check":"variant query or selection payload","expected":"q","passed":true},{"actual":{"unchanged":true},"check":"unknown completion event","expected":{"unchanged":true},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal append\", \"actual\": [\"a\", \"b\", \"c\"], \"expected\": [\"a\", \"b\", \"c\"], \"passed\": true}, {\"check\": \"boundary append\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal first\", \"actual\": [\"b\", \"c\"], \"expected\": [\"b\", \"c\"], \"passed\": true}, {\"check\": \"boundary first\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal continuation\", \"actual\": \"next-2\", \"expected\": \"next-2\", \"passed\": true}, {\"check\": \"boundary continuation\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal has-more\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"boundary has-more\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"normal page-epoch\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary page-epoch\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal active\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"boundary active\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal value\", \"actual\": \"v\", \"expected\": \"v\", \"passed\": true}, {\"check\": \"boundary value\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"normal draft\", \"actual\": \"pe\", \"expected\": \"pe\", \"passed\": true}, {\"check\": \"boundary draft\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"normal more-busy\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary more-busy\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"normal footer\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"boundary footer\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"variant query or selection payload\", \"actual\": \"q\", \"expected\": \"q\", \"passed\": true}, {\"check\": \"unknown completion event\", \"actual\": {\"unchanged\": true}, \"expected\": {\"unchanged\": true}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}