{"abstract":"The response-position completion transition produces an incorrect observable state.","category":"Autocomplete interactions","checks":22,"contract":"Structured command completion binds each candidate to command identity and argument position. Acceptance replaces the active argument only, quotes values containing spaces, and leaves the command verb and remaining arguments intact. Previously supplied named arguments are excluded from name suggestions.","evaluation_group":"s3-autocomplete-argument-completion","failed_approach":"The attempted repair uses `d['response_position']>=d['position']`, which still violates a normal or boundary completion fixture.","family":"s3-autocomplete-interactions-argument-completion-response-position","id":"FA-23076","implementations":{"attempt":{"sha256":"9c5d7f39f41416d8492572b6e7075dcb075bc9bfcc1e251213ea0a2a287a62f2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, d):\n    if event == 'position': return d['position']\n    if event == 'command': return d['command']\n    if event == 'replace': return d['args'][:d['position']]+[d['candidate']]+d['args'][d['position']+1:]\n    if event == 'quote': return '\"'+d['candidate']+'\"' if ' ' in d['candidate'] else d['candidate']\n    if event == 'verb': return d['verb']\n    if event == 'names': return [x for x in d['names'] if x not in d['used']]\n    if event == 'response-command': return d['response_command']==d['command']\n    if event == 'response-position': return d['response_position']>=d['position']\n    if event == 'next-position': return d['position']+1\n    if event == 'argument-separator': return '' if d['position']+1<len(d['args']) else ' '\n    return {'unchanged': True}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nnormal = {'verb':'open','args':['old','tail'],'position':0,'candidate':'my file','command':'open','response_command':'close','names':['--mode','--path'],'used':['--mode'],'epoch':N,'response_position':1}\nboundary = {'verb':'run','args':[],'position':0,'candidate':'x','command':'run','response_command':'run','names':[],'used':[],'epoch':N,'response_position':0}\ncheck('normal position', solve('position', normal), 0)\ncheck('boundary position', solve('position', boundary), 0)\ncheck('normal command', solve('command', normal), 'open')\ncheck('boundary command', solve('command', boundary), 'run')\ncheck('normal replace', solve('replace', normal), ['my file','tail'])\ncheck('boundary replace', solve('replace', boundary), ['x'])\ncheck('normal quote', solve('quote', normal), '\"my file\"')\ncheck('boundary quote', solve('quote', boundary), 'x')\ncheck('normal verb', solve('verb', normal), 'open')\ncheck('boundary verb', solve('verb', boundary), 'run')\ncheck('normal names', solve('names', normal), ['--path'])\ncheck('boundary names', solve('names', boundary), [])\ncheck('normal response-command', solve('response-command', normal), False)\ncheck('boundary response-command', solve('response-command', boundary), True)\ncheck('normal response-position', solve('response-position', normal), False)\ncheck('boundary response-position', solve('response-position', boundary), True)\ncheck('normal next-position', solve('next-position', normal), 1)\ncheck('boundary next-position', solve('next-position', boundary), 1)\ncheck('normal argument-separator', solve('argument-separator', normal), '')\ncheck('boundary argument-separator', solve('argument-separator', boundary), ' ')\nvariant = dict(normal, **{'candidate':'a '*N})\ncheck('variant query or selection payload', solve('quote', variant), '\"'+'a '*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":"e2ecf000c3760afcf338107e6a8048aee4c8d3ac4be3e2f589d0966d66e5b8cd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, d):\n    if event == 'position': return d['position']\n    if event == 'command': return d['command']\n    if event == 'replace': return d['args'][:d['position']]+[d['candidate']]+d['args'][d['position']+1:]\n    if event == 'quote': return '\"'+d['candidate']+'\"' if ' ' in d['candidate'] else d['candidate']\n    if event == 'verb': return d['verb']\n    if event == 'names': return [x for x in d['names'] if x not in d['used']]\n    if event == 'response-command': return d['response_command']==d['command']\n    if event == 'response-position': return True\n    if event == 'next-position': return d['position']+1\n    if event == 'argument-separator': return '' if d['position']+1<len(d['args']) else ' '\n    return {'unchanged': True}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nnormal = {'verb':'open','args':['old','tail'],'position':0,'candidate':'my file','command':'open','response_command':'close','names':['--mode','--path'],'used':['--mode'],'epoch':N,'response_position':1}\nboundary = {'verb':'run','args':[],'position':0,'candidate':'x','command':'run','response_command':'run','names':[],'used':[],'epoch':N,'response_position':0}\ncheck('normal position', solve('position', normal), 0)\ncheck('boundary position', solve('position', boundary), 0)\ncheck('normal command', solve('command', normal), 'open')\ncheck('boundary command', solve('command', boundary), 'run')\ncheck('normal replace', solve('replace', normal), ['my file','tail'])\ncheck('boundary replace', solve('replace', boundary), ['x'])\ncheck('normal quote', solve('quote', normal), '\"my file\"')\ncheck('boundary quote', solve('quote', boundary), 'x')\ncheck('normal verb', solve('verb', normal), 'open')\ncheck('boundary verb', solve('verb', boundary), 'run')\ncheck('normal names', solve('names', normal), ['--path'])\ncheck('boundary names', solve('names', boundary), [])\ncheck('normal response-command', solve('response-command', normal), False)\ncheck('boundary response-command', solve('response-command', boundary), True)\ncheck('normal response-position', solve('response-position', normal), False)\ncheck('boundary response-position', solve('response-position', boundary), True)\ncheck('normal next-position', solve('next-position', normal), 1)\ncheck('boundary next-position', solve('next-position', boundary), 1)\ncheck('normal argument-separator', solve('argument-separator', normal), '')\ncheck('boundary argument-separator', solve('argument-separator', boundary), ' ')\nvariant = dict(normal, **{'candidate':'a '*N})\ncheck('variant query or selection payload', solve('quote', variant), '\"'+'a '*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":"8549ff4f23331261041d4db80b9e093963077f80b64405933029bd8ba663ea3e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(event, d):\n    if event == 'position': return d['position']\n    if event == 'command': return d['command']\n    if event == 'replace': return d['args'][:d['position']]+[d['candidate']]+d['args'][d['position']+1:]\n    if event == 'quote': return '\"'+d['candidate']+'\"' if ' ' in d['candidate'] else d['candidate']\n    if event == 'verb': return d['verb']\n    if event == 'names': return [x for x in d['names'] if x not in d['used']]\n    if event == 'response-command': return d['response_command']==d['command']\n    if event == 'response-position': return d['response_position']==d['position']\n    if event == 'next-position': return d['position']+1\n    if event == 'argument-separator': return '' if d['position']+1<len(d['args']) else ' '\n    return {'unchanged': True}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nnormal = {'verb':'open','args':['old','tail'],'position':0,'candidate':'my file','command':'open','response_command':'close','names':['--mode','--path'],'used':['--mode'],'epoch':N,'response_position':1}\nboundary = {'verb':'run','args':[],'position':0,'candidate':'x','command':'run','response_command':'run','names':[],'used':[],'epoch':N,'response_position':0}\ncheck('normal position', solve('position', normal), 0)\ncheck('boundary position', solve('position', boundary), 0)\ncheck('normal command', solve('command', normal), 'open')\ncheck('boundary command', solve('command', boundary), 'run')\ncheck('normal replace', solve('replace', normal), ['my file','tail'])\ncheck('boundary replace', solve('replace', boundary), ['x'])\ncheck('normal quote', solve('quote', normal), '\"my file\"')\ncheck('boundary quote', solve('quote', boundary), 'x')\ncheck('normal verb', solve('verb', normal), 'open')\ncheck('boundary verb', solve('verb', boundary), 'run')\ncheck('normal names', solve('names', normal), ['--path'])\ncheck('boundary names', solve('names', boundary), [])\ncheck('normal response-command', solve('response-command', normal), False)\ncheck('boundary response-command', solve('response-command', boundary), True)\ncheck('normal response-position', solve('response-position', normal), False)\ncheck('boundary response-position', solve('response-position', boundary), True)\ncheck('normal next-position', solve('next-position', normal), 1)\ncheck('boundary next-position', solve('next-position', boundary), 1)\ncheck('normal argument-separator', solve('argument-separator', normal), '')\ncheck('boundary argument-separator', solve('argument-separator', boundary), ' ')\nvariant = dict(normal, **{'candidate':'a '*N})\ncheck('variant query or selection payload', solve('quote', variant), '\"'+'a '*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-argument-completion-response-position","generated_at":"2026-09-29T14:40:44.240635+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 response-position contract using `d['response_position']==d['position']`.","root_cause":"At argument-completion/response-position, the implementation evaluates `True` instead of preserving the specified completion transition.","sha256":"bca564a646e275f52844b8cdd3ce92fff2a4a4ccd453cb70f9697a34339b338b","title":"Command argument suggestions: results for a different argument position become selectable · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.272,"exit_code":1,"observations":[{"actual":0,"check":"normal position","expected":0,"passed":true},{"actual":0,"check":"boundary position","expected":0,"passed":true},{"actual":"open","check":"normal command","expected":"open","passed":true},{"actual":"run","check":"boundary command","expected":"run","passed":true},{"actual":["my file","tail"],"check":"normal replace","expected":["my file","tail"],"passed":true},{"actual":["x"],"check":"boundary replace","expected":["x"],"passed":true},{"actual":"\"my file\"","check":"normal quote","expected":"\"my file\"","passed":true},{"actual":"x","check":"boundary quote","expected":"x","passed":true},{"actual":"open","check":"normal verb","expected":"open","passed":true},{"actual":"run","check":"boundary verb","expected":"run","passed":true},{"actual":["--path"],"check":"normal names","expected":["--path"],"passed":true},{"actual":[],"check":"boundary names","expected":[],"passed":true},{"actual":false,"check":"normal response-command","expected":false,"passed":true},{"actual":true,"check":"boundary response-command","expected":true,"passed":true},{"actual":true,"check":"normal response-position","expected":false,"passed":false},{"actual":true,"check":"boundary response-position","expected":true,"passed":true},{"actual":1,"check":"normal next-position","expected":1,"passed":true},{"actual":1,"check":"boundary next-position","expected":1,"passed":true},{"actual":"","check":"normal argument-separator","expected":"","passed":true},{"actual":" ","check":"boundary argument-separator","expected":" ","passed":true},{"actual":"\"a \"","check":"variant query or selection payload","expected":"\"a \"","passed":true},{"actual":{"unchanged":true},"check":"unknown completion event","expected":{"unchanged":true},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal position\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary position\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal command\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"boundary command\", \"actual\": \"run\", \"expected\": \"run\", \"passed\": true}, {\"check\": \"normal replace\", \"actual\": [\"my file\", \"tail\"], \"expected\": [\"my file\", \"tail\"], \"passed\": true}, {\"check\": \"boundary replace\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"normal quote\", \"actual\": \"\\\"my file\\\"\", \"expected\": \"\\\"my file\\\"\", \"passed\": true}, {\"check\": \"boundary quote\", \"actual\": \"x\", \"expected\": \"x\", \"passed\": true}, {\"check\": \"normal verb\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"boundary verb\", \"actual\": \"run\", \"expected\": \"run\", \"passed\": true}, {\"check\": \"normal names\", \"actual\": [\"--path\"], \"expected\": [\"--path\"], \"passed\": true}, {\"check\": \"boundary names\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal response-command\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary response-command\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal response-position\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"boundary response-position\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal next-position\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"boundary next-position\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"normal argument-separator\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"boundary argument-separator\", \"actual\": \" \", \"expected\": \" \", \"passed\": true}, {\"check\": \"variant query or selection payload\", \"actual\": \"\\\"a \\\"\", \"expected\": \"\\\"a \\\"\", \"passed\": true}, {\"check\": \"unknown completion event\", \"actual\": {\"unchanged\": true}, \"expected\": {\"unchanged\": true}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.585,"exit_code":1,"observations":[{"actual":0,"check":"normal position","expected":0,"passed":true},{"actual":0,"check":"boundary position","expected":0,"passed":true},{"actual":"open","check":"normal command","expected":"open","passed":true},{"actual":"run","check":"boundary command","expected":"run","passed":true},{"actual":["my file","tail"],"check":"normal replace","expected":["my file","tail"],"passed":true},{"actual":["x"],"check":"boundary replace","expected":["x"],"passed":true},{"actual":"\"my file\"","check":"normal quote","expected":"\"my file\"","passed":true},{"actual":"x","check":"boundary quote","expected":"x","passed":true},{"actual":"open","check":"normal verb","expected":"open","passed":true},{"actual":"run","check":"boundary verb","expected":"run","passed":true},{"actual":["--path"],"check":"normal names","expected":["--path"],"passed":true},{"actual":[],"check":"boundary names","expected":[],"passed":true},{"actual":false,"check":"normal response-command","expected":false,"passed":true},{"actual":true,"check":"boundary response-command","expected":true,"passed":true},{"actual":true,"check":"normal response-position","expected":false,"passed":false},{"actual":true,"check":"boundary response-position","expected":true,"passed":true},{"actual":1,"check":"normal next-position","expected":1,"passed":true},{"actual":1,"check":"boundary next-position","expected":1,"passed":true},{"actual":"","check":"normal argument-separator","expected":"","passed":true},{"actual":" ","check":"boundary argument-separator","expected":" ","passed":true},{"actual":"\"a \"","check":"variant query or selection payload","expected":"\"a \"","passed":true},{"actual":{"unchanged":true},"check":"unknown completion event","expected":{"unchanged":true},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal position\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary position\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal command\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"boundary command\", \"actual\": \"run\", \"expected\": \"run\", \"passed\": true}, {\"check\": \"normal replace\", \"actual\": [\"my file\", \"tail\"], \"expected\": [\"my file\", \"tail\"], \"passed\": true}, {\"check\": \"boundary replace\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"normal quote\", \"actual\": \"\\\"my file\\\"\", \"expected\": \"\\\"my file\\\"\", \"passed\": true}, {\"check\": \"boundary quote\", \"actual\": \"x\", \"expected\": \"x\", \"passed\": true}, {\"check\": \"normal verb\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"boundary verb\", \"actual\": \"run\", \"expected\": \"run\", \"passed\": true}, {\"check\": \"normal names\", \"actual\": [\"--path\"], \"expected\": [\"--path\"], \"passed\": true}, {\"check\": \"boundary names\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal response-command\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary response-command\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal response-position\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"boundary response-position\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal next-position\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"boundary next-position\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"normal argument-separator\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"boundary argument-separator\", \"actual\": \" \", \"expected\": \" \", \"passed\": true}, {\"check\": \"variant query or selection payload\", \"actual\": \"\\\"a \\\"\", \"expected\": \"\\\"a \\\"\", \"passed\": true}, {\"check\": \"unknown completion event\", \"actual\": {\"unchanged\": true}, \"expected\": {\"unchanged\": true}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.242,"exit_code":0,"observations":[{"actual":0,"check":"normal position","expected":0,"passed":true},{"actual":0,"check":"boundary position","expected":0,"passed":true},{"actual":"open","check":"normal command","expected":"open","passed":true},{"actual":"run","check":"boundary command","expected":"run","passed":true},{"actual":["my file","tail"],"check":"normal replace","expected":["my file","tail"],"passed":true},{"actual":["x"],"check":"boundary replace","expected":["x"],"passed":true},{"actual":"\"my file\"","check":"normal quote","expected":"\"my file\"","passed":true},{"actual":"x","check":"boundary quote","expected":"x","passed":true},{"actual":"open","check":"normal verb","expected":"open","passed":true},{"actual":"run","check":"boundary verb","expected":"run","passed":true},{"actual":["--path"],"check":"normal names","expected":["--path"],"passed":true},{"actual":[],"check":"boundary names","expected":[],"passed":true},{"actual":false,"check":"normal response-command","expected":false,"passed":true},{"actual":true,"check":"boundary response-command","expected":true,"passed":true},{"actual":false,"check":"normal response-position","expected":false,"passed":true},{"actual":true,"check":"boundary response-position","expected":true,"passed":true},{"actual":1,"check":"normal next-position","expected":1,"passed":true},{"actual":1,"check":"boundary next-position","expected":1,"passed":true},{"actual":"","check":"normal argument-separator","expected":"","passed":true},{"actual":" ","check":"boundary argument-separator","expected":" ","passed":true},{"actual":"\"a \"","check":"variant query or selection payload","expected":"\"a \"","passed":true},{"actual":{"unchanged":true},"check":"unknown completion event","expected":{"unchanged":true},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal position\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary position\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"normal command\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"boundary command\", \"actual\": \"run\", \"expected\": \"run\", \"passed\": true}, {\"check\": \"normal replace\", \"actual\": [\"my file\", \"tail\"], \"expected\": [\"my file\", \"tail\"], \"passed\": true}, {\"check\": \"boundary replace\", \"actual\": [\"x\"], \"expected\": [\"x\"], \"passed\": true}, {\"check\": \"normal quote\", \"actual\": \"\\\"my file\\\"\", \"expected\": \"\\\"my file\\\"\", \"passed\": true}, {\"check\": \"boundary quote\", \"actual\": \"x\", \"expected\": \"x\", \"passed\": true}, {\"check\": \"normal verb\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"boundary verb\", \"actual\": \"run\", \"expected\": \"run\", \"passed\": true}, {\"check\": \"normal names\", \"actual\": [\"--path\"], \"expected\": [\"--path\"], \"passed\": true}, {\"check\": \"boundary names\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal response-command\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary response-command\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal response-position\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"boundary response-position\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"normal next-position\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"boundary next-position\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"normal argument-separator\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"boundary argument-separator\", \"actual\": \" \", \"expected\": \" \", \"passed\": true}, {\"check\": \"variant query or selection payload\", \"actual\": \"\\\"a \\\"\", \"expected\": \"\\\"a \\\"\", \"passed\": true}, {\"check\": \"unknown completion event\", \"actual\": {\"unchanged\": true}, \"expected\": {\"unchanged\": true}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}