{"abstract":"The operation returns a result or retained state that violates this contract: Replace exactly the selected valid positional item, not every equal item.","category":"Container mutation","checks":4,"contract":"Replace exactly the selected valid positional item, not every equal item. Inputs are the finite Python values shown by the executable fixtures; no concurrent execution is assumed.","evaluation_group":"model-780e4125be121bd0","failed_approach":"Insertion shifts the selected item instead of replacing it.","family":"xr-list-replace-one-index","id":"FA-4341","implementations":{"attempt":{"sha256":"7f9288c4f2f7a12b3dca347f4fbe9060f47cfdf3bf7303a257df493adb2590ae","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=list(x); a.insert(y[0],y[1]); return a\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('duplicate identity', solve(['a', 'b', 'a'], [0, 'c']), ['c', 'b', 'a'])\ncheck('negative index', solve(['a', 'b'], [-1, 'c']), ['a', 'c'])\ncheck('singleton', solve(['a'], [0, 'c']), ['c'])\ncheck('same replacement', solve(['a', 'b'], [1, 'b']), ['a', 'b'])\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":"65ec87bef11565cd719f5e0ad828b539ca6724fe131443717a4068afa51c8b7a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    return [y[1] if v==x[y[0]] else v for v in x]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('duplicate identity', solve(['a', 'b', 'a'], [0, 'c']), ['c', 'b', 'a'])\ncheck('negative index', solve(['a', 'b'], [-1, 'c']), ['a', 'c'])\ncheck('singleton', solve(['a'], [0, 'c']), ['c'])\ncheck('same replacement', solve(['a', 'b'], [1, 'b']), ['a', 'b'])\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":"b25ab91c1605b1bd400626eb8cf9fcbc169d14ca084d6400993f3debd1511c07","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x, y=None):\n    a=list(x); a[y[0]]=y[1]; return a\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('duplicate identity', solve(['a', 'b', 'a'], [0, 'c']), ['c', 'b', 'a'])\ncheck('negative index', solve(['a', 'b'], [-1, 'c']), ['a', 'c'])\ncheck('singleton', solve(['a'], [0, 'c']), ['c'])\ncheck('same replacement', solve(['a', 'b'], [1, 'b']), ['a', 'b'])\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":" 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":"xr-list-replace-one-index","generated_at":"2026-09-29T14:37:38.224405+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A controlled local-runtime regression for collection APIs, language semantics, or ownership wrappers. Fixtures include boundary and interaction cases.","repair":"Replace exactly the selected valid positional item, not every equal item.","root_cause":"Replacement uses value equality instead of positional identity.","sha256":"8193ea2440d1585f3ec69ac51b13c833b6ede628d74a8ea47077ff1d8c236293","title":"List replace one index · case 01","variant":1,"variant_policy":"Five execution reruns of a fixed adversarial fixture suite; variant number does not alter semantic inputs.","verification":{"attempt":{"elapsed_ms":44.07,"exit_code":1,"observations":[{"actual":["c","a","b","a"],"check":"duplicate identity","expected":["c","b","a"],"passed":false},{"actual":["a","c","b"],"check":"negative index","expected":["a","c"],"passed":false},{"actual":["c","a"],"check":"singleton","expected":["c"],"passed":false},{"actual":["a","b","b"],"check":"same replacement","expected":["a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicate identity\", \"actual\": [\"c\", \"a\", \"b\", \"a\"], \"expected\": [\"c\", \"b\", \"a\"], \"passed\": false}, {\"check\": \"negative index\", \"actual\": [\"a\", \"c\", \"b\"], \"expected\": [\"a\", \"c\"], \"passed\": false}, {\"check\": \"singleton\", \"actual\": [\"c\", \"a\"], \"expected\": [\"c\"], \"passed\": false}, {\"check\": \"same replacement\", \"actual\": [\"a\", \"b\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.188,"exit_code":1,"observations":[{"actual":["c","b","c"],"check":"duplicate identity","expected":["c","b","a"],"passed":false},{"actual":["a","c"],"check":"negative index","expected":["a","c"],"passed":true},{"actual":["c"],"check":"singleton","expected":["c"],"passed":true},{"actual":["a","b"],"check":"same replacement","expected":["a","b"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicate identity\", \"actual\": [\"c\", \"b\", \"c\"], \"expected\": [\"c\", \"b\", \"a\"], \"passed\": false}, {\"check\": \"negative index\", \"actual\": [\"a\", \"c\"], \"expected\": [\"a\", \"c\"], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [\"c\"], \"expected\": [\"c\"], \"passed\": true}, {\"check\": \"same replacement\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":113.993,"exit_code":0,"observations":[{"actual":["c","b","a"],"check":"duplicate identity","expected":["c","b","a"],"passed":true},{"actual":["a","c"],"check":"negative index","expected":["a","c"],"passed":true},{"actual":["c"],"check":"singleton","expected":["c"],"passed":true},{"actual":["a","b"],"check":"same replacement","expected":["a","b"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"duplicate identity\", \"actual\": [\"c\", \"b\", \"a\"], \"expected\": [\"c\", \"b\", \"a\"], \"passed\": true}, {\"check\": \"negative index\", \"actual\": [\"a\", \"c\"], \"expected\": [\"a\", \"c\"], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [\"c\"], \"expected\": [\"c\"], \"passed\": true}, {\"check\": \"same replacement\", \"actual\": [\"a\", \"b\"], \"expected\": [\"a\", \"b\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}